make hosts config portable

This commit is contained in:
Sean Buckley 2021-04-10 14:31:14 -04:00
parent ba35b789b8
commit 0d08424929
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@
imports = [ ./. ];
config = { sconfig.flakes.enable = true; };
};
nixosConfigurations = import ./hosts { inherit unstable stable2009; };
nixosConfigurations = import ./hosts { sconfig = ./.; inherit unstable stable2009; };
defaultPackage."x86_64-linux" =
with (import unstable { system = "x86_64-linux"; });

View file

@ -1,4 +1,4 @@
{ unstable, stable2009 }:
{ sconfig, unstable, stable2009 }:
let
hostMetadata =
@ -29,7 +29,7 @@ builtins.listToAttrs (
value = pkgs.lib.nixosSystem {
system = h.system;
modules = [
(./..)
(sconfig)
(./. + "/${h.name}/configuration.nix")
(hardwareModule { inherit pkgs; inherit (h) hardware; })
({ ... }: {