about summary refs log tree commit diff stats
path: root/hm/soispha/conf/unison/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soispha/conf/unison/default.nix')
-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 = [