16 lines
395 B
Nix
Raw Normal View History

2023-09-12 22:13:38 -07:00
{ config, lib, pkgs, user, ... }:
2023-09-12 21:34:40 -07:00
let cfg = config.modules.services.syncthing;
in {
options.modules.services.syncthing.enable = lib.mkEnableOption "syncthing";
config = lib.mkIf cfg.enable {
2023-09-17 17:04:49 -07:00
2023-09-12 21:34:40 -07:00
environment.systemPackages = with pkgs; [ syncthing ];
services.syncthing = {
enable = true;
user = "${user}";
configDir = "/home/${user}/.config/syncthing";
};
};
}