aboutsummaryrefslogtreecommitdiffstats
path: root/hm
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-14 20:39:27 +0100
committerSoispha <soispha@vhack.eu>2024-01-14 20:39:27 +0100
commit722e0b41405a3848950e304b22c4c45f2ee63561 (patch)
tree84343eea8931531907c1aba8bd43b9f6905525e1 /hm
parentfix(hm/conf/unison): Quickly disable to ensure consistent (manual) updates (diff)
downloadnixos-config-722e0b41405a3848950e304b22c4c45f2ee63561.zip
fix(hm/conf/unison): Correct names so that systemd can use them
Diffstat (limited to 'hm')
-rw-r--r--hm/soispha/conf/unison/default.nix4
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 = [