nixos-config/hosts/default.nix

37 lines
927 B
Nix
Raw Normal View History

2021-04-06 03:36:41 +00:00
{ nixpkgs, stable2009 }:
2021-04-06 03:11:17 +00:00
let
2021-04-06 03:24:24 +00:00
commonModules = [
../.
({ ... }: {
config = {
sconfig.flakes.enable = true;
sconfig.flakes.rebuildPath = "github:buckley310/nixos-config";
};
})
];
2021-04-06 03:11:17 +00:00
mkStandardSystem = { name, pkgs }: pkgs.lib.nixosSystem {
system = "x86_64-linux";
2021-04-06 03:24:24 +00:00
modules = commonModules ++ [
2021-04-06 03:11:17 +00:00
pkgs.nixosModules.notDetected
(./. + "/configuration_${name}.nix")
];
};
mkQemuSystem = { name, pkgs }: pkgs.lib.nixosSystem {
system = "x86_64-linux";
2021-04-06 03:24:24 +00:00
modules = commonModules ++ [
(x: { imports = [ "${x.modulesPath}/profiles/qemu-guest.nix" ]; })
2021-04-06 03:11:17 +00:00
(./. + "/configuration_${name}.nix")
];
};
in
{
2021-04-06 03:36:41 +00:00
vm = mkQemuSystem { name = "vm"; pkgs = nixpkgs; };
2021-04-06 21:30:28 +00:00
hp = mkStandardSystem { name = "hp"; pkgs = nixpkgs; };
2021-04-06 19:14:54 +00:00
manta = mkStandardSystem { name = "manta"; pkgs = nixpkgs; };
2021-04-07 00:26:08 +00:00
neo = mkStandardSystem { name = "neo"; pkgs = nixpkgs; };
2021-04-06 03:11:17 +00:00
}