2023-11-26 20:26:49 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.jade.desktop.syncthing;
|
|
|
|
in
|
|
|
|
with lib; {
|
|
|
|
options.jade.desktop.syncthing = {
|
|
|
|
enable = mkEnableOption "Enable syncing via syncthing";
|
2023-02-13 11:54:21 +00:00
|
|
|
};
|
2023-11-26 20:26:49 +00:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.syncthing = rec {
|
|
|
|
enable = true;
|
|
|
|
user = "jade";
|
|
|
|
dataDir = "/home/${user}/Documents";
|
|
|
|
configDir = "/home/${user}/Documents/.config/syncthing";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|