Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/hydra
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d0b972bdd015
Choose a base ref
...
head repository: NixOS/hydra
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 80738fadb132
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Oct 4, 2019

  1. Add hydraProxy module

    edolstra committed Oct 4, 2019
    Copy the full SHA
    80738fa View commit details
Showing with 26 additions and 24 deletions.
  1. +26 −24 flake.nix
50 changes: 26 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

edition = 201909;

inputs.nixpkgs.uri = "nixpkgs/release-19.09";
inputs.nixpkgs.uri = "nixpkgs/release-19.03";

outputs = { self, nixpkgs, nix }:
let
@@ -295,42 +295,44 @@
# The following is to work around the following error from hydra-server:
# [error] Caught exception in engine "Cannot determine local time zone"
time.timeZone = "UTC";

nix.extraOptions = ''
allowed-uris = https://github.com/
'';
};

nixosModules.hydraProxy = {
services.httpd = {
enable = true;
adminAddr = "hydra-admin@example.org";
extraConfig = ''
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /apache-errors !
ErrorDocument 503 /apache-errors/503.html
ProxyPass / http://127.0.0.1:3000/ retry=5 disablereuse=on
ProxyPassReverse / http://127.0.0.1:3000/
'';
};
};

nixosConfigurations.container = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[ { imports = [ self.nixosModules.hydraTest ];
[ { imports = [ self.nixosModules.hydraTest self.nixosModules.hydraProxy ];
system.configurationRevision = self.rev;

boot.isContainer = true;
networking.useDHCP = false;
networking.firewall.allowedTCPPorts = [ 80 ];
networking.hostName = "hydra";

nix.extraOptions = ''
allowed-uris = https://github.com/
'';

services.hydra-dev.useSubstitutes = true;

services.httpd = {
enable = true;
adminAddr = "hydra-admin@example.org";
extraConfig = ''
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /apache-errors !
ErrorDocument 503 /apache-errors/503.html
ProxyPass / http://127.0.0.1:3000/ retry=5 disablereuse=on
ProxyPassReverse / http://127.0.0.1:3000/
'';
};
}
];
};