diff --git a/modules/core/networking.nix b/modules/core/networking.nix index 00c7d2a9..ddd41b86 100644 --- a/modules/core/networking.nix +++ b/modules/core/networking.nix @@ -60,12 +60,12 @@ in { # Caddy reverse proxy for local services like cups services.caddy = { - enable = lib.mkDefault cfg.enableCaddy; - globalConfig = lib.mkDefault '' + enable = cfg.enableCaddy; + globalConfig = '' default_bind 127.0.0.1 auto_https off ''; - extraConfig = lib.mkDefault (concatStringsSep "\n" [ + extraConfig = (concatStringsSep "\n" [ (lib.optionalString config.pub-solar.printing.enable '' diff --git a/modules/paperless/default.nix b/modules/paperless/default.nix index 55cc08cc..b11939f3 100644 --- a/modules/paperless/default.nix +++ b/modules/paperless/default.nix @@ -112,17 +112,18 @@ in { systemd = let copy-out = pkgs.writeShellScriptBin "copy-out" '' ${pkgs.systemd}/bin/systemctl stop paperless-web.service paperless-task-queue.service paperless-scheduler.service paperless-consumer.service - cp -r ${cfg.dataDir}/media ${cfg.sync.directory}/media + cp -r ${cfg.dataDir}/media ${cfg.sync.directory}/ cp ${cfg.dataDir}/db.sqlite3 ${cfg.sync.directory}/db.sqlite3 cp ${cfg.dataDir}/celerybeat-schedule.db ${cfg.sync.directory}/celerybeat-schedule.db cp ${cfg.dataDir}/classification_model.pickle ${cfg.sync.directory}/classification_model.pickle cp ${cfg.dataDir}/src-version ${cfg.sync.directory}/src-version + chown -R ${psCfg.user.name}:users ${cfg.sync.directory} ${pkgs.systemd}/bin/systemctl start paperless-web.service paperless-task-queue.service paperless-scheduler.service paperless-consumer.service ''; copy-in = pkgs.writeShellScriptBin "copy-in" '' ${pkgs.systemd}/bin/systemctl stop paperless-web.service paperless-task-queue.service paperless-scheduler.service paperless-consumer.service - cp -r ${cfg.sync.directory}/media ${cfg.dataDir}/media + cp -r ${cfg.sync.directory}/media ${cfg.dataDir}/ cp ${cfg.sync.directory}/db.sqlite3 ${cfg.dataDir}/db.sqlite3 cp ${cfg.sync.directory}/celerybeat-schedule.db ${cfg.dataDir}/celerybeat-schedule.db cp ${cfg.sync.directory}/classification_model.pickle ${cfg.dataDir}/classification_model.pickle