Modularise deploy-rs and add home-manager configs

This commit is contained in:
2022-02-20 20:16:49 +00:00
parent 15b10f22cf
commit c258230d74
8 changed files with 151 additions and 46 deletions

View File

@@ -40,7 +40,7 @@
}:
let
inherit (builtins) mapAttrs;
inherit (lib) recurseIntoAttrs filterAttrs evalModules;
inherit (lib) recurseIntoAttrs evalModules;
inherit (lib.flake) flattenTree eachDefaultSystem;
inherit (lib.my) mkDefaultSystemsPkgs flakePackageOverlay;
@@ -108,8 +108,12 @@
};
}
# Not an internal part of the module system apparently, but it doesn't have any dependencies other than lib
"${pkgsFlakes.unstable}/nixos/modules/misc/assertions.nix"
./nixos
./home-manager
./deploy-rs.nix
] ++ configs;
};
in
@@ -125,13 +129,7 @@
nixosConfigurations = mapAttrs (_: s: s.configuration) nixfiles.config.nixos.systems;
homeConfigurations = mapAttrs (_: s: s.configuration) nixfiles.config.home-manager.homes;
deploy = {
nodes = filterAttrs (_: n: n != null)
(mapAttrs (_: system: system.config.my.deploy.rendered) self.nixosConfigurations);
autoRollback = true;
magicRollback = true;
};
deploy = nixfiles.config.deploy-rs.rendered;
} //
(eachDefaultSystem (system:
let