Skip to content

Commit

Permalink
fix module
Browse files Browse the repository at this point in the history
  • Loading branch information
Brawl345 committed Sep 7, 2024
1 parent 5128f48 commit a0b5758
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ with lib;

let
cfg = config.services.gobot;
defaultUser = "gobot";

inherit (lib) optionalAttrs;
in
{
options.services.gobot = {
Expand Down Expand Up @@ -118,13 +121,16 @@ in
];
};

};
users = optionalAttrs (cfg.user == defaultUser) {
users.${defaultUser} = {
isSystemUser = true;
group = defaultUser;
description = "Gobot Telegram bot user";
};

groups.${defaultUser} = { };
};

users.users.gobot = {
isSystemUser = true;
group = "gobot";
description = "Gobot Telegram bot user";
};

users.groups.gobot = { };
}

0 comments on commit a0b5758

Please sign in to comment.