about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-02-23 21:10:22 +0100
committerSoispha <soispha@vhack.eu>2024-02-23 21:18:45 +0100
commit4761669c9af869921f16a3fa14d08fc4571d175d (patch)
tree160f1a86ab3e056862e5c10aa2fb1819af57ff56
parentrefactor(hm/conf/unison): Rename the script to `unison-sync` (diff)
downloadnixos-config-4761669c9af869921f16a3fa14d08fc4571d175d.tar.gz
nixos-config-4761669c9af869921f16a3fa14d08fc4571d175d.zip
feat(hm/conf/unison): Add support for link syncing
Diffstat (limited to '')
-rw-r--r--hm/soispha/conf/unison/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/hm/soispha/conf/unison/default.nix b/hm/soispha/conf/unison/default.nix
index 9703068d..94824fc9 100644
--- a/hm/soispha/conf/unison/default.nix
+++ b/hm/soispha/conf/unison/default.nix
@@ -116,6 +116,7 @@
     lib.strings.concatStringsSep " " [
       "unison"
       "${serialiseArgs unisonOptions}"
+      "$EXTRA_OPTIONS"
       "${getIgnored paths_to_ignore path}"
       "${esa path}"
       (esa "ssh://${config.home.username}@${hostName}.fritz.box/${path}")
@@ -135,6 +136,10 @@ in {
       src = builtins.toFile "unison-backup" (''
           #!/usr/bin/env sh
           export UNISON=${esa unisonPath};
+          if [ "$1" = "links" ]; then
+            EXTRA_OPTIONS="-links=true";
+          fi
+          EXTRA_OPTIONS="$EXTRA_OPTIOS $*"
         ''
         + script);
       dependencies = with pkgs; [unison openssh];