mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 04:13:12 +00:00
nixos/restic: assert that repository name is specified
This commit is contained in:
parent
ba0fc91025
commit
751b9063a7
@ -270,6 +270,10 @@ in
|
||||
|
||||
config = {
|
||||
warnings = mapAttrsToList (n: v: "services.restic.backups.${n}.s3CredentialsFile is deprecated, please use services.restic.backups.${n}.environmentFile instead.") (filterAttrs (n: v: v.s3CredentialsFile != null) config.services.restic.backups);
|
||||
assertions = mapAttrsToList (n: v: {
|
||||
assertion = (v.repository == null) != (v.repositoryFile == null);
|
||||
message = "services.restic.backups.${n}: exactly one of repository or repositoryFile should be set";
|
||||
}) config.services.restic.backups;
|
||||
systemd.services =
|
||||
mapAttrs'
|
||||
(name: backup:
|
||||
|
Loading…
Reference in New Issue
Block a user