anchor.diff:  with lib;
   let
     cfg = config.services.paperless;
  +  pkg = cfg.package;
   
     defaultUser = "paperless";
   
  
positive.code:         superuserStateFile="${cfg.dataDir}/superuser-state"
  
          if [[ $(cat "$superuserStateFile" 2>/dev/null) != $superuserState ]]; then
            ${cfg.package}/bin/paperless-ngx manage_superuser
            echo "$superuserState" > "$superuserStateFile"
          fi
        '';
  
negative.code:         CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
        };
        environment = env // {
          PATH = mkForce pkg.path;
          PYTHONPATH = "${pkg.pythonPath}:${pkg}/lib/paperless-ngx/src";
        };
        # Allow the web interface to access the private /tmp directory of the server.
        # This is required to support uploading files via the web interface.
  