modify distributed builds local machine

This commit is contained in:
Sam 2025-01-21 23:36:46 +00:00
parent 47245c4844
commit ec85809206
3 changed files with 18 additions and 53 deletions

View File

@ -57,6 +57,7 @@ in {
../common/optional/gaming.nix ../common/optional/gaming.nix
../common/optional/powersave.nix ../common/optional/powersave.nix
../common/optional/restic-backup.nix ../common/optional/restic-backup.nix
../common/optional/distributed-builds/local-machine.nix
# ../../modules/nixos # ../../modules/nixos
outputs.nixosModules.nixosAutoUpgrade outputs.nixosModules.nixosAutoUpgrade

View File

@ -3,22 +3,22 @@ let
remoteMachineIp = configVars.networking.addresses.remote-builder.ip; remoteMachineIp = configVars.networking.addresses.remote-builder.ip;
in in
{ {
nix.distributedBuilds = true; # nix.distributedBuilds = true;
nix.settings.builders-use-substitutes = true; # nix.settings.builders-use-substitutes = true;
nix.settings.max-jobs = 0; # nix.settings.max-jobs = 0;
nix.settings.trusted-substituters = ["ssh://${remoteMachineIp}"]; # nix.settings.trusted-substituters = ["ssh://${remoteMachineIp}"];
nix.settings.substituters = ["ssh://${remoteMachineIp}"]; # nix.settings.substituters = ["ssh://${remoteMachineIp}"];
#
nix.buildMachines = [ # nix.buildMachines = [
{ # {
hostName = "remotebuild@${remoteMachineIp}"; # hostName = "remotebuild@${remoteMachineIp}";
speedFactor = 1; # speedFactor = 1;
maxJobs = 10; # maxJobs = 10;
sshKey = "/root/.ssh/remotebuild"; # sshKey = "/root/.ssh/remotebuild";
system = pkgs.stdenv.hostPlatform.system; # system = pkgs.stdenv.hostPlatform.system;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; # supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
} # }
]; # ];
programs.ssh.knownHosts = { programs.ssh.knownHosts = {
"merlin" = { "merlin" = {

View File

@ -53,33 +53,12 @@ in {
../common/optional/nix-ld.nix ../common/optional/nix-ld.nix
../common/optional/gaming.nix ../common/optional/gaming.nix
../common/optional/restic-backup.nix ../common/optional/restic-backup.nix
#
# # bind mounts
# ../common/optional/fileserver/bind-mounts/homeshare.nix
# ../common/optional/fileserver/nfs-server/homeshare.nix ../common/optional/distributed-builds/local-machine.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
outputs.nixosModules.nixosAutoUpgrade outputs.nixosModules.nixosAutoUpgrade
]; ];
# fileSystems."/mnt/main-ssd" = {
# device = "/dev/disk/by-uuid/ba884006-e813-4b67-9fe6-62aea08b3b59";
# fsType = "ext4";
# };
#
services.tailscale.useRoutingFeatures = "server"; services.tailscale.useRoutingFeatures = "server";
boot = { boot = {
@ -104,16 +83,6 @@ in {
}; };
}; };
# services.prometheus = {
# exporters = {
# node = {
# enable = true;
# enabledCollectors = ["systemd"];
# openFirewall = true;
# };
# };
# };
# system.services.nixosAutoUpgrade = { # system.services.nixosAutoUpgrade = {
# enable = true; # enable = true;
# persistent = true; # persistent = true;
@ -164,11 +133,6 @@ in {
programs.fuse.userAllowOther = true; programs.fuse.userAllowOther = true;
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = true;
"net.ipv6.conf.all.forwarding" = true;
};
networking = { networking = {
hostName = "semita"; hostName = "semita";
nameservers = ["${piholeIp}" "${gatewayIp}" "8.8.8.8"]; nameservers = ["${piholeIp}" "${gatewayIp}" "8.8.8.8"];