stockholm/makefu/2configs/binary-cache/server.nix

25 lines
615 B
Nix
Raw Normal View History

2018-08-06 14:30:09 +00:00
{ config, lib, pkgs, ...}:
{
# generate private key with:
# nix-store --generate-binary-cache-key gum nix-serve.key nix-serve.pub
services.nix-serve = {
enable = true;
port = 5001;
secretKeyFile = toString <secrets> + "/nix-serve.key";
2018-08-06 14:30:09 +00:00
};
services.nginx = {
enable = true;
2019-04-18 06:32:33 +00:00
virtualHosts."cache.euer.krebsco.de" = {
forceSSL = true;
enableACME = true;
serverAliases = [ # "cache.gum.r"
2018-08-06 14:30:09 +00:00
"cache.gum.krebsco.de"
];
locations."/".proxyPass= "http://localhost:${toString config.services.nix-serve.port}";
};
};
}