centralise syncthing config, split by system role
5 files changed, 19 insertions(+), 27 deletions(-)
M system/hosts/linde.nix → system/hosts/linde.nix
@@ -738,16 +738,6 @@ }; }; }; - services.syncthing = { - enable = true; - dataDir = "/srv/syncthing"; - configDir = "/var/lib/syncthing"; - guiAddress = "[::]:8384"; - openDefaultPorts = true; - overrideDevices = false; - overrideFolders = false; - }; - services.ntfy-sh = { enable = true; settings = {
M system/hosts/smrk.nix → system/hosts/smrk.nix
@@ -82,14 +82,4 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIy9jFioBvV0JA0lc+De2N+vDOABGHgCECW6vkD33CE4 sourcehut" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIII7sWEwsm8JZiJ0LUnjSt0Kg1RXypG6p5AzP/R2n5ca actions@github.com" ]; }; - - services.syncthing = { - enable = true; - dataDir = "/var/lib/syncthing"; - configDir = "/var/lib/syncthing"; - guiAddress = "[::]:8384"; - openDefaultPorts = true; - overrideDevices = false; - overrideFolders = false; - }; }
M system/roles/desktop.nix → system/roles/desktop.nix
@@ -10,4 +10,14 @@ bindsTo = [ "sshd@%i.service" ]; wantedBy = [ "sshd@.service" ]; serviceConfig.ExecStart = "${pkgs.systemd}/bin/systemd-inhibit --mode block --what sleep --who 'ssh session '%I --why 'session still active' ${pkgs.coreutils}/bin/sleep infinity"; }; + + services.syncthing = { + systemService = false; + user = "alin"; + group = "users"; + dataDir = "/home/alan/.config/syncthing"; + }; + systemd.user.services.syncthing.environment = { + LOGGER_DISCARD = "1"; + }; }
M system/roles/server.nix → system/roles/server.nix
@@ -12,6 +12,7 @@ ../settings/configuration/date-time.nix ../settings/configuration/locale.nix ../settings/services/tailscale.nix + ../settings/services/syncthing.nix ../settings/services/caddy.nix ../settings/services/ssh.nix@@ -45,5 +46,11 @@ Type = "oneshot"; User = "alin"; ExecStart = "${lib.getExe pkgs.home-manager} switch --flake ${config.system.autoUpgrade.flake}#${User}@%H"; }; + }; + + services.syncthing = { + dataDir = "/srv/syncthing"; + configDir = "/var/lib/syncthing"; + guiAddress = "[::]:8384"; }; }
M system/settings/services/syncthing.nix → system/settings/services/syncthing.nix
@@ -4,13 +4,8 @@ }: { services.syncthing = { enable = true; - user = "alan"; - group = "users"; openDefaultPorts = true; - systemService = false; - dataDir = "/home/alan/.config/syncthing"; - }; - systemd.user.services.syncthing.environment = { - LOGGER_DISCARD = "1"; + dataDir = "/srv/syncthing"; + configDir = "/var/lib/syncthing"; }; }