Files
nix-files/hosts/instantiate.nix
Colin c7abda9393 impure.nix: add new pseudohosts: baseline-{aarch64,x86_64}
immediately apparent is that the config takes 4x as long to eval on cross than on native, regardless of anything else
2024-10-01 04:38:50 +00:00

29 lines
603 B
Nix

# trampoline from flake.nix into the specific host definition, while doing a tiny bit of common setup
# args from flake-level `import`
{ hostName, variant }:
# module args
{ lib, ... }:
{
imports = [
./common
./modules
] ++ lib.optionals (builtins.pathExists ./by-name/${hostName}) [
./by-name/${hostName}
];
networking.hostName = hostName;
system.name = if variant == null then
hostName
else
"${hostName}-${variant}"
;
sane = lib.mkMerge [
(lib.mkIf (variant == "min") { maxBuildCost = 0; })
(lib.mkIf (variant == "light") { maxBuildCost = 2; })
];
}