Files
nixos/hosts/default.nix
T
2025-06-10 15:05:09 -05:00

71 lines
1.9 KiB
Nix

{ top, ... }@all:
let
vm = args: (unstable (args // { extraMods = [ top.nixos-generators.nixosModules.all-formats ]; }));
wsl = args: (unstable (args // { extraMods = [ top.wsl.nixosModules.wsl ]; }));
unstable =
args:
(machine (
args
// {
channel = top.nixunstable;
hm = top.hmunstable;
}
));
machine =
{
channel ? top.nixstable,
extraMods ? [ ],
name,
system ? "x86_64-linux",
hm ? top.hm,
}:
let
nixpkgs = import channel { inherit system; };
overlays = all.overlays ++ [ top.proxmox.overlays.${system} ];
in
channel.lib.nixosSystem {
inherit system;
specialArgs = {
inherit nixpkgs top overlays;
inherit (top) self;
};
modules = [
# Imported ones
top.agenix.nixosModules.default
hm.nixosModules.home-manager
top.nurpkgs.modules.nixos.default
# Local ones
./baseline.nix
top.self.modules.nixosModule
./${name}
] ++ extraMods;
};
in
{
genesis = unstable { name = "genesis"; };
exodus = unstable { name = "exodus"; };
jude = unstable { name = "jude"; };
icdm-root = unstable { name = "icdm-root"; };
linode = unstable { name = "linode"; };
hosea = unstable { name = "hosea"; };
jeremiah = unstable { name = "jeremiah"; };
isaiah = unstable { name = "isaiah"; };
vm-gitlab = vm { name = "vm-gitlab"; };
vm-jellyfin = vm { name = "vm-jellyfin"; };
vm-matrix = vm { name = "vm-matrix"; };
proxmoxtemplate = unstable { name = "proxmoxtemplate"; };
iso = unstable { name = "iso"; };
# nix build '.#nixosConfigurations.wsl.config.system.build.installer'
nixos = wsl {
name = "wsl";
system = "aarch64-linux";
};
# nix build '.#nixosConfigurations.wsl-aarch.config.system.build.installer'
nixos-arm = wsl {
name = "wsl";
system = "aarch64-linux";
};
}