2025-12-16 16:48:11 -06:00
|
|
|
{
|
|
|
|
|
top,
|
2026-04-19 01:04:41 -05:00
|
|
|
lib',
|
2025-12-16 16:48:11 -06:00
|
|
|
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;
|
2024-10-11 12:28:53 -05:00
|
|
|
unstable =
|
|
|
|
|
{
|
2025-12-16 09:07:55 -06:00
|
|
|
channel ? top.nixunstable,
|
2024-10-11 12:28:53 -05:00
|
|
|
extraMods ? [ ],
|
|
|
|
|
name,
|
2025-12-16 09:07:55 -06:00
|
|
|
hm ? top.hmunstable,
|
2024-10-03 11:26:39 -05:00
|
|
|
}:
|
2025-12-22 15:24:26 -06:00
|
|
|
let
|
|
|
|
|
inherit (metadata.hosts.${name}) system;
|
|
|
|
|
in
|
2024-10-03 11:26:39 -05:00
|
|
|
channel.lib.nixosSystem {
|
2025-12-22 15:24:26 -06:00
|
|
|
pkgs = nixpkgs.${system};
|
2024-10-11 12:28:53 -05:00
|
|
|
specialArgs = {
|
2026-04-19 01:04:41 -05:00
|
|
|
inherit metadata top lib';
|
2024-10-11 12:28:53 -05:00
|
|
|
};
|
2024-10-03 11:26:39 -05:00
|
|
|
modules = [
|
2025-12-23 18:13:25 -06:00
|
|
|
{
|
|
|
|
|
nixpkgs.hostPlatform = system;
|
|
|
|
|
}
|
2025-06-10 14:28:46 -05:00
|
|
|
# Imported ones
|
2024-10-11 12:28:53 -05:00
|
|
|
top.agenix.nixosModules.default
|
2024-10-03 11:26:39 -05:00
|
|
|
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;
|
2024-10-03 11:26:39 -05:00
|
|
|
};
|
|
|
|
|
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} ];
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
// {
|
2024-10-03 11:26:39 -05:00
|
|
|
# nix build '.#nixosConfigurations.wsl.config.system.build.installer'
|
2026-02-17 17:04:11 -06:00
|
|
|
#nixos = wsl { name = "wsl"; };
|
2024-10-03 11:26:39 -05:00
|
|
|
# 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
|
|
|
}
|