2024-07-12 15:53:54 +02:00
|
|
|
{ lib, pkgs, materusArg, config, ... }:
|
|
|
|
{
|
|
|
|
options.waffentragerService.syncthing.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable syncthing";
|
|
|
|
|
|
|
|
config =
|
|
|
|
let
|
|
|
|
cfg = config.waffentragerService.syncthing;
|
|
|
|
in
|
|
|
|
lib.mkIf cfg.enable {
|
2024-07-22 15:31:57 +02:00
|
|
|
waffentragerService.elements.enable = true; networking.firewall.allowedTCPPorts = [ 22000 config.services.syncthing.relay.statusPort config.services.syncthing.relay.port];
|
2024-07-12 15:53:54 +02:00
|
|
|
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
2024-07-13 15:44:07 +02:00
|
|
|
systemd.services.syncthing = {
|
|
|
|
requires = [ "elements-mount.service" ];
|
|
|
|
after = [ "elements-mount.service" ];
|
|
|
|
};
|
2024-07-12 15:53:54 +02:00
|
|
|
services = {
|
|
|
|
syncthing = {
|
|
|
|
enable = true;
|
|
|
|
user = "materus";
|
2024-07-22 15:31:57 +02:00
|
|
|
group = "nextcloud";
|
2024-07-12 15:53:54 +02:00
|
|
|
dataDir = "${config.waffentragerService.elements.path}/storage/materus";
|
|
|
|
configDir = "${config.waffentragerService.elements.path}/storage/materus/Inne/Config/Syncthing/waffentrager/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|