diff options
author | Soispha <soispha@vhack.eu> | 2023-07-04 14:22:04 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-04 14:22:04 +0200 |
commit | 33398b1844e1f971605b23b1229f3176b6e3b0e6 (patch) | |
tree | e899fe268d273014a3679d197d61e0a7aec15faa /system/services | |
parent | Fix(system/services/nix-sync): Add some required paths to unit (diff) | |
download | nixos-server-33398b1844e1f971605b23b1229f3176b6e3b0e6.tar.gz nixos-server-33398b1844e1f971605b23b1229f3176b6e3b0e6.zip |
Fix(system/services/nix-sync): Remove slash from cachePath
Diffstat (limited to '')
-rw-r--r-- | system/services/nix-sync/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix index 07c621a..de51f0b 100644 --- a/system/services/nix-sync/default.nix +++ b/system/services/nix-sync/default.nix @@ -179,7 +179,7 @@ in { type = lib.types.str; default = "/var/lib/nix-sync"; description = lib.mdDoc '' - Where to cache git directories. + Where to cache git directories. Should not end with a slash ("/") ''; }; @@ -193,6 +193,12 @@ in { }; config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = !lib.strings.hasSuffix "/" cfg.cachePath; + message = "Your cachePath ('${cfg.cachePath}') ends with a slash ('/'), please use: '${lib.strings.removeSuffix "/" cfg.cachePath}'."; + } + ]; systemd.services = services; users.users = if cfg.user == "nix-sync" |