modules: users: add to groups in single place

This commit is contained in:
Bruno BELANYI 2021-03-07 17:47:33 +00:00
parent 960f65f62c
commit 5b63b70958
2 changed files with 10 additions and 11 deletions

View file

@ -2,11 +2,6 @@
{ config, lib, ... }:
let
my = config.my;
groupIfExists = grp:
lib.lists.optional
(builtins.hasAttr grp config.users.groups)
grp;
groupsIfExist = grps: builtins.concatMap groupIfExists grps;
in
{
users.users.blog = {
@ -17,8 +12,4 @@ in
home = "/var/www/";
openssh.authorizedKeys.keys = [ my.secrets.drone.ssh.publicKey ];
};
users.users.ambroisie.extraGroups = groupsIfExist [
"media"
];
}