helm/modules/services/syncthing.nix

21 lines
466 B
Nix
Raw Permalink Normal View History

{ config, options, pkgs, lib, ... }:
with lib;
with lib.my;
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;
2021-02-28 09:59:03 -08:00
configDir = "${config.user.home}/.config/syncthing";
dataDir = "${config.user.home}/.local/share/syncthing";
};
};
}