Loading nixos/modules/services/misc/paperless.nix +5 −3 Original line number Diff line number Diff line Loading @@ -290,11 +290,12 @@ in '' + optionalString (cfg.passwordFile != null) '' export PAPERLESS_ADMIN_USER="''${PAPERLESS_ADMIN_USER:-admin}" export PAPERLESS_ADMIN_PASSWORD=$(cat $CREDENTIALS_DIRECTORY/PAPERLESS_ADMIN_PASSWORD) PAPERLESS_ADMIN_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PAPERLESS_ADMIN_PASSWORD") export PAPERLESS_ADMIN_PASSWORD superuserState="$PAPERLESS_ADMIN_USER:$PAPERLESS_ADMIN_PASSWORD" superuserStateFile="${cfg.dataDir}/superuser-state" if [[ $(cat "$superuserStateFile" 2>/dev/null) != $superuserState ]]; then if [[ $(cat "$superuserStateFile" 2>/dev/null) != "$superuserState" ]]; then ${cfg.package}/bin/paperless-ngx manage_superuser echo "$superuserState" > "$superuserStateFile" fi Loading Loading @@ -353,7 +354,8 @@ in tr -dc A-Za-z0-9 < /dev/urandom | head -c64 | ${pkgs.moreutils}/bin/sponge '${secretKeyFile}' ) fi export PAPERLESS_SECRET_KEY=$(cat '${secretKeyFile}') PAPERLESS_SECRET_KEY="$(cat '${secretKeyFile}')" export PAPERLESS_SECRET_KEY if [[ ! $PAPERLESS_SECRET_KEY ]]; then echo "PAPERLESS_SECRET_KEY is empty, refusing to start." exit 1 Loading Loading
nixos/modules/services/misc/paperless.nix +5 −3 Original line number Diff line number Diff line Loading @@ -290,11 +290,12 @@ in '' + optionalString (cfg.passwordFile != null) '' export PAPERLESS_ADMIN_USER="''${PAPERLESS_ADMIN_USER:-admin}" export PAPERLESS_ADMIN_PASSWORD=$(cat $CREDENTIALS_DIRECTORY/PAPERLESS_ADMIN_PASSWORD) PAPERLESS_ADMIN_PASSWORD=$(cat "$CREDENTIALS_DIRECTORY/PAPERLESS_ADMIN_PASSWORD") export PAPERLESS_ADMIN_PASSWORD superuserState="$PAPERLESS_ADMIN_USER:$PAPERLESS_ADMIN_PASSWORD" superuserStateFile="${cfg.dataDir}/superuser-state" if [[ $(cat "$superuserStateFile" 2>/dev/null) != $superuserState ]]; then if [[ $(cat "$superuserStateFile" 2>/dev/null) != "$superuserState" ]]; then ${cfg.package}/bin/paperless-ngx manage_superuser echo "$superuserState" > "$superuserStateFile" fi Loading Loading @@ -353,7 +354,8 @@ in tr -dc A-Za-z0-9 < /dev/urandom | head -c64 | ${pkgs.moreutils}/bin/sponge '${secretKeyFile}' ) fi export PAPERLESS_SECRET_KEY=$(cat '${secretKeyFile}') PAPERLESS_SECRET_KEY="$(cat '${secretKeyFile}')" export PAPERLESS_SECRET_KEY if [[ ! $PAPERLESS_SECRET_KEY ]]; then echo "PAPERLESS_SECRET_KEY is empty, refusing to start." exit 1 Loading