From 33b704060e74e970313a1d64f6112588fca2332c Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 24 Oct 2024 14:52:36 +0200 Subject: refactor(modules/unison): Migrate to `by-name` and parameterize --- flake/nixosConfigurations/common.nix | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'flake') diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix index 585e883b..2ff85521 100644 --- a/flake/nixosConfigurations/common.nix +++ b/flake/nixosConfigurations/common.nix @@ -1,6 +1,6 @@ # This file contains common configuration applied to every host. # It should only `enable` options defined in the `modules` directory. -{...}: { +{config, ...}: { soispha = { boot.enable = true; cleanup.enable = true; @@ -37,6 +37,37 @@ snapper.enable = true; steam.enable = false; systemDiff.enable = true; + unison = { + enable = true; + + 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" + + # Should not be synchronized + "~/.local/share/unison" + + # Is just to big to be synchronized (# TODO: Work around that <2024-08-31> ) + "~/media/music" + ]; + + pathsToSync = [ + "~/.local/state/mpv" + "~/.local/state/nvim" + "~/.local/share" + "~/.local/.Trash-1000" + + "~/.mozilla/.Trash-1000" + "~/.mozilla/firefox" + + "~/media" + "~/school" + "~/repos" + ]; + }; }; programs = { -- cgit 1.4.1