nix/modules/services/syncthing/client/default.nix
2024-11-24 20:15:38 +01:00

21 lines
390 B
Nix

{
username,
lib,
config,
...
}: {
options = {
sync-client.enable = lib.mkEnableOption "";
};
config = lib.mkIf config.sync-client.enable {
services.syncthing = {
enable = true;
dataDir = "/home/${username}";
openDefaultPorts = true;
configDir = "/home/${username}/.config/syncthing";
user = username;
group = "users";
};
};
}