From f38635fbf5229e0326225ac4df1921215be16a4a Mon Sep 17 00:00:00 2001 From: blake Date: Sun, 5 Oct 2025 14:40:09 -0500 Subject: [PATCH] 57 current 2025-10-05 14:39:37 25.05.20251001.5b5be50 6.12.49 * --- flake.nix | 2 +- hosts/snowbelle/configuration.nix | 2 +- modules/system/syncthing.nix | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index cc41413..b5fc6cf 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 53 current 2025-10-05 14:13:26 25.05.20251001.5b5be50 6.12.49 * +# generation: 57 current 2025-10-05 14:39:37 25.05.20251001.5b5be50 6.12.49 * { description = "blakes nix config"; inputs = { diff --git a/hosts/snowbelle/configuration.nix b/hosts/snowbelle/configuration.nix index 28c10ff..55b3094 100644 --- a/hosts/snowbelle/configuration.nix +++ b/hosts/snowbelle/configuration.nix @@ -14,7 +14,7 @@ ssh.enable = true; sops.enable = true; docker.enable = true; - syncthing.enable = false; + syncthing.enable = true; syncthing.mode = "server"; tailscale.enable = true; nvidia.enable = false; diff --git a/modules/system/syncthing.nix b/modules/system/syncthing.nix index dd210ff..5f452c9 100644 --- a/modules/system/syncthing.nix +++ b/modules/system/syncthing.nix @@ -15,13 +15,17 @@ in data_dir = lib.mkOption { type = lib.types.str; - default = "/var/lib/syncthing"; + default = if cfg.mode == "server" + then "/var/lib/syncthing" + else "/home/blake/.local/state/syncthing"; description = "optional override for syncthing data directory."; }; config_dir = lib.mkOption { type = lib.types.str; - default = "/var/lib/syncthing/config"; + default = if cfg.mode == "server" + then "/var/lib/syncthing/.stconfig" + else "/home/blake/.config/syncthing"; description = "optional override for syncthing config directory."; }; }; @@ -31,11 +35,7 @@ in enable = true; user = "blake"; group = "blake"; - - dataDir = cfg.data_dir or (if cfg.mode == "server" then "/var/lib/syncthing" else "/home/blake/.local/state/syncthing"); - configDir = cfg.config_dir or (if cfg.mode == "server" then "/var/lib/syncthing/config" else "/home/blake/.config/syncthing"); - - # webui + dataDir = "/home/blake/.local/state/syncthing"; guiAddress = "0.0.0.0:2222"; openDefaultPorts = true; };