modules: users: add to groups in single place
This commit is contained in:
parent
960f65f62c
commit
5b63b70958
2 changed files with 10 additions and 11 deletions
|
|
@ -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"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue