From ec858092065a0e613f0451a74d316d38becced92 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 21 Jan 2025 23:36:46 +0000 Subject: [PATCH] modify distributed builds local machine --- hosts/citadel/default.nix | 1 + .../distributed-builds/local-machine.nix | 32 ++++++++-------- hosts/semita/default.nix | 38 +------------------ 3 files changed, 18 insertions(+), 53 deletions(-) diff --git a/hosts/citadel/default.nix b/hosts/citadel/default.nix index b10b81e..1cf8e3c 100644 --- a/hosts/citadel/default.nix +++ b/hosts/citadel/default.nix @@ -57,6 +57,7 @@ in { ../common/optional/gaming.nix ../common/optional/powersave.nix ../common/optional/restic-backup.nix + ../common/optional/distributed-builds/local-machine.nix # ../../modules/nixos outputs.nixosModules.nixosAutoUpgrade diff --git a/hosts/common/optional/distributed-builds/local-machine.nix b/hosts/common/optional/distributed-builds/local-machine.nix index 0abefb1..be7d0e1 100644 --- a/hosts/common/optional/distributed-builds/local-machine.nix +++ b/hosts/common/optional/distributed-builds/local-machine.nix @@ -3,22 +3,22 @@ let remoteMachineIp = configVars.networking.addresses.remote-builder.ip; in { - nix.distributedBuilds = true; - nix.settings.builders-use-substitutes = true; - nix.settings.max-jobs = 0; - nix.settings.trusted-substituters = ["ssh://${remoteMachineIp}"]; - nix.settings.substituters = ["ssh://${remoteMachineIp}"]; - - nix.buildMachines = [ - { - hostName = "remotebuild@${remoteMachineIp}"; - speedFactor = 1; - maxJobs = 10; - sshKey = "/root/.ssh/remotebuild"; - system = pkgs.stdenv.hostPlatform.system; - supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; - } - ]; + # nix.distributedBuilds = true; + # nix.settings.builders-use-substitutes = true; + # nix.settings.max-jobs = 0; + # nix.settings.trusted-substituters = ["ssh://${remoteMachineIp}"]; + # nix.settings.substituters = ["ssh://${remoteMachineIp}"]; + # + # nix.buildMachines = [ + # { + # hostName = "remotebuild@${remoteMachineIp}"; + # speedFactor = 1; + # maxJobs = 10; + # sshKey = "/root/.ssh/remotebuild"; + # system = pkgs.stdenv.hostPlatform.system; + # supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + # } + # ]; programs.ssh.knownHosts = { "merlin" = { diff --git a/hosts/semita/default.nix b/hosts/semita/default.nix index 726fe8d..7d08516 100644 --- a/hosts/semita/default.nix +++ b/hosts/semita/default.nix @@ -53,33 +53,12 @@ in { ../common/optional/nix-ld.nix ../common/optional/gaming.nix ../common/optional/restic-backup.nix - # - # # bind mounts - # ../common/optional/fileserver/bind-mounts/homeshare.nix - # ../common/optional/fileserver/nfs-server/homeshare.nix - - # nixos-containers - # ../common/optional/nixos-containers/nix-bitcoin.nix - # ../common/optional/nixos-containers/postgres.nix - # ../common/optional/nixos-containers/baseddata-worker.nix - # ../common/optional/nixos-containers/semitamaps-worker.nix - # ../common/optional/nixos-containers/backup-server.nix - # ../common/optional/nixos-containers/docker.nix - # ../common/optional/nixos-containers/pihole.nix - # ../common/optional/nixos-containers/metrics-server.nix - - # # Build nix derivations on remote machine - # ../common/optional/distributed-builds/local-machine.nix + ../common/optional/distributed-builds/local-machine.nix outputs.nixosModules.nixosAutoUpgrade ]; - # fileSystems."/mnt/main-ssd" = { - # device = "/dev/disk/by-uuid/ba884006-e813-4b67-9fe6-62aea08b3b59"; - # fsType = "ext4"; - # }; - # services.tailscale.useRoutingFeatures = "server"; boot = { @@ -104,16 +83,6 @@ in { }; }; - # services.prometheus = { - # exporters = { - # node = { - # enable = true; - # enabledCollectors = ["systemd"]; - # openFirewall = true; - # }; - # }; - # }; - # system.services.nixosAutoUpgrade = { # enable = true; # persistent = true; @@ -164,11 +133,6 @@ in { programs.fuse.userAllowOther = true; - boot.kernel.sysctl = { - "net.ipv4.ip_forward" = true; - "net.ipv6.conf.all.forwarding" = true; - }; - networking = { hostName = "semita"; nameservers = ["${piholeIp}" "${gatewayIp}" "8.8.8.8"];