helm/modules/services/syncthing.nix
Henrik Lissner f88552ad64 Add modules/services/syncthing.nix
Generalizes the module so it's not so Henrik-centric. I know,
blasphemous, but the world only sometimes revolves around me.

Also, adds a new, much simpler config for syncthing.
2021-01-26 23:00:01 -05:00

21 lines
454 B
Nix

{ 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;
configDir = "/home/${user}/.config/syncthing";
dataDir = "/home/${user}/.local/share/syncthing";
};
};
}