diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-13 21:28:20 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-13 21:28:20 -0400 |
commit | 0513b78160a437f66e5d852c4a9a69193f59b98a (patch) | |
tree | 0a3850966dce1f2eba81639e1f092c49210e2672 /config | |
parent | aff51e2be25a9fd6920d0595470494c2a148b45b (diff) |
Add hydra service.
Diffstat (limited to 'config')
-rw-r--r-- | config/common.nix | 11 | ||||
-rw-r--r-- | config/hydra.nix | 31 |
2 files changed, 39 insertions, 3 deletions
diff --git a/config/common.nix b/config/common.nix index 873d94c..0221254 100644 --- a/config/common.nix +++ b/config/common.nix @@ -21,10 +21,15 @@ ]; time.timeZone = "America/New_York"; + services = { + openssh.passwordAuthentication = false; + }; + nix = { - useSandbox = true; - maxJobs = 8; - buildCores = 0; # auto configure + useSandbox = lib.mkDefault true; + maxJobs = lib.mkDefault 16; + buildCores = lib.mkDefault 0; # auto configure + gc.automatic = lib.mkDefault true; }; boot.cleanTmpDir = true; diff --git a/config/hydra.nix b/config/hydra.nix new file mode 100644 index 0000000..9242310 --- /dev/null +++ b/config/hydra.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: +let + hydraPort = (import ../data/aliases.nix).services.hydra.port; +in +{ + services.hydra = { + enable = true; + hydraURL = "https://hydra.orbekk.com"; + notificationSender = "kj+hydra@orbekk.com"; + port = hydraPort; + }; + + nix = { + distributedBuilds = true; + nrBuildUsers = 30; + # Enable this if I run low on disk. + gc.automatic = lib.mkForce false; + buildMachines = [ + { + hostName = "localhost"; + system = "x86_64-linux"; + maxJobs = "16"; + supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ]; + } + ]; + extraOptions = "auto-optimise-store = true"; + }; + nixpkgs.config = { + allowUnfree = true; + }; +} |