Change:
Recent changes to the assume the presence of the list even when it is not in use (it defaults to null). This prevents the service from running. Problem line: Steps to reproduce the behavior: a backup service without the 'dynamicFilesFrom' option that is included in the service's ExecStart service failing due to error Argument should not be passed if is not in use <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --Please run and paste the result.
cc
Please provide the relevant part of your configuration hughobrien am Mi., 1. Nov. 2023, 01:07:
The problematic section is unconditional so I do not believe the config matters. Nevertheless
Ah, I see. I'll send a fix in the evening. In the meantime, you can work around the problem by setting (which does not change anything if the repository already exists). hughobrien am Mi., 1. Nov. 2023, 15:08:

Discussion:
} // optionalAttrs (backup.environmentFile != null) { EnvironmentFile = backup.environmentFile; }; <del> } // optionalAttrs (backup.initialize || backup.dynamicFilesFrom != null || backup.backupPrepareCommand != null) { </del> <ins> } // optionalAttrs (backup.initialize || doBackup || backup.backupPrepareCommand != null) { </ins> preStart = '' ${optionalString (backup.backupPrepareCommand != null) '' ${pkgs.writeScript "backupPrepareCommand" backup.backupPrepareCommand}

${pkgs.writeScript "dynamicFilesFromScript" backup.dynamicFilesFrom} >> ${filesFromTmpFile} ''} ''; <del> } // optionalAttrs (backup.dynamicFilesFrom != null || backup.backupCleanupCommand != null) { </del> <ins> } // optionalAttrs (doBackup || backup.backupCleanupCommand != null) { </ins> postStop = '' ${optionalString (backup.backupCleanupCommand != null) '' ${pkgs.writeScript "backupCleanupCommand" backup.backupCleanupCommand} ''} <del> ${optionalString (backup.dynamicFilesFrom != null) '' </del> <ins> ${optionalString doBackup '' </ins> rm ${filesFromTmpFile} ''} '';

let remoteRepository = "/root/restic-backup"; remoteFromFileRepository = "/root/restic-backup-from-file"; <ins> remoteNoInitRepository = "/root/restic-backup-no-init"; </ins> rcloneRepository = "rclone:local:/root/restic-rclone-backup"; backupPrepareCommand = ''

find /opt -mindepth 1 -maxdepth 1 ! -name a_dir # all files in /opt except for a_dir ''; }; <ins> remote-noinit-backup = { inherit passwordFile exclude pruneOpts paths; initialize = false; repository = remoteNoInitRepository; }; </ins> rclonebackup = { inherit passwordFile paths exclude pruneOpts; initialize = true;

"cp -rT ${testDir} /opt", "touch /opt/excluded_file_1 /opt/excluded_file_2", "mkdir -p /root/restic-rclone-backup", <ins> "restic-remote-noinit-backup init", </ins> # test that remotebackup runs custom commands and produces a snapshot "timedatectl set-time '2016-12-13 13:45'",

"systemctl start restic-backups-remote-from-file-backup.service", 'restic-remote-from-file-backup snapshots --json | ${pkgs.jq}/bin/jq "length | . == 1"', <ins> # test that remote-noinit-backup produces a snapshot "systemctl start restic-backups-remote-noinit-backup.service", 'restic-remote-noinit-backup snapshots --json | ${pkgs.jq}/bin/jq "length | . == 1"', </ins> # test that restoring that snapshot produces the same directory "mkdir /tmp/restore-2", "${pkgs.restic}/bin/restic -r ${remoteRepository} -p ${passwordFile} restore latest -t /tmp/restore-2",