nix-dotfiles/modules/software/system/syncthing.nix
2024-07-08 20:36:24 -07:00

25 lines
No EOL
576 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.software.system.syncthing;
in {
options.modules.software.system.syncthing = {
enable = mkEnableOption "Enable Syncthing, a file synchronization server";
};
config = mkIf cfg.enable {
# declare sync folders & devices here
# edit: turns out you can't with hm??
hm.services.syncthing = {
enable = true;
# shit broken as hell ngl
tray = {
enable = true;
package = pkgs.syncthingtray-minimal;
command = "syncthingtray --wait";
};
};
};
}