nixos-laptop/home-manager/syncthing.nix

19 lines
392 B
Nix
Raw Normal View History

2024-10-27 11:23:20 +00:00
{
config,
lib,
...
}: let
cfg = config.pim.syncthing;
in {
options.pim.syncthing.enable = lib.mkEnableOption "syncthing";
2024-10-26 18:24:13 +00:00
2024-10-27 11:23:20 +00:00
config = lib.mkIf cfg.enable {
services.syncthing.enable = true;
sops.secrets = {
"syncthing/key".path = "${config.xdg.configHome}/syncthing/key.pem";
"syncthing/cert".path = "${config.xdg.configHome}/syncthing/cert.pem";
};
2024-10-26 18:24:13 +00:00
};
}