add paperless.nix

This commit is contained in:
Ingolf Wagner 2024-03-04 19:05:30 +01:00
parent 6e39450295
commit 7d6f0bd007
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
3 changed files with 18 additions and 0 deletions

View file

@ -47,6 +47,7 @@ let
"tdarr.chungus" = hosts.chungus;
"trilium.chungus" = hosts.chungus;
"tts.chungus" = hosts.chungus;
"paperless.chungus" = hosts.chungus;
# cream
"trilium.cream" = hosts.cream;
};

View file

@ -62,6 +62,8 @@
./docker-registry.nix
./paperless.nix
];
components.gui.enable = false;

View file

@ -0,0 +1,15 @@
{ config, ... }: {
services.paperless = {
enable = true;
};
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;
};
};
}