diff options
author | Soispha <soispha@vhack.eu> | 2024-01-14 20:39:27 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-01-14 20:39:27 +0100 |
commit | 722e0b41405a3848950e304b22c4c45f2ee63561 (patch) | |
tree | 84343eea8931531907c1aba8bd43b9f6905525e1 | |
parent | fix(hm/conf/unison): Quickly disable to ensure consistent (manual) updates (diff) | |
download | nixos-config-722e0b41405a3848950e304b22c4c45f2ee63561.tar.gz nixos-config-722e0b41405a3848950e304b22c4c45f2ee63561.zip |
fix(hm/conf/unison): Correct names so that systemd can use them
-rw-r--r-- | hm/soispha/conf/unison/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
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 = [ |