mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 21:33:11 +01:00
19 lines
420 B
Nix
19 lines
420 B
Nix
|
{config, ...}:
|
||
|
let
|
||
|
domain = "cache.rfive.de";
|
||
|
in
|
||
|
{
|
||
|
sops.secrets."nix-serve/secretkey" = {};
|
||
|
services.nix-serve = {
|
||
|
enable = true;
|
||
|
secretKeyFile = config.sops.secrets."nix-serve/secretkey".path;
|
||
|
};
|
||
|
services.nginx.virtualHosts."${domain}" = {
|
||
|
enableACME = true;
|
||
|
forceSSL = true;
|
||
|
locations."/" = {
|
||
|
proxyPass = "http://127.0.0.1:${toString config.services.nix-serve.port}";
|
||
|
};
|
||
|
};
|
||
|
}
|