diff options
-rw-r--r-- | flake/nixosConfigurations/common.nix | 24 | ||||
-rw-r--r-- | modules/by-name/un/unison/module.nix | 3 | ||||
-rw-r--r-- | modules/by-name/un/unison/shellScript.nix | 6 |
3 files changed, 17 insertions, 16 deletions
diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix index 2ff85521..68533bd8 100644 --- a/flake/nixosConfigurations/common.nix +++ b/flake/nixosConfigurations/common.nix @@ -43,16 +43,24 @@ foreign.userName = "soispha"; dataDir = "${config.home-manager.users.soispha.xdg.dataHome}/unison"; userSourceDir = "/srv/home/soispha"; - pathsToIgnore = [ - # already synchronized by the taskserver - "~/.local/share/task" + pathsToIgnore = let + extractTarget = attr: "~/${attr.target}"; + homeManagerSymlinks = + builtins.map extractTarget + (builtins.attrValues + config.home-manager.users.soispha.home.file); + in + [ + # already synchronized by the taskserver + "~/.local/share/task" - # Should not be synchronized - "~/.local/share/unison" + # Should not be synchronized + "~/.local/share/unison" - # Is just to big to be synchronized (# TODO: Work around that <2024-08-31> ) - "~/media/music" - ]; + # Is just to big to be synchronized (# TODO: Work around that <2024-08-31> ) + "~/media/music" + ] + ++ homeManagerSymlinks; pathsToSync = [ "~/.local/state/mpv" diff --git a/modules/by-name/un/unison/module.nix b/modules/by-name/un/unison/module.nix index baf92b02..9de27c0f 100644 --- a/modules/by-name/un/unison/module.nix +++ b/modules/by-name/un/unison/module.nix @@ -66,9 +66,6 @@ in { sshcmd = "ssh"; ui = "text"; auto = "true"; - # This is a trap, thanks to the HM links - # TODO: Auto-ignore all `home.file` paths <2024-10-24> - links = "false"; backupdir = "${cfg.dataDir}/backups"; backuploc = "central"; diff --git a/modules/by-name/un/unison/shellScript.nix b/modules/by-name/un/unison/shellScript.nix index 5ff0c219..4618ae8e 100644 --- a/modules/by-name/un/unison/shellScript.nix +++ b/modules/by-name/un/unison/shellScript.nix @@ -78,11 +78,7 @@ in export UNISON=${esa cfg.dataDir}; - if [ "$1" = "links" ]; then - shift 1; - EXTRA_OPTIONS="-links=true"; - fi - EXTRA_OPTIONS="$EXTRA_OPTIONS $*" + EXTRA_OPTIONS="$UNISON_EXTRA_OPTIONS $*" '' + script); |