many changes this one forgot

This commit is contained in:
Lucy Hochkamp 2025-04-04 18:42:10 +02:00
parent 67c2117563
commit 44307a3f6f
No known key found for this signature in database
22 changed files with 1081 additions and 437 deletions

View file

@ -0,0 +1,28 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.user-services.syncthing;
in
{
options.xyno.user-services.syncthing.enable = lib.mkEnableOption "enable syncthing as user/with gui";
options.xyno.user-services.syncthing.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.user-services.syncthing.tray = lib.mkEnableOption "add syncthingtray";
config = lib.mkIf cfg.enable {
services.syncthing = {
systemService = false;
enable = true;
openDefaultPorts = true;
};
environment.systemPackages = lib.optionals cfg.tray [ pkgs.syncthingtray ];
systemd.packages = lib.optionals cfg.tray [ pkgs.syncthingtray ];
systemd.user.services.syncthing.wantedBy = [ cfg.wantedBy ];
};
}