2021-04-09 04:35:43 +00:00
|
|
|
{ unstable, stable2009 }:
|
2021-04-06 03:11:17 +00:00
|
|
|
let
|
2021-04-06 03:24:24 +00:00
|
|
|
|
2021-04-09 22:23:21 +00:00
|
|
|
commonModules = name: [
|
|
|
|
(../.)
|
|
|
|
(./. + "/${name}")
|
2021-04-06 03:24:24 +00:00
|
|
|
({ ... }: {
|
2021-04-09 22:26:50 +00:00
|
|
|
networking.hostName = name;
|
|
|
|
sconfig.flakes.enable = true;
|
|
|
|
sconfig.flakes.rebuildPath = "github:buckley310/nixos-config";
|
2021-04-06 03:24:24 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-04-09 22:32:55 +00:00
|
|
|
mkStandardSystem = { name, pkgs, system }: pkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2021-04-09 22:23:21 +00:00
|
|
|
modules = (commonModules name) ++ [
|
2021-04-06 03:11:17 +00:00
|
|
|
pkgs.nixosModules.notDetected
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-04-09 22:32:55 +00:00
|
|
|
mkQemuSystem = { name, pkgs, system }: pkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2021-04-09 22:23:21 +00:00
|
|
|
modules = (commonModules name) ++ [
|
2021-04-06 03:24:24 +00:00
|
|
|
(x: { imports = [ "${x.modulesPath}/profiles/qemu-guest.nix" ]; })
|
2021-04-06 03:11:17 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
2021-04-09 22:32:55 +00:00
|
|
|
vm = mkQemuSystem { name = "vm"; system = "x86_64-linux"; pkgs = unstable; };
|
|
|
|
hp = mkStandardSystem { name = "hp"; system = "x86_64-linux"; pkgs = unstable; };
|
|
|
|
manta = mkStandardSystem { name = "manta"; system = "x86_64-linux"; pkgs = unstable; };
|
|
|
|
neo = mkStandardSystem { name = "neo"; system = "x86_64-linux"; pkgs = unstable; };
|
2021-04-06 03:11:17 +00:00
|
|
|
}
|