diff options
| author | adikro <adikro@disroot.org> | 2026-02-08 18:03:39 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-02-08 18:03:39 +0100 |
| commit | 2c8a4dd99efd61298bc18393e7fcbf6063db8671 (patch) | |
| tree | 1efd5ac8f5bcf7b1611cec1beaa545e6a2c14160 /os/srv/syncthing.nix | |
| parent | eb95abfc230dc239122f1e89e90cd9a998491a2f (diff) | |
...
Diffstat (limited to 'os/srv/syncthing.nix')
| -rw-r--r-- | os/srv/syncthing.nix | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/os/srv/syncthing.nix b/os/srv/syncthing.nix new file mode 100644 index 0000000..1531c04 --- /dev/null +++ b/os/srv/syncthing.nix @@ -0,0 +1,54 @@ +{ + config, + lib, + username, + ... +}: +let + cfg = config.os.srv.syncthing; +in +{ + options.os.srv.syncthing.enable = lib.mkEnableOption "enables syncthing syncing"; + config = lib.mkIf cfg.enable { + services.syncthing = { + enable = true; + user = "${username}"; + dataDir = "/home/${username}/.local/share/syncthing"; + configDir = "/home/${username}/.config/syncthing"; + guiPasswordFile = config.sops.secrets."syncthing/gui_password".path; + + settings = { + devices = { + "desktop" = { + id = "YGMWGOB-LTJUDM7-CY25MAF-NPE7J4J-KYRNPB5-ZHD5DBI-VNRAXI6-LIP2DQP"; + }; + "laptop" = { + id = ""; + }; + "thinkpad" = { + id = ""; + }; + }; + folders = { + "game-saves" = { + path = "/home/${username}/.saves"; + id = "shared-saves-v1"; + devices = [ + "desktop" + "laptop" + "thinkpad" + ]; + + versioning = { + type = "staggered"; + params = { + cleanInterval = "3600"; + maxAge = "2592000"; + }; + }; + }; + }; + }; + }; + }; +} |
