57 current 2025-10-05 14:39:37 25.05.20251001.5b5be50 6.12.49 *

This commit is contained in:
2025-10-05 14:40:09 -05:00
parent 8389691677
commit f38635fbf5
3 changed files with 9 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
# flake for blakes nixos config # flake for blakes nixos config
# define new devices in outputs # 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"; description = "blakes nix config";
inputs = { inputs = {

View File

@@ -14,7 +14,7 @@
ssh.enable = true; ssh.enable = true;
sops.enable = true; sops.enable = true;
docker.enable = true; docker.enable = true;
syncthing.enable = false; syncthing.enable = true;
syncthing.mode = "server"; syncthing.mode = "server";
tailscale.enable = true; tailscale.enable = true;
nvidia.enable = false; nvidia.enable = false;

View File

@@ -15,13 +15,17 @@ in
data_dir = lib.mkOption { data_dir = lib.mkOption {
type = lib.types.str; 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."; description = "optional override for syncthing data directory.";
}; };
config_dir = lib.mkOption { config_dir = lib.mkOption {
type = lib.types.str; 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."; description = "optional override for syncthing config directory.";
}; };
}; };
@@ -31,11 +35,7 @@ in
enable = true; enable = true;
user = "blake"; user = "blake";
group = "blake"; group = "blake";
dataDir = "/home/blake/.local/state/syncthing";
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
guiAddress = "0.0.0.0:2222"; guiAddress = "0.0.0.0:2222";
openDefaultPorts = true; openDefaultPorts = true;
}; };