porthos: users: add 'ambroisie' to 'media'
This only done when the groups exists.
This commit is contained in:
parent
866225393b
commit
340906d6b2
|
@ -1,7 +1,12 @@
|
|||
# User setup
|
||||
{ config, ... }:
|
||||
{ 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 = {
|
||||
|
@ -12,4 +17,8 @@ in
|
|||
home = "/var/www/";
|
||||
openssh.authorizedKeys.keys = [ my.secrets.drone.ssh.publicKey ];
|
||||
};
|
||||
|
||||
users.users.ambroisie.extraGroups = groupsIfExist [
|
||||
"media"
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue