❄️ Nix configurations
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add paperless

A.Ottr c6e3d0c1 c4957162

+57
+6
nixos/common/postgres.nix
··· 1 + { pkgs, config, ... }: 2 + 3 + { 4 + services.postgresql.enable = true; 5 + services.postgresqlBackup.enable = true; 6 + }
+2
nixos/ferret/default.nix
··· 4 4 imports = [ 5 5 ./configuration.nix 6 6 ./hardware-configuration.nix 7 + ../common/postgres.nix 7 8 ./media.nix 8 9 ./caddy.nix 10 + ./paperless.nix 9 11 ]; 10 12 11 13 security.polkit.enable = true;
+41
nixos/ferret/paperless.nix
··· 1 + {config, ...}: 2 + let 3 + certloc = "/var/lib/acme/ferret.otter.place"; 4 + in { 5 + 6 + age.secrets.paperless-password.file = ../../secrets/eclipse/paperless-password.age; 7 + 8 + services.postgresql = { 9 + ensureDatabases = [config.services.paperless.user]; 10 + ensureUsers = [ 11 + { 12 + name = config.services.paperless.user; 13 + ensureDBOwnership = true; 14 + } 15 + ]; 16 + }; 17 + 18 + services.paperless = { 19 + enable = true; 20 + 21 + passwordFile = config.age.secrets.paperless-password.path; 22 + settings = { 23 + PAPERLESS_DBHOST = "/run/postgresql"; 24 + PAPERLESS_TIME_ZONE = config.time.timeZone; 25 + PAPERLESS_OCR_LANGUAGE = "deu+eng+fr"; 26 + PAPERLESS_ADMIN_USER = "alex"; 27 + PAPERLESS_URL = "https://paperless.ferret.otter.place"; 28 + }; 29 + }; 30 + 31 + # SSL config 32 + services.caddy = { 33 + virtualHosts."paperless.ferret.otter.place".extraConfig = '' 34 + reverse_proxy http://localhost:${toString config.services.paperless.port} 35 + 36 + tls ${certloc}/cert.pem ${certloc}/key.pem { 37 + protocols tls1.3 38 + } 39 + ''; 40 + }; 41 + }
+7
secrets/paperless-password.age
··· 1 + age-encryption.org/v1 2 + -> ssh-ed25519 eJaLeQ 2D7xouv6vZldW1jCJUAOBtLn1eduBTx/nWwykvekyRc 3 + 3qa/nT/PiYgVrKJtX24pjFtdCTs5mSlkTeKrBbIbZ+0 4 + -> ssh-ed25519 PCx17Q YMBRYGcyTBtX4mV2ZgnGpMdn7hsws9X9OpsFD5ElCB4 5 + 44HCFrbFDsc247ZIUcMdlP2CwEv45bTzS/FfDk8yNx4 6 + --- kGfSmbGFNWOaXHlIPL8+5z++FF1g3IXmXM8Q5iuUMXE 7 + �E��N��JjR~u<��(Y��I ���T���UJlR�M��BdDE�]^DNY%�
+1
secrets/secrets.nix
··· 7 7 in 8 8 { 9 9 "caddy.age".publicKeys = [ alex ferret ]; 10 + "paperless-password.age".publicKeys = [ alex ferret ]; 10 11 }