move host config common modules

This commit is contained in:
Sean Buckley 2021-04-05 23:24:24 -04:00
parent f9af878095
commit 8f0d0981a1

View file

@ -1,22 +1,29 @@
{ unstable, stable2009 }: { unstable, stable2009 }:
let let
commonModules = [
../.
({ ... }: {
config = {
sconfig.flakes.enable = true;
sconfig.flakes.rebuildPath = "github:buckley310/nixos-config";
};
})
];
mkStandardSystem = { name, pkgs }: pkgs.lib.nixosSystem { mkStandardSystem = { name, pkgs }: pkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = commonModules ++ [
pkgs.nixosModules.notDetected pkgs.nixosModules.notDetected
({ ... }: { config = { sconfig.flakes.enable = true; }; })
(./. + "/configuration_${name}.nix") (./. + "/configuration_${name}.nix")
../.
]; ];
}; };
mkQemuSystem = { name, pkgs }: pkgs.lib.nixosSystem { mkQemuSystem = { name, pkgs }: pkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = commonModules ++ [
({ modulesPath, ... }: { imports = [ "${modulesPath}/profiles/qemu-guest.nix" ]; }) (x: { imports = [ "${x.modulesPath}/profiles/qemu-guest.nix" ]; })
({ ... }: { config = { sconfig.flakes.enable = true; }; })
(./. + "/configuration_${name}.nix") (./. + "/configuration_${name}.nix")
../.
]; ];
}; };