37 lines
1 KiB
Nix
37 lines
1 KiB
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 {
|
|
hm.services.syncthing = {
|
|
enable = true;
|
|
tray = {
|
|
enable = true;
|
|
package = pkgs.syncthingtray-minimal;
|
|
command = "syncthingtray --wait";
|
|
};
|
|
|
|
settings = {
|
|
devices = {
|
|
"flubber-machine".id = "SV57W5W-VVVCHWP-GDXFBNV-KR6JD2Y-VZD2HRZ-PYNCWIW-PJPPARY-WBWOTQX";
|
|
"goopnet-interface".id = "XYWF35P-63PTNW2-EQ5NBZQ-UTWUI3Y-AL7LQML-2LOGGKK-2CDF2ZY-HFTZ3QW";
|
|
"reid's phone".id = "K5BTLBX-CXPTGML-ZXO4RBJ-AULCVKU-BZ6IXLO-DLGB4CK-AVDOFNA-3LB42AC";
|
|
};
|
|
|
|
folders = {
|
|
"default sync folder" = {
|
|
id = "default";
|
|
path = "~/sync";
|
|
devices = [ "flubber-machine" "goopnet-interface" "reid's phone" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|