diff --git a/modules/services/restic/restic.nix b/modules/services/restic/restic.nix index f624feb..4ddcca8 100644 --- a/modules/services/restic/restic.nix +++ b/modules/services/restic/restic.nix @@ -33,16 +33,18 @@ RESTIC_CACERT = caCert; RESTIC_TLS_CLIENT_CERT = mtlsClientCert; }; + + # This is necessary because the restic service in home manager doesn't otherwise expose these options. + systemd.user.services."restic-backups-${cfg.repoName}".Service.Environment = [ + "RESTIC_CACERT=${caCert}" + "RESTIC_TLS_CLIENT_CERT=${mtlsClientCert}" + ]; services.restic = { enable = true; backups.${cfg.repoName} = { repository = resticRepository; passwordFile = cfg.passwordFile; - extraBackupArgs = [ - "--tls-client-cert ${mtlsClientCert}" - "--cacert ${caCert}" - ]; paths = cfg.paths; timerConfig = { OnCalendar = "00:05"; @@ -83,6 +85,7 @@ ]; }; }; + }; }; } \ No newline at end of file