diff --git a/SwarselSystems.org b/SwarselSystems.org index 41cc73f..7bff01f 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -7528,39 +7528,58 @@ Here we just define some aliases for rebuilding the system, and we allow some in }; }; - services.paperless = { - enable = true; - mediaDir = "/Vault/Eternor/Paperless"; - dataDir = "/Vault/data/paperless"; - user = "paperless"; - port = 28981; - passwordFile = config.sops.secrets.paperless_admin.path; - address = "127.0.0.1"; - settings = { - PAPERLESS_OCR_LANGUAGE = "deu+eng"; - PAPERLESS_URL = "https://scan.swarsel.win"; - PAPERLESS_OCR_USER_ARGS = builtins.toJSON { - optimize = 1; - invalidate_digital_signatures = true; - pdfa_image_compression = "lossless"; - }; - PAPERLESS_APPS = "allauth.socialaccount.providers.openid_connect"; - PAPERLESS_SOCIALACCOUNT_PROVIDERS = builtins.toJSON { - openid_connect = { - OAUTH_PKCE_ENABLED = "True"; - APPS = [ - rec { - provider_id = "kanidm"; - name = "Kanidm"; - client_id = "paperless"; - # secret will be added dynamically - #secret = ""; - settings.server_url = "https://sso.swarsel.win/oauth2/openid/${client_id}/.well-known/openid-configuration"; - } - ]; + services = { + paperless = { + enable = true; + mediaDir = "/Vault/Eternor/Paperless"; + dataDir = "/Vault/data/paperless"; + user = "paperless"; + port = 28981; + passwordFile = config.sops.secrets.paperless_admin.path; + address = "127.0.0.1"; + settings = { + PAPERLESS_OCR_LANGUAGE = "deu+eng"; + PAPERLESS_URL = "https://scan.swarsel.win"; + PAPERLESS_OCR_USER_ARGS = builtins.toJSON { + optimize = 1; + invalidate_digital_signatures = true; + pdfa_image_compression = "lossless"; + }; + PAPERLESS_TIKA_ENABLED = "true"; + PAPERLESS_TIKA_ENDPOINT = "http://localhost:9998"; + PAPERLESS_TIKA_GOTENBERG_ENDPOINT = "http://localhost:3001"; + PAPERLESS_APPS = "allauth.socialaccount.providers.openid_connect"; + PAPERLESS_SOCIALACCOUNT_PROVIDERS = builtins.toJSON { + openid_connect = { + OAUTH_PKCE_ENABLED = "True"; + APPS = [ + rec { + provider_id = "kanidm"; + name = "Kanidm"; + client_id = "paperless"; + # secret will be added dynamically + #secret = ""; + settings.server_url = "https://sso.swarsel.win/oauth2/openid/${client_id}/.well-known/openid-configuration"; + } + ]; + }; }; }; }; + + tika = { + enable = true; + port = 9998; + openFirewall = false; + listenAddress = "127.0.0.1"; + enableOcr = true; + }; + + gotenberg = { + enable = true; + port = 3001; + bindIP = "127.0.0.1"; + }; }; # Add secret to PAPERLESS_SOCIALACCOUNT_PROVIDERS diff --git a/index.html b/index.html index e2b647c..c5866e6 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configuration @@ -263,9 +263,9 @@
  • 3.1.4.3. Home-manager only (default non-NixOS)
  • 3.1.4.4. ChaosTheatre (Demo Physical/VM)
  • @@ -305,7 +305,7 @@
  • 3.2.1.27. fhs
  • 3.2.1.28. swarsel-displaypower
  • 3.2.1.29. swarsel-mgba
  • -
  • 3.2.1.30. sshrm
  • +
  • 3.2.1.30. sshrm
  • 3.2.2. Overlays (additions, overrides, nixpkgs-stable)
  • @@ -313,28 +313,28 @@ @@ -379,7 +379,7 @@
  • 3.3.1.22.3. enable GVfs
  • 3.3.1.22.4. interception-tools: Make CAPS work as ESC/CTRL
  • 3.3.1.22.5. power-profiles-daemon
  • -
  • 3.3.1.22.6. SwayOSD
  • +
  • 3.3.1.22.6. SwayOSD
  • 3.3.1.23. Hardware compatibility settings (Yubikey, Ledger, Keyboards) - udev rules @@ -431,7 +431,7 @@
  • 3.3.2.24. FreshRSS
  • 3.3.2.25. forgejo (git server)
  • 3.3.2.26. Anki Sync Server
  • -
  • 3.3.2.27. kanidm
  • +
  • 3.3.2.27. kanidm
  • 3.3.3. Darwin @@ -446,11 +446,11 @@
  • 3.3.4.3. VmWare
  • 3.3.4.4. Auto-login
  • 3.3.4.5. nswitch-rcm
  • -
  • 3.3.4.6. Framework
  • -
  • 3.3.4.7. AMD CPU
  • -
  • 3.3.4.8. AMD GPU
  • -
  • 3.3.4.9. Hibernation
  • -
  • 3.3.4.10. BTRFS
  • +
  • 3.3.4.6. Framework
  • +
  • 3.3.4.7. AMD CPU
  • +
  • 3.3.4.8. AMD GPU
  • +
  • 3.3.4.9. Hibernation
  • +
  • 3.3.4.10. BTRFS
  • 3.3.4.11. work
  • 3.3.4.12. Minimal Install
  • @@ -499,7 +499,7 @@
  • 3.4.1.29.1. gnome-keyring
  • 3.4.1.29.2. KDE Connect
  • 3.4.1.29.3. Mako
  • -
  • 3.4.1.29.4. SwayOSD
  • +
  • 3.4.1.29.4. SwayOSD
  • 3.4.1.29.5. yubikey-touch-detector
  • @@ -524,7 +524,7 @@ @@ -702,7 +702,7 @@ @@ -711,7 +711,7 @@

    -This file has 64040 words spanning 16886 lines and was last revised on 2025-06-09 17:08:15 +0200. +This file has 64081 words spanning 16905 lines and was last revised on 2025-06-09 17:22:28 +0200.

    @@ -764,7 +764,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry

    -My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2025-06-09 17:08:15 +0200) +My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2025-06-09 17:22:28 +0200)

    @@ -2881,8 +2881,8 @@ This is just a demo host. It applies all the configuration found in the common p I also set the WLR_RENDERER_ALLOW_SOFTWARE=1 to allow this configuration to run in a virtualized environment. I also enable qemuGuest for a smoother experience when testing on QEMU.

    -
    -
    3.1.4.4.1. Main configuration
    +
    +
    3.1.4.4.1. Main configuration
    { self, inputs, config, pkgs, lib, primaryUser, ... }:
    @@ -2961,8 +2961,8 @@ in
     
    -
    -
    3.1.4.4.2. NixOS dummy options configuration
    +
    +
    3.1.4.4.2. NixOS dummy options configuration
    _:
    @@ -2972,8 +2972,8 @@ in
     
    -
    -
    3.1.4.4.3. home-manager dummy options configuration
    +
    +
    3.1.4.4.3. home-manager dummy options configuration
    _:
    @@ -4754,8 +4754,8 @@ appimageTools.wrapType2 {
     
    -
    -
    3.2.1.30. sshrm
    +
    +
    3.2.1.30. sshrm

    This programs simply runs ssh-keygen on the last host that I tried to ssh into. I need this frequently when working with cloud-init usually. @@ -4912,8 +4912,8 @@ in

    -
    -
    3.2.3.1.1. Personal
    +
    +
    3.2.3.1.1. Personal
    { lib, config, ... }:
    @@ -4980,8 +4980,8 @@ in
     
    -
    -
    3.2.3.1.2. Chaostheatre
    +
    +
    3.2.3.1.2. Chaostheatre
    { lib, config, ... }:
    @@ -5045,8 +5045,8 @@ in
     
    -
    -
    3.2.3.1.3. toto
    +
    +
    3.2.3.1.3. toto
    { lib, config, ... }:
    @@ -5078,8 +5078,8 @@ in
     
    -
    -
    3.2.3.1.4. Work
    +
    +
    3.2.3.1.4. Work
    { lib, config, ... }:
    @@ -5100,8 +5100,8 @@ in
     
    -
    -
    3.2.3.1.5. Framework
    +
    +
    3.2.3.1.5. Framework
    { lib, config, ... }:
    @@ -5122,8 +5122,8 @@ in
     
    -
    -
    3.2.3.1.6. AMD CPU
    +
    +
    3.2.3.1.6. AMD CPU
    { lib, config, ... }:
    @@ -5144,8 +5144,8 @@ in
     
    -
    -
    3.2.3.1.7. AMD GPU
    +
    +
    3.2.3.1.7. AMD GPU
    { lib, config, ... }:
    @@ -5166,8 +5166,8 @@ in
     
    -
    -
    3.2.3.1.8. Hibernation
    +
    +
    3.2.3.1.8. Hibernation
    { lib, config, ... }:
    @@ -5188,8 +5188,8 @@ in
     
    -
    -
    3.2.3.1.9. BTRFS
    +
    +
    3.2.3.1.9. BTRFS
    { lib, config, ... }:
    @@ -5210,8 +5210,8 @@ in
     
    -
    -
    3.2.3.1.10. Local Server
    +
    +
    3.2.3.1.10. Local Server
    { lib, config, ... }:
    @@ -5264,8 +5264,8 @@ in
     
    -
    -
    3.2.3.1.11. OCI Sync Server
    +
    +
    3.2.3.1.11. OCI Sync Server
    { lib, config, ... }:
    @@ -5322,8 +5322,8 @@ in
     
    -
    -
    3.2.3.2.1. Personal
    +
    +
    3.2.3.2.1. Personal
    { lib, config, ... }:
    @@ -5380,8 +5380,8 @@ in
     
    -
    -
    3.2.3.2.2. Chaostheatre
    +
    +
    3.2.3.2.2. Chaostheatre
    { lib, config, ... }:
    @@ -5433,8 +5433,8 @@ in
     
    -
    -
    3.2.3.2.3. toto
    +
    +
    3.2.3.2.3. toto
    { lib, config, ... }:
    @@ -5454,8 +5454,8 @@ in
     
    -
    -
    3.2.3.2.4. Work
    +
    +
    3.2.3.2.4. Work
    { lib, config, ... }:
    @@ -5475,8 +5475,8 @@ in
     
    -
    -
    3.2.3.2.5. Framework
    +
    +
    3.2.3.2.5. Framework
    { lib, config, ... }:
    @@ -5497,8 +5497,8 @@ in
     
    -
    -
    3.2.3.2.6. Darwin
    +
    +
    3.2.3.2.6. Darwin
    { lib, config, ... }:
    @@ -5516,8 +5516,8 @@ in
     
    -
    -
    3.2.3.2.7. Local Server
    +
    +
    3.2.3.2.7. Local Server
    { lib, config, ... }:
    @@ -7050,8 +7050,8 @@ Most of the time I am using power-saver, however, it is good to be
     
    -
    -
    3.3.1.22.6. SwayOSD
    +
    +
    3.3.1.22.6. SwayOSD
    { lib, pkgs, config, ... }:
    @@ -8819,39 +8819,58 @@ in
           };
         };
     
    -    services.paperless = {
    -      enable = true;
    -      mediaDir = "/Vault/Eternor/Paperless";
    -      dataDir = "/Vault/data/paperless";
    -      user = "paperless";
    -      port = 28981;
    -      passwordFile = config.sops.secrets.paperless_admin.path;
    -      address = "127.0.0.1";
    -      settings = {
    -        PAPERLESS_OCR_LANGUAGE = "deu+eng";
    -        PAPERLESS_URL = "https://scan.swarsel.win";
    -        PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
    -          optimize = 1;
    -          invalidate_digital_signatures = true;
    -          pdfa_image_compression = "lossless";
    -        };
    -        PAPERLESS_APPS = "allauth.socialaccount.providers.openid_connect";
    -        PAPERLESS_SOCIALACCOUNT_PROVIDERS = builtins.toJSON {
    -          openid_connect = {
    -            OAUTH_PKCE_ENABLED = "True";
    -            APPS = [
    -              rec {
    -                provider_id = "kanidm";
    -                name = "Kanidm";
    -                client_id = "paperless";
    -                # secret will be added dynamically
    -                #secret = "";
    -                settings.server_url = "https://sso.swarsel.win/oauth2/openid/${client_id}/.well-known/openid-configuration";
    -              }
    -            ];
    +    services = {
    +      paperless = {
    +        enable = true;
    +        mediaDir = "/Vault/Eternor/Paperless";
    +        dataDir = "/Vault/data/paperless";
    +        user = "paperless";
    +        port = 28981;
    +        passwordFile = config.sops.secrets.paperless_admin.path;
    +        address = "127.0.0.1";
    +        settings = {
    +          PAPERLESS_OCR_LANGUAGE = "deu+eng";
    +          PAPERLESS_URL = "https://scan.swarsel.win";
    +          PAPERLESS_OCR_USER_ARGS = builtins.toJSON {
    +            optimize = 1;
    +            invalidate_digital_signatures = true;
    +            pdfa_image_compression = "lossless";
    +          };
    +          PAPERLESS_TIKA_ENABLED = "true";
    +          PAPERLESS_TIKA_ENDPOINT = "http://localhost:9998";
    +          PAPERLESS_TIKA_GOTENBERG_ENDPOINT = "http://localhost:3001";
    +          PAPERLESS_APPS = "allauth.socialaccount.providers.openid_connect";
    +          PAPERLESS_SOCIALACCOUNT_PROVIDERS = builtins.toJSON {
    +            openid_connect = {
    +              OAUTH_PKCE_ENABLED = "True";
    +              APPS = [
    +                rec {
    +                  provider_id = "kanidm";
    +                  name = "Kanidm";
    +                  client_id = "paperless";
    +                  # secret will be added dynamically
    +                  #secret = "";
    +                  settings.server_url = "https://sso.swarsel.win/oauth2/openid/${client_id}/.well-known/openid-configuration";
    +                }
    +              ];
    +            };
               };
             };
           };
    +
    +      tika = {
    +        enable = true;
    +        port = 9998;
    +        openFirewall = false;
    +        listenAddress = "127.0.0.1";
    +        enableOcr = true;
    +      };
    +
    +      gotenberg = {
    +        enable = true;
    +        port = 3001;
    +        bindIP = "127.0.0.1";
    +      };
         };
     
         # Add secret to PAPERLESS_SOCIALACCOUNT_PROVIDERS
    @@ -9759,8 +9778,8 @@ in
     
    -
    -
    3.3.2.27. kanidm
    +
    +
    3.3.2.27. kanidm
    { self, lib, pkgs, config, ... }:
    @@ -10149,8 +10168,8 @@ This smashes Atmosphere 1.3.2 on the switch, which is what I am currenty using.
     
    -
    -
    3.3.4.6. Framework
    +
    +
    3.3.4.6. Framework

    This holds configuration that is specific to framework laptops. @@ -10188,8 +10207,8 @@ This holds configuration that is specific to framework laptops.

    -
    -
    3.3.4.7. AMD CPU
    +
    +
    3.3.4.7. AMD CPU
    { lib, config, ... }:
    @@ -10205,8 +10224,8 @@ This holds configuration that is specific to framework laptops.
     
    -
    -
    3.3.4.8. AMD GPU
    +
    +
    3.3.4.8. AMD GPU
    { lib, config, ... }:
    @@ -10228,8 +10247,8 @@ This holds configuration that is specific to framework laptops.
     
    -
    -
    3.3.4.9. Hibernation
    +
    +
    3.3.4.9. Hibernation
    { lib, config, ... }:
    @@ -10260,8 +10279,8 @@ This holds configuration that is specific to framework laptops.
     
    -
    -
    3.3.4.10. BTRFS
    +
    +
    3.3.4.10. BTRFS
    { lib, config, ... }:
    @@ -13209,8 +13228,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.4.1.29.4. SwayOSD
    +
    +
    3.4.1.29.4. SwayOSD
    { lib, config, ... }:
    @@ -14459,8 +14478,8 @@ in
     
    -
    -
    3.4.4.3. Framework
    +
    +
    3.4.4.3. Framework

    This holds configuration that is specific to framework laptops. @@ -18300,8 +18319,8 @@ autocmd DocStart vc-impimba-1.m.imp.ac.at/ui/webconsole mode ignore

    -
    -

    6.3. tridactyl theme

    +
    +

    6.3. tridactyl theme

    @@ -18798,7 +18817,7 @@ sync USER HOST:
     

    Author: Leon Schwarzäugl

    -

    Created: 2025-06-09 Mo 17:08

    +

    Created: 2025-06-09 Mo 17:22

    Validate

    diff --git a/modules/nixos/server/paperless.nix b/modules/nixos/server/paperless.nix index 9b00db2..0ac2d54 100644 --- a/modules/nixos/server/paperless.nix +++ b/modules/nixos/server/paperless.nix @@ -16,39 +16,58 @@ }; }; - services.paperless = { - enable = true; - mediaDir = "/Vault/Eternor/Paperless"; - dataDir = "/Vault/data/paperless"; - user = "paperless"; - port = 28981; - passwordFile = config.sops.secrets.paperless_admin.path; - address = "127.0.0.1"; - settings = { - PAPERLESS_OCR_LANGUAGE = "deu+eng"; - PAPERLESS_URL = "https://scan.swarsel.win"; - PAPERLESS_OCR_USER_ARGS = builtins.toJSON { - optimize = 1; - invalidate_digital_signatures = true; - pdfa_image_compression = "lossless"; - }; - PAPERLESS_APPS = "allauth.socialaccount.providers.openid_connect"; - PAPERLESS_SOCIALACCOUNT_PROVIDERS = builtins.toJSON { - openid_connect = { - OAUTH_PKCE_ENABLED = "True"; - APPS = [ - rec { - provider_id = "kanidm"; - name = "Kanidm"; - client_id = "paperless"; - # secret will be added dynamically - #secret = ""; - settings.server_url = "https://sso.swarsel.win/oauth2/openid/${client_id}/.well-known/openid-configuration"; - } - ]; + services = { + paperless = { + enable = true; + mediaDir = "/Vault/Eternor/Paperless"; + dataDir = "/Vault/data/paperless"; + user = "paperless"; + port = 28981; + passwordFile = config.sops.secrets.paperless_admin.path; + address = "127.0.0.1"; + settings = { + PAPERLESS_OCR_LANGUAGE = "deu+eng"; + PAPERLESS_URL = "https://scan.swarsel.win"; + PAPERLESS_OCR_USER_ARGS = builtins.toJSON { + optimize = 1; + invalidate_digital_signatures = true; + pdfa_image_compression = "lossless"; + }; + PAPERLESS_TIKA_ENABLED = "true"; + PAPERLESS_TIKA_ENDPOINT = "http://localhost:9998"; + PAPERLESS_TIKA_GOTENBERG_ENDPOINT = "http://localhost:3001"; + PAPERLESS_APPS = "allauth.socialaccount.providers.openid_connect"; + PAPERLESS_SOCIALACCOUNT_PROVIDERS = builtins.toJSON { + openid_connect = { + OAUTH_PKCE_ENABLED = "True"; + APPS = [ + rec { + provider_id = "kanidm"; + name = "Kanidm"; + client_id = "paperless"; + # secret will be added dynamically + #secret = ""; + settings.server_url = "https://sso.swarsel.win/oauth2/openid/${client_id}/.well-known/openid-configuration"; + } + ]; + }; }; }; }; + + tika = { + enable = true; + port = 9998; + openFirewall = false; + listenAddress = "127.0.0.1"; + enableOcr = true; + }; + + gotenberg = { + enable = true; + port = 3001; + bindIP = "127.0.0.1"; + }; }; # Add secret to PAPERLESS_SOCIALACCOUNT_PROVIDERS