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