summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2017-05-13 21:28:20 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2017-05-13 21:28:20 -0400
commit0513b78160a437f66e5d852c4a9a69193f59b98a (patch)
tree0a3850966dce1f2eba81639e1f092c49210e2672
parentaff51e2be25a9fd6920d0595470494c2a148b45b (diff)
Add hydra service.
-rw-r--r--config/common.nix11
-rw-r--r--config/hydra.nix31
-rw-r--r--data/aliases.nix8
3 files changed, 47 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;
+ };
+}
diff --git a/data/aliases.nix b/data/aliases.nix
new file mode 100644
index 0000000..1240722
--- /dev/null
+++ b/data/aliases.nix
@@ -0,0 +1,8 @@
+{
+ ip = {
+ shape = 10.0.20.15;
+ };
+ services = {
+ hydra = { address = ip.shape; port = 11101; };
+ };
+}