nixos-config/nixos/machines/chungus/paperless.nix

21 lines
506 B
Nix
Raw Normal View History

2024-03-04 19:05:30 +01:00
{ config, ... }: {
2024-03-06 13:22:22 +01:00
2024-03-04 19:05:30 +01:00
services.paperless = {
enable = true;
2024-03-09 16:50:33 +01:00
address = "0.0.0.0";
2024-03-04 19:05:30 +01:00
};
2024-03-06 13:22:22 +01:00
networking.firewall.interfaces.wg0.allowedTCPPorts = [ config.services.paperless.port ];
2024-03-04 19:05:30 +01:00
services.nginx.virtualHosts."paperless.${config.networking.hostName}.private" = {
extraConfig = ''
allow ${config.tinc.private.subnet};
deny all;
'';
locations."/" = {
proxyPass = "http://localhost:${toString config.services.paperless.port}";
proxyWebsockets = true;
};
};
}