Last active
February 16, 2019 13:22
-
-
Save LnL7/fcd5c0bf772f2165a1ac40be6617d2f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ...}: | |
with lib; | |
{ | |
nix.package = pkgs.nixUnstable; | |
nix.trustedUsers = [ "hydra" ]; | |
nix.binaryCaches = [ "http://cache.example.org" "https://cache.nixos.org" ]; | |
nix.buildMachines = [ | |
{ hostName = "localhost"; sshKey = "/var/run/keys/hydra_rsa"; system = "x86_64-linux,i686-linux"; maxJobs = 4; supportedFeatures = [ "builtin" "big-parallel" "kvm" ]; } | |
]; | |
services.nginx.enable = true; | |
services.nginx.recommendedGzipSettings = true; | |
services.nginx.recommendedOptimisation = true; | |
services.nginx.recommendedProxySettings = true; | |
services.nginx.virtualHosts = { | |
"cache.example.org".locations."/".root = "/var/lib/nix-cache"; | |
"hydra.example.org".locations."/".proxyPass = "http://127.0.0.1:60080"; | |
}; | |
services.hydra.enable = true; | |
services.hydra.hydraURL = "http://hydra.example.org"; | |
services.hydra.notificationSender = "[email protected]"; | |
services.hydra.port = 60080; | |
services.hydra.useSubstitutes = true; | |
# Look for nix-store --generate-binary-cache-key in the nix-store manpage | |
# for more information on how to generate a keypair for your cache. | |
services.hydra.extraConfig = '' | |
store_uri = file:///var/lib/nix-cache?secret-key=/run/keys/cache.example.org-1/sk | |
binary_cache_public_uri http://cache.example.org | |
''; | |
users.users.hydra.extraGroups = [ "keys" ]; | |
users.users.hydra-queue-runner.extraGroups = [ "keys" ]; | |
services.postgresql.enable = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment