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