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,
...
}:
with lib;
{ lib, config, ... }:
let
cfg = config.syncthing;
inherit (config.host) username;
in
{
config = {
options.syncthing.enable = lib.mkEnableOption "syncthing";
config = lib.mkIf cfg.enable {
users.groups.${username} = { };
users.users.${username}.extraGroups = [ username ];