Working on flake
This commit is contained in:
parent
5b92cefc97
commit
801d5a4cfc
@ -20,13 +20,14 @@ in {
|
|||||||
builtins.replaceStrings [ ".nix" ] [ "" ] filename;
|
builtins.replaceStrings [ ".nix" ] [ "" ] filename;
|
||||||
hosts = map hostname-from-file (lib.attrNames (lib.filterAttrs is-nix-file
|
hosts = map hostname-from-file (lib.attrNames (lib.filterAttrs is-nix-file
|
||||||
(lib.filterAttrs is-regular-file (builtins.readDir hosts-path))));
|
(lib.filterAttrs is-regular-file (builtins.readDir hosts-path))));
|
||||||
|
hostsOpts = lib.listToAttrs (hostname:
|
||||||
|
lib.nameValuePair hostname (import hosts-path + "/${hostname}.nix"));
|
||||||
|
|
||||||
pkgs = import nixpkgs { };
|
pkgs = import nixpkgs { };
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixConfigurations = lib.mapAttrs (hostname:
|
nixConfigurations = lib.mapAttrs (hostname: hostOpts:
|
||||||
let hostOpts = import hosts-path + "/${hostname}.nix";
|
lib.nixosSystem {
|
||||||
in lib.nixosSystem {
|
|
||||||
system = hostOpts.platform;
|
system = hostOpts.platform;
|
||||||
modules = [
|
modules = [
|
||||||
(import ./initialize.nix {
|
(import ./initialize.nix {
|
||||||
@ -36,6 +37,6 @@ in {
|
|||||||
include-secrets = true;
|
include-secrets = true;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}) hosts;
|
}) hostsOpts;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user