From ffdecafac7eba0a5297042f4a29975169a90bc11 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 22 Feb 2020 13:18:30 +0100 Subject: [PATCH] Remove this miserable nix.distributedBuilds shit --- hosts/hydra/configuration.nix | 2 -- hosts/hydra/hydra.nix | 25 +++++++++++++++---------- hosts/server7/configuration.nix | 1 - lib/buildfarmer.nix | 15 --------------- 4 files changed, 15 insertions(+), 28 deletions(-) delete mode 100644 lib/buildfarmer.nix diff --git a/hosts/hydra/configuration.nix b/hosts/hydra/configuration.nix index 3e6992d5..457851c6 100644 --- a/hosts/hydra/configuration.nix +++ b/hosts/hydra/configuration.nix @@ -7,7 +7,6 @@ ./cache.nix ../../lib ../../lib/hq.nix - ../../lib/buildfarmer.nix ../../lib/yggdrasil.nix ]; @@ -49,7 +48,6 @@ programs.mosh.enable = true; nix = { - distributedBuilds = true; package = pkgs.nixFlakes; useSandbox = false; maxJobs = lib.mkDefault 10; diff --git a/hosts/hydra/hydra.nix b/hosts/hydra/hydra.nix index 37d1cc84..5a187b71 100644 --- a/hosts/hydra/hydra.nix +++ b/hosts/hydra/hydra.nix @@ -2,19 +2,24 @@ { nix = { - binaryCaches = [ "https://cache.nixos.org" "https://cache.dhall-lang.org" ]; - binaryCachePublicKeys = - [ "cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM=" ]; - buildMachines = [{ - hostName = "server7.hq.c3d2.de"; - system = "x86_64-linux"; - sshUser = "buildfarmer"; - sshKey = "/root/.ssh/id_ed25519"; - maxJobs = 10; - }]; + binaryCaches = [ + "https://cache.server7.hq.c3d2.de" + "https://cache.nixos.org" + "https://cache.dhall-lang.org" + ]; + binaryCachePublicKeys = [ + "cache.server7.hq.c3d2.de:x8JLRG26zRZ8ysYZLEkPxuAYuK1VSJi/aMAEIs2Lv+U=" + "cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM=" + ]; extraOptions = '' allowed-uris = http:// https:// ''; + buildMachines = [{ + hostName = "localhost"; + system = "x86_64-linux"; + supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ]; + maxJobs = 8; + }]; }; services.hydra = { diff --git a/hosts/server7/configuration.nix b/hosts/server7/configuration.nix index a7299f20..dc4de885 100644 --- a/hosts/server7/configuration.nix +++ b/hosts/server7/configuration.nix @@ -6,7 +6,6 @@ in { ../../lib ../../lib/default-gateway.nix - ../../lib/buildfarmer.nix ../../lib/yggdrasil.nix ./containers ./hardware-configuration.nix diff --git a/lib/buildfarmer.nix b/lib/buildfarmer.nix deleted file mode 100644 index 9220a0f0..00000000 --- a/lib/buildfarmer.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, pkgs, ... }: - -{ - users.users.buildfarmer = { - isNormalUser = false; - description = "User for remote Nix builds"; - useDefaultShell = true; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMwS9B/d6QJUyZW9b52R2TlJgkI5oGDyOvzMN7H9Cz4/ hydra@hydra" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINA3x2+5ieo5QgehFHqXCYAYZSP8dxXyE1E/fSLnny8y root@serve7" - ]; - }; - - nix.trustedUsers = [ "buildfarmer" ]; -}