restructure system to be toggable

This commit is contained in:
2025-10-04 11:46:34 -05:00
parent 464ecdc6ca
commit 8b4d73b2e3
6 changed files with 85 additions and 47 deletions

View File

@@ -1,16 +1,22 @@
{ config, pkgs, ... }:
{
services.syncthing = {
enable = true;
user = "blake";
group = "blake";
options = {
modules.system.syncthing.enable = lib.mkEnableOption "enables syncthing";
};
dataDir = "/home/blake/.local/state/syncthing";
configDir = "/home/blake/.config/syncthing";
config = lib.mkIf config.modules.system.syncthing.enable {
services.syncthing = {
enable = true;
user = "blake";
group = "blake";
# webui
guiAddress = "0.0.0.0:2222";
openDefaultPorts = true;
dataDir = "/home/blake/.local/state/syncthing";
configDir = "/home/blake/.config/syncthing";
# webui
guiAddress = "0.0.0.0:2222";
openDefaultPorts = true;
};
};
}