From 7324873ef9dc0ae11bfa1de403c65b89f9a9f6c5 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Fri, 22 May 2026 20:20:33 +0200 Subject: [PATCH] feat(syncthing): add enable option --- modules/syncthing/default.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/syncthing/default.nix b/modules/syncthing/default.nix index 0483eb76..248c3e21 100644 --- a/modules/syncthing/default.nix +++ b/modules/syncthing/default.nix @@ -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 ];