add binary-cache and nginx
This commit is contained in:
parent
3b2663f64d
commit
defb1afda8
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.nix-serve;
|
||||
in
|
||||
with lib; {
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
nix-serve = {
|
||||
secretKeyFile = "/var/cache-priv-key.pem";
|
||||
};
|
||||
nginx = {
|
||||
virtualHosts = {
|
||||
# ... existing hosts config etc. ...
|
||||
"binarycache.odie.intranet" = {
|
||||
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./nginx
|
||||
./binary-cache
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{config,lib}: with lib; mkIf config.services.nginx.enable {
|
||||
services.nginx = {
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue