From 6716f07adf88359e5f1b9f873db9109953d7d0fa Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 29 Jun 2026 15:13:48 +0200 Subject: [PATCH] disable nix-required-mounts on remote builders --- hardware/gpu/cuda-common.nix | 12 +++++------- hosts/nixos/bjarte/configuration.nix | 1 + hosts/nixos/bolle/configuration.nix | 1 + hosts/nixos/eple/configuration.nix | 1 + hosts/nixos/garp/configuration.nix | 1 + hosts/nixos/nord/configuration.nix | 1 + hosts/nixos/sopp/configuration.nix | 1 + profiles/base/default.nix | 5 ++++- profiles/{base => }/ccache/default.nix | 0 profiles/{base => }/ccache/server.nix | 0 profiles/known-hosts/hosts.toml | 15 ++++++++++----- 11 files changed, 25 insertions(+), 13 deletions(-) rename profiles/{base => }/ccache/default.nix (100%) rename profiles/{base => }/ccache/server.nix (100%) diff --git a/hardware/gpu/cuda-common.nix b/hardware/gpu/cuda-common.nix index 6a733ca..f29de63 100644 --- a/hardware/gpu/cuda-common.nix +++ b/hardware/gpu/cuda-common.nix @@ -77,13 +77,11 @@ lib.mkMerge [ }; } -/* lib.mkIf (lib.versionAtLeast lib.version "24.11") { */ -(lib.optionalAttrs (lib.versionAtLeast lib.version "24.11") { - programs.nix-required-mounts.enable = true; - programs.nix-required-mounts.presets.nvidia-gpu.enable = true; - # adding "cuda", "opengl" and "nvidia-gpu" ^ overrides the implicit defaults - nix.settings.system-features = lib.mkIf (pkgs.stdenv.hostPlatform.system == "x86_64-linux") ["kvm" "nixos-test"]; -}) +{ + # # blocked by https://github.com/NixOS/nix/issues/9272 + # programs.nix-required-mounts.enable = true; + # programs.nix-required-mounts.presets.nvidia-gpu.enable = true; +} { # https://wiki.nixos.org/wiki/Nvidia diff --git a/hosts/nixos/bjarte/configuration.nix b/hosts/nixos/bjarte/configuration.nix index b3e0e2c..e46de59 100644 --- a/hosts/nixos/bjarte/configuration.nix +++ b/hosts/nixos/bjarte/configuration.nix @@ -30,6 +30,7 @@ ../../../profiles/nix-ld.nix ../../../profiles/sshd/ts-only.nix + ../../../profiles/ccache #../../../profiles/no-suspend.nix ../../../profiles/earlyoom.nix ../../../profiles/oci/podman.nix diff --git a/hosts/nixos/bolle/configuration.nix b/hosts/nixos/bolle/configuration.nix index 46cf434..ee2ee6a 100644 --- a/hosts/nixos/bolle/configuration.nix +++ b/hosts/nixos/bolle/configuration.nix @@ -17,6 +17,7 @@ ../../../hardware/gpu/intel.nix ../../../profiles/sshd + # ../../../profiles/ccache # https://github.com/NixOS/nix/issues/9272 ../../../profiles/nix-cgroups.nix ../../../users/pbsds diff --git a/hosts/nixos/eple/configuration.nix b/hosts/nixos/eple/configuration.nix index 70165b6..82bdb85 100644 --- a/hosts/nixos/eple/configuration.nix +++ b/hosts/nixos/eple/configuration.nix @@ -20,6 +20,7 @@ ../../../hardware/gpu/rocm.nix ../../../profiles/sshd + # ../../../profiles/ccache # https://github.com/NixOS/nix/issues/9272 ../../../profiles/nix-cgroups.nix ../../../users/pbsds diff --git a/hosts/nixos/garp/configuration.nix b/hosts/nixos/garp/configuration.nix index 1d2ecc2..a7a345d 100644 --- a/hosts/nixos/garp/configuration.nix +++ b/hosts/nixos/garp/configuration.nix @@ -31,6 +31,7 @@ ../../../profiles/nix-ld.nix ../../../profiles/sshd + # ../../../profiles/ccache # https://github.com/NixOS/nix/issues/9272 ../../../profiles/nix-cgroups.nix #../../../profiles/no-suspend.nix # ../../../profiles/oci/podman.nix diff --git a/hosts/nixos/nord/configuration.nix b/hosts/nixos/nord/configuration.nix index a4b4ed4..83a2390 100644 --- a/hosts/nixos/nord/configuration.nix +++ b/hosts/nixos/nord/configuration.nix @@ -57,6 +57,7 @@ ../../../profiles/nix-ld.nix ../../../profiles/sshd + ../../../profiles/ccache ../../../profiles/earlyoom.nix #../../../profiles/oci/podman.nix ../../../profiles/oci/docker.nix diff --git a/hosts/nixos/sopp/configuration.nix b/hosts/nixos/sopp/configuration.nix index 86a5f49..4c7b6e5 100644 --- a/hosts/nixos/sopp/configuration.nix +++ b/hosts/nixos/sopp/configuration.nix @@ -56,6 +56,7 @@ ../../../profiles/nix-ld.nix ../../../profiles/sshd + ../../../profiles/ccache ../../../profiles/earlyoom.nix ../../../profiles/no-suspend.nix #../../../profiles/oci/podman.nix diff --git a/profiles/base/default.nix b/profiles/base/default.nix index c2a8df8..b9eb653 100644 --- a/profiles/base/default.nix +++ b/profiles/base/default.nix @@ -11,7 +11,6 @@ ./locale-no.nix ./upgrade-diff.nix ./vm-variant.nix - ./ccache ./../mounts/common-nfs.nix # ./profiles/mounts/common-zfs.nix ]; @@ -20,6 +19,10 @@ (import ./../../overlays/wl-clipboard-timeout.nix) ]; + # reaffirm these defaults in case we add mroe via 'programs.nix-required-mounts' + # adding "cuda" or "ccache" overrides the implicit defaults + nix.settings.system-features = lib.mkIf (pkgs.stdenv.hostPlatform.system == "x86_64-linux") ["kvm" "nixos-test"]; + # TODO: selectively whitelist nixpkgs.config.allowUnfree = true; # nixpkgs.config.allowAliases = false; diff --git a/profiles/base/ccache/default.nix b/profiles/ccache/default.nix similarity index 100% rename from profiles/base/ccache/default.nix rename to profiles/ccache/default.nix diff --git a/profiles/base/ccache/server.nix b/profiles/ccache/server.nix similarity index 100% rename from profiles/base/ccache/server.nix rename to profiles/ccache/server.nix diff --git a/profiles/known-hosts/hosts.toml b/profiles/known-hosts/hosts.toml index 0839454..25463e4 100644 --- a/profiles/known-hosts/hosts.toml +++ b/profiles/known-hosts/hosts.toml @@ -54,7 +54,8 @@ aliases = [ "bolle.pbsds.net" ] buildMachine.systems = ["x86_64-linux", "i686-linux", "riscv64-linux"] buildMachine.maxJobs = 3 # 12 threads 32GB buildMachine.speedFactor = 4 # ??? -buildMachine.supportedFeatures = ["kvm", "nixos-test" ] #, "ccache" ] # no ccache because we have yet to setup distributed ccache +# buildMachine.supportedFeatures = ["kvm", "nixos-test" ] #, "ccache" ] # no ccache because we have yet to setup distributed ccache +buildMachine.supportedFeatures = ["kvm", "nixos-test" ] # https://github.com/NixOS/nix/issues/9272 buildMachine.protocol = "ssh-ng" ssh.listenPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILeOB/57N1fQPVorIUlkkJZaQduBo+4+km2Qbj4ebd/k" # ssh.proxyJump = "login.stud.ntnu.no" # login.pvv.ntnu.no @@ -66,7 +67,8 @@ aliases = [ "eple.pbsds.net" ] buildMachine.systems = ["x86_64-linux", "i686-linux", "riscv64-linux"] buildMachine.maxJobs = 3 # 12 threads 32GB buildMachine.speedFactor = 3 # i7-5820K -buildMachine.supportedFeatures = ["kvm", "nixos-test", "ccache" ] +# buildMachine.supportedFeatures = ["kvm", "nixos-test", "ccache" ] +buildMachine.supportedFeatures = ["kvm", "nixos-test" ] # https://github.com/NixOS/nix/issues/9272 buildMachine.protocol = "ssh-ng" # useAsSubstituter = true ssh.listenPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH03MEINNnjBvtmvN2QsCDCLkvF9ow5FQJp9uiyQ1Iwi" @@ -80,7 +82,8 @@ aliases = [ "garp.pbsds.net" ] buildMachine.systems = ["x86_64-linux", "i686-linux", "riscv64-linux"] # buildMachine.maxJobs = 2 # 8 threads 64GB buildMachine.speedFactor = 4 # i7-6700 -buildMachine.supportedFeatures = ["kvm", "nixos-test", "cuda" ] #, "ccache" ] # no ccache because we have yet to setup distributed ccache +# buildMachine.supportedFeatures = ["kvm", "nixos-test", "cuda" ] #, "ccache" ] # no ccache because we have yet to setup distributed ccache +buildMachine.supportedFeatures = ["kvm", "nixos-test" ] # https://github.com/NixOS/nix/issues/9272 buildMachine.protocol = "ssh-ng" ssh.listenPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOkcZ3cUAKk8uUvZPsX7PDBInkb3Eps3Xh+xVrhPY+sx" # ssh.proxyJump = "login.stud.ntnu.no" # login.pvv.ntnu.no @@ -100,7 +103,8 @@ ssh.userPublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7fYndgIXJM+tLSfkbprW aliases = [ "sopp.tail9aac63.ts.net" ] # "sopp.pbsds.net", # buildMachine.maxJobs = 2 # 8 threads 32GB buildMachine.speedFactor = 2 # i7-4790K -buildMachine.supportedFeatures = ["kvm", "nixos-test", "cuda", "ccache" ] +# buildMachine.supportedFeatures = ["kvm", "nixos-test", "cuda", "ccache" ] +buildMachine.supportedFeatures = ["kvm", "nixos-test" ] # https://github.com/NixOS/nix/issues/9272 # useAsSubstituter = true remoteStoreSpecialization = true # ssh.listenPort = 26 @@ -114,7 +118,8 @@ ssh.userPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL6eTQkxO/1XflHpGf3478+ aliases = [ "nord.tail9aac63.ts.net" ] # "nord.pbsds.net", # buildMachine.maxJobs = 1 # 4 threads 32GB buildMachine.speedFactor = 1 # i5-2500 -buildMachine.supportedFeatures = ["kvm", "nixos-test", "ccache" ] +# buildMachine.supportedFeatures = ["kvm", "nixos-test", "ccache" ] +buildMachine.supportedFeatures = ["kvm", "nixos-test" ] # https://github.com/NixOS/nix/issues/9272 # useAsSubstituter = true # ssh.listenPort = 24 ssh.listenPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBSdIUtUfAxnVbPDmDDFdP2S3Wd3+CC8IfZAANJ76oh"