depot/hosts/nixos.nix

19 lines
497 B
Nix
Raw Normal View History

2024-07-15 23:05:55 +02:00
{ config, lib, withSystem, ... }:
2023-02-24 15:16:15 +01:00
let
2023-08-31 00:55:45 +02:00
inherit (lib) mapAttrs nixosSystem;
2023-02-24 15:16:15 +01:00
inherit (config) gods;
mkNixOS = name: host: nixosSystem {
2024-07-16 14:07:30 +02:00
specialArgs = config.lib.summon host.system lib.id;
2024-07-15 23:05:55 +02:00
modules = [
host.nixos
2024-07-16 02:17:31 +02:00
(withSystem host.system ({ config, pkgs, ... }: {
nixpkgs.pkgs = pkgs // config.shadows;
2024-07-15 23:05:55 +02:00
}))
] ++ config.cluster.config.out.injectNixosConfig name;
2023-02-24 15:16:15 +01:00
};
in {
flake.nixosConfigurations = mapAttrs mkNixOS (gods.fromLight // gods.fromFlesh);
}