24 lines
545 B
Nix
24 lines
545 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;
|
|
tray = {
|
|
enable = true;
|
|
package = pkgs.syncthingtray-minimal;
|
|
|
|
command = "syncthingtray --wait";
|
|
};
|
|
};
|
|
};
|
|
}
|