feat(syncthing): add enable option

This commit is contained in:
2026-05-22 20:20:33 +02:00
parent 6f98f066a0
commit 7324873ef9

View File

@@ -1,16 +1,13 @@
{ { lib, config, ... }:
lib,
config,
...
}:
with lib;
let let
cfg = config.syncthing;
inherit (config.host) username; inherit (config.host) username;
in in
{ {
config = { options.syncthing.enable = lib.mkEnableOption "syncthing";
config = lib.mkIf cfg.enable {
users.groups.${username} = { }; users.groups.${username} = { };
users.users.${username}.extraGroups = [ username ]; users.users.${username}.extraGroups = [ username ];