Files
nixos/hosts/default.nix
T

88 lines
2.0 KiB
Nix
Raw Normal View History

2025-12-16 16:48:11 -06:00
{
top,
metadata,
2025-12-18 10:45:24 -06:00
nixpkgs,
2025-12-16 16:48:11 -06:00
}:
2023-05-11 09:32:05 -05:00
let
2026-02-17 16:10:35 -06:00
inherit (top.nixunstable) lib;
unstable =
{
2025-12-16 09:07:55 -06:00
channel ? top.nixunstable,
extraMods ? [ ],
name,
2025-12-16 09:07:55 -06:00
hm ? top.hmunstable,
}:
2025-12-22 15:24:26 -06:00
let
inherit (metadata.hosts.${name}) system;
in
channel.lib.nixosSystem {
2025-12-22 15:24:26 -06:00
pkgs = nixpkgs.${system};
specialArgs = {
2025-12-16 16:48:11 -06:00
inherit metadata top;
};
modules = [
2025-12-23 18:13:25 -06:00
{
nixpkgs.hostPlatform = system;
}
2025-06-10 14:28:46 -05:00
# Imported ones
top.agenix.nixosModules.default
hm.nixosModules.home-manager
2025-06-10 14:28:46 -05:00
# Local ones
./baseline.nix
top.self.modules.nixosModule
2025-11-02 22:59:43 -06:00
]
++ extraMods;
};
in
2026-02-17 16:10:35 -06:00
(lib.genAttrs
(builtins.attrNames (lib.filterAttrs (_: v: v == "directory") (builtins.readDir ./unstable)))
(
name:
(unstable {
inherit name;
extraMods = [ ./unstable/${name} ];
})
)
)
// (lib.genAttrs
(builtins.attrNames (lib.filterAttrs (_: v: v == "directory") (builtins.readDir ./vm)))
(
name:
(unstable {
inherit name;
extraMods = [ ./vm/${name} ];
})
)
)
// {
# nix build '.#nixosConfigurations.wsl.config.system.build.installer'
2026-02-17 17:04:11 -06:00
#nixos = wsl { name = "wsl"; };
# nix build '.#nixosConfigurations.wsl-aarch.config.system.build.installer'
2025-12-07 17:44:58 -06:00
#nixos-arm = wsl {
2026-02-17 16:10:35 -06:00
# name = "wsl";
# system = "aarch64-linux";
2025-12-07 17:44:58 -06:00
#};
2026-02-17 16:10:35 -06:00
builder-aarch = lib.nixosSystem {
system = "aarch64-linux";
modules = [
"${top.nixunstable}/nixos/modules/profiles/nix-builder-vm.nix"
{
virtualisation.host.pkgs = import top.nixunstable { system = "aarch64-darwin"; };
boot.loader.grub.devices = [ "/dev/vda" ];
}
];
};
builder-x86 = lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${top.nixunstable}/nixos/modules/profiles/nix-builder-vm.nix"
{
virtualisation.host.pkgs = import top.nixunstable { system = "aarch64-darwin"; };
boot.loader.grub.devices = [ "/dev/vda" ];
}
];
};
2023-05-11 09:32:05 -05:00
}