feat(syncthing): add enable option
This commit is contained in:
@@ -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 ];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user