bonfire/modules/services/syncthing.nix

21 lines
523 B
Nix
Raw Normal View History

2023-06-06 23:18:09 +05:00
{ config, options, pkgs, lib, ... }:
with lib;
with lib.custom;
let
cfg = config.modules.services.syncthing;
in {
options.modules.services.syncthing = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
services.syncthing = rec {
enable = true;
openDefaultPorts = true;
user = config.user.name;
configDir = "${config.user.home}/.config/syncthing";
dataDir = "${config.user.home}/.local/share/syncthing";
};
};
}