From 722e0b41405a3848950e304b22c4c45f2ee63561 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 14 Jan 2024 20:39:27 +0100 Subject: fix(hm/conf/unison): Correct names so that systemd can use them --- hm/soispha/conf/unison/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hm/soispha/conf/unison/default.nix b/hm/soispha/conf/unison/default.nix index ec34d038..3d94c861 100644 --- a/hm/soispha/conf/unison/default.nix +++ b/hm/soispha/conf/unison/default.nix @@ -38,6 +38,8 @@ then "tiamat" else builtins.throw "Host (${hn}) not yet covered in the unison host mapping."; + unitName = name: builtins.replaceStrings ["/"] ["-"] name; + mkPath = path: if lib.strings.hasPrefix "~" path then "${builtins.elemAt (builtins.attrNames config.home.persistence) @@ -49,7 +51,7 @@ mkPair = pathname: let path = mkPath pathname; in { - name = "${pathname}"; + name = unitName "${pathname}"; value = { stateDirectory = unisonPath; roots = [ -- cgit 1.4.1