forked from lix-project/hydra
Add hydraProxy module
This commit is contained in:
parent
d0b972bdd0
commit
80738fadb1
32
flake.nix
32
flake.nix
|
@ -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,25 +295,13 @@
|
|||
# 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";
|
||||
};
|
||||
|
||||
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[ { imports = [ self.nixosModules.hydraTest ];
|
||||
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;
|
||||
|
||||
nixosModules.hydraProxy = {
|
||||
services.httpd = {
|
||||
enable = true;
|
||||
adminAddr = "hydra-admin@example.org";
|
||||
|
@ -331,6 +319,20 @@
|
|||
ProxyPassReverse / http://127.0.0.1:3000/
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[ { imports = [ self.nixosModules.hydraTest self.nixosModules.hydraProxy ];
|
||||
system.configurationRevision = self.rev;
|
||||
|
||||
boot.isContainer = true;
|
||||
networking.useDHCP = false;
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
networking.hostName = "hydra";
|
||||
|
||||
services.hydra-dev.useSubstitutes = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue