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