Files
vmimages/modules/nixos/syncthing/default.nix
2023-11-21 14:00:06 +00:00

38 lines
868 B
Nix

{
lib,
inputs,
outputs,
config,
...
}:
with lib; let
cfg = config.custom.syncthing;
in {
options.custom.syncthing.enable = mkEnableOption "Enable mnt/Public";
config = mkIf cfg.enable {
services.syncthing = {
enable = true;
dataDir = "/home/sstent";
openDefaultPorts = true;
configDir = "/home/sstent/.config/syncthing";
user = "sstent";
group = "users";
guiAddress = "0.0.0.0:8385";
overrideDevices = true;
overrideFolders = true;
devices = {
"StuPC" = {id = "Z43MPGF-OKG6K34-WTTFUDO-UG6E3TE-YCLSOAT-5LN5KMW-QHL2VSK-EZCGCAP";};
"go3" = {id = "YDOL433-AHAL33M-NWLLDDQ-2D36ZIE-YNZVTKE-25TRBZ2-JXRSN7Y-Z5EOVQN";};
};
folders = {
"default" = {
path = "/home/sstent/sync";
devices = ["StuPC" "go3"];
};
};
};
};
}