diff options
| author | triethyl <triethylammonium@pm.me> | 2025-09-02 10:48:21 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-09-02 10:48:21 -0400 |
| commit | 31c316d19cd974bb81a5d6de62142ff24db1c78e (patch) | |
| tree | cb941422c76cb8953830a8d58c8e14dca1a10319 /nixos/features/services/extra/syncthing-client.nix | |
| parent | 1c21018347aa277caba74e554cb8d1b1e7fc6bed (diff) | |
reorganized directory structure
Diffstat (limited to 'nixos/features/services/extra/syncthing-client.nix')
| -rw-r--r-- | nixos/features/services/extra/syncthing-client.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/nixos/features/services/extra/syncthing-client.nix b/nixos/features/services/extra/syncthing-client.nix new file mode 100644 index 0000000..6d3d3d3 --- /dev/null +++ b/nixos/features/services/extra/syncthing-client.nix @@ -0,0 +1,35 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.extra.syncthing-client; +in { + options.features.services.extra.syncthing-client = { + enable = lib.mkEnableOption "syncthing"; + username = lib.mkOption { + type = lib.types.str; + description = "The username of syncthing's user"; + }; + }; + config = lib.mkIf cfg.enable { + services.syncthing = { + enable = true; + user = cfg.username; + dataDir = "/home/${cfg.username}/Sync"; + configDir = "/home/${cfg.username}/.config/syncthing"; + overrideDevices = true; + overrideFolders = true; + settings = { + devices = { + "prodesk-server" = { + id = "SBH4S2T-B7KVAAI-BKBOQKZ-YSNQDSM-TKXPV6O-OSZUD3O-N6USL6L-DHL3BAK"; + }; + }; + folders = { + "Main" = { + path = "/home/${cfg.username}/Sync"; + devices = [ "prodesk-server" ]; + }; + }; + }; + }; + environment.systemPackages = [ pkgs.syncthing ]; + }; +} |
