diff --git a/flake.nix b/flake.nix index f173daa3..b25cad67 100644 --- a/flake.nix +++ b/flake.nix @@ -60,9 +60,17 @@ { colmena = { meta = { + # Info + description = "The Bun Hive"; + name = "bunhive"; + + # NixPKGs nixpkgs = import stable { system = "x86_64-linux"; }; specialArgs = inputs; + # Remote builds + machinesFile = ./machines.txt; + # Use a different Nixpkgs import on some systems nodeNixpkgs.jupiter = import unstable { system = "x86_64-linux"; }; }; @@ -81,8 +89,8 @@ # Servers midas.imports = [ ./hosts/midas ]; kitty.imports = [ ./hosts/kitty ]; - elder.imports = [ ./hosts/elder ]; detritus.imports = [ ./hosts/detritus ]; + elder.imports = [ ./hosts/elder ]; prophet.imports = [ ./hosts/prophet ]; }; } diff --git a/hosts/prophet/default.nix b/hosts/prophet/default.nix index 5f2196a5..48b648b8 100644 --- a/hosts/prophet/default.nix +++ b/hosts/prophet/default.nix @@ -14,10 +14,7 @@ stateVersion = "24.05"; }; - deployment = { - buildOnTarget = true; - targetHost = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b"; - }; + deployment.targetHost = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b"; networking.hostId = "97a21a38"; } diff --git a/machines.txt b/machines.txt new file mode 100644 index 00000000..c372083f --- /dev/null +++ b/machines.txt @@ -0,0 +1,5 @@ +ssh://midas x86_64-linux +ssh://kitty x86_64-linux +ssh://detritus x86_64-linux +ssh://elder x86_64-linux +ssh://prophet aarch64-linux diff --git a/modules/system/settings/nix/default.nix b/modules/system/settings/nix/default.nix index ca395c3b..6973350b 100644 --- a/modules/system/settings/nix/default.nix +++ b/modules/system/settings/nix/default.nix @@ -2,7 +2,6 @@ { imports = [ ./channels - ./distributed ./gc ./unfree ]; @@ -10,12 +9,15 @@ nix = { package = pkgs.lix; settings = { + auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; + max-jobs = 0; + trusted-users = [ "root" ]; }; + distributedBuilds = true; }; # Use a newer implementation of nixos-rebuild diff --git a/modules/system/settings/nix/distributed/default.nix b/modules/system/settings/nix/distributed/default.nix deleted file mode 100644 index 5cba68d8..00000000 --- a/modules/system/settings/nix/distributed/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ nodes, ... }: -{ - nix = { - settings = { - max-jobs = 0; - trusted-users = [ "root" ]; - }; - - distributedBuilds = true; - buildMachines = with nodes; [ - { - hostName = midas.config.deployment.targetHost; - system = midas.config.nixpkgs.localSystem.system; - } - { - hostName = kitty.config.deployment.targetHost; - system = kitty.config.nixpkgs.localSystem.system; - } - { - hostName = prophet.config.deployment.targetHost; - system = prophet.config.nixpkgs.localSystem.system; - } - { - hostName = detritus.config.deployment.targetHost; - system = detritus.config.nixpkgs.localSystem.system; - } - { - hostName = elder.config.deployment.targetHost; - system = elder.config.nixpkgs.localSystem.system; - } - ]; - }; -}