Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created June 21, 2017 13:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/1417a2108364335ff152aee7142308dd to your computer and use it in GitHub Desktop.
Save cleverca22/1417a2108364335ff152aee7142308dd to your computer and use it in GitHub Desktop.
{ pkgs, lib, ... }:
let
builders = import ./builders.nix;
hydraMaster = pkgs.hydra.overrideAttrs (old: {
src = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "hydra";
rev = "6e4a7a30f731c42e64e24ccbf8f25110c02776ab";
sha256 = "0j7s4slmwrmwywvfkxdpg4wgxnfqjzv9dzwvni2n21sbbwjyqgij";
};
});
in {
networking = {
defaultMailServer.directDelivery = true;
defaultMailServer.hostName = "c2d.localnet";
};
systemd.services.hydra-evaluator.path = [ pkgs.jq ];
services = {
postfix = {
enable = true;
relayHost = "c2d.localnet";
};
hydra = {
enable = true;
hydraURL = "https://hydra.angeldsis.com";
notificationSender = "cleverca22@gmail.com";
port = 3001;
listenHost = "localhost";
useSubstitutes = true;
extraConfig = ''
max-output-size = ${toString (1024*1024*1024*2)} # 2gig
<githubstatus>
jobs = iohk-auto:pr.*
inputs = jobsets
authorization = token EDITED
</githubstatus>
'';
package = hydraMaster;
};
nginx = {
enable = true;
virtualHosts = {
"hydra.angeldsis.com" = {
enableACME = true;
forceSSL = true;
locations."/".extraConfig = ''
proxy_pass http://localhost:3001;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
'';
};
};
};
};
programs.ssh.knownHosts = [
{ hostNames = [ "github.com" ]; publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="; }
];
nix = {
buildMachines = (with builders.x; [ amd darwin rpi2 ]) ++ builders."64bit";
binaryCaches = [ "https://hydra.iohk.io" ];
binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
extraOptions = ''
gc-keep-derivations = true
gc-keep-outputs = true
auto-optimise-store = true
'';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment