nixos-config/hosts/nuc/modules/cache/default.nix

17 lines
368 B
Nix
Raw Normal View History

2024-01-04 00:13:46 +01:00
{ 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;
};
2024-05-21 18:44:04 +02:00
services.caddy.virtualHosts."${domain}".extraConfig = ''
reverse_proxy 127.0.0.1:${toString config.services.nix-serve.port}
'';
2024-01-04 00:13:46 +01:00
}