paperless: move role to smrk and simplify a backup schedule can be created in the vpsfree admin interface
6 files changed, 6 insertions(+), 53 deletions(-)
D secrets/cifs-paperless.age
@@ -1,7 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 cvV2sw AmEZW9oxZsy8NevCaAgi9wH5JkvtSa9BMnRv/bauRBI -8oVfxsIbEreiX3lDUGOddmv0kd22BlNDom9ZnZ3TqOM --> piv-p256 VBDKjg Ak/aojUXjh8AGr3ZwrZdApTntjdTFtNrCEmPQt8H2KLs -LI3btuEU8YU7NpgaiWVWFta/w+UY5BYZ/BKgYN83cFw ---- vj13GwFh6z96qDheox5jcV9zEBpvM2Ta8IS32Wtmxcw - ó¥p¤[úï6Ùzqx,ÚÕ‹!¡ƒ® #hæ¢ÚÂôpl—ûð4c3ÑLÁàôÆ6ÑJ5…‘±e ”ݳ›ÛR:gZpˆ…RWÆ Qµ,e˜
M secrets/secrets.nix → secrets/secrets.nix
@@ -26,9 +26,8 @@ smrk ]; pocket-id = [ smrk ]; binarycache = [ smrk ]; - paperless = [ linde ]; + paperless = [ smrk ]; powerdns = [ smrk ]; - cifs-paperless = [ linde ]; cifs-transmission = [ linde ]; cifs-jellyfin = [ linde ]; ntfy = [ smrk ];
M system/hosts/linde.nix → system/hosts/linde.nix
@@ -31,7 +31,6 @@ ../roles/server.nix ../roles/reverse-proxy.nix ../roles/forgejo-runner.nix ../roles/nix-remote-builder.nix - ../roles/paperless.nix ../roles/searchix.nix ../roles/subdomain-redirector.nix ../roles/video-library.nix
M system/hosts/smrk.nix → system/hosts/smrk.nix
@@ -25,6 +25,7 @@ ../roles/nix-remote-builder.nix ../roles/push-notifications.nix ../roles/readeck.nix ../roles/redis-website.nix + ../roles/paperless.nix ../roles/searchix.nix ../roles/sso.nix ];
M system/roles/paperless.nix → system/roles/paperless.nix
@@ -1,17 +1,13 @@ { config, - lib, - pkgs, ... }: let cfg = config.services.paperless; - hostname = config.networking.hostName; ts-domain = "fin-marlin.ts.net"; in { age.secrets = { - cifs-paperless.file = ../../secrets/cifs-paperless.age; paperless = { file = ../../secrets/paperless.age; path = "${cfg.dataDir}/nixos-paperless-secret-key";@@ -22,30 +18,11 @@ }; }; fileSystems."/srv/paperless" = { - device = "//u439959-sub3.your-storagebox.de/u439959-sub3"; - fsType = "smb3"; - options = - let - # prevents hanging on network split - automount_opts = [ - "x-systemd.automount" - "noauto" - "x-systemd.mount-timeout=5s" - ]; - uid = config.ids.uids.paperless; - in - automount_opts - ++ [ - "credentials=${config.age.secrets.cifs-paperless.path}" - "seal" - "multichannel" - "nobrl" # needed for sqlite - "forceuid" - "forcegid" - "uid=${toString uid}" - "gid=${toString uid}" - ]; + device = "172.16.128.114:/nas/6567/paperless"; + fsType = "nfs"; + options = [ "nofail" ]; }; + services.paperless = { enable = true; address = "::1";@@ -103,20 +80,4 @@ users.groups.paperless.members = [ "alin" "syncthing" ]; - - systemd.services.backup-paperless = { - startAt = "daily"; - path = with pkgs; [ - openssh - ]; - serviceConfig = { - Type = "oneshot"; - WorkingDirectory = config.services.paperless.dataDir; - ExecStart = [ - "systemd-run --machine=papers sudo -u paperless ./paperless-manage document_exporter --delete --use-filename-format --no-archive --no-thumbnail --no-progress-bar ./export " - "${lib.getExe pkgs.rdiff-backup} --api-version 201 backup /srv/paperless/export ${hostname}@r5.${ts-domain}::paperless" - ]; - ExecStartPost = "-${lib.getExe pkgs.rdiff-backup} --api-version 201 remove increments --older-than 3M ${hostname}@r5.${ts-domain}::paperless"; - }; - }; }