Revert "restic: add platform assertion (linux)"
This commit is contained in:
parent
d7f5306637
commit
12bca6d40a
1 changed files with 4 additions and 11 deletions
|
|
@ -327,17 +327,10 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = lib.flatten [
|
||||
(lib.mapAttrsToList (n: v: {
|
||||
assertion = lib.xor (v.repository == null) (v.repositoryFile == null);
|
||||
message = "services.restic.backups.${n}: exactly one of repository or repositoryFile should be set";
|
||||
}) cfg.backups)
|
||||
|
||||
{
|
||||
assertion = pkgs.stdenv.hostPlatform.isLinux;
|
||||
message = "services.restic: linux is currently the only supported platform";
|
||||
}
|
||||
];
|
||||
assertions = lib.mapAttrsToList (n: v: {
|
||||
assertion = lib.xor (v.repository == null) (v.repositoryFile == null);
|
||||
message = "services.restic.backups.${n}: exactly one of repository or repositoryFile should be set";
|
||||
}) cfg.backups;
|
||||
|
||||
systemd.user.services = lib.mapAttrs' (
|
||||
name: backup:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue