Skip to content

Commit

Permalink
nixos/paperless: NixOS#242084 follow up to fix defaultText's
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Jan 15, 2025
1 parent fde4c4a commit 2fa918d
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions nixos/modules/services/misc/paperless.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, options, pkgs, lib, ... }:
{ config, pkgs, lib, ... }:
let
cfg = config.services.paperless;

Expand Down Expand Up @@ -259,7 +259,7 @@ in
directory = lib.mkOption {
type = lib.types.str;
default = cfg.dataDir + "/export";
defaultText = "\${dataDir}/export";
defaultText = lib.literalExpression "$''{config.services.paperless.dataDir}/export";
description = "Directory to store export.";
};

Expand All @@ -276,11 +276,11 @@ in

settings = lib.mkOption {
type = with lib.types; attrsOf anything;
default = {
"no-progress-bar" = true;
"no-color" = true;
"compare-checksums" = true;
"delete" = true;
defaultText = {
no-progress-bar = true;
no-color = true;
compare-checksums = true;
delete = true;
};
description = "Settings to pass to the document exporter as CLI arguments.";
};
Expand Down Expand Up @@ -479,7 +479,12 @@ in
"d '${cfg.exporter.directory}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
];

services.paperless.exporter.settings = options.services.paperless.exporter.settings.default;
services.paperless.exporter.settings = {
"no-progress-bar" = true;
"no-color" = true;
"compare-checksums" = true;
"delete" = true;
};

systemd.services.paperless-exporter = {
startAt = lib.defaultTo [] cfg.exporter.onCalendar;
Expand Down

0 comments on commit 2fa918d

Please sign in to comment.