modules: users: simplify 'groupsIfExist'
This commit is contained in:
parent
62cee0be61
commit
996d61b0f4
|
@ -2,11 +2,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
my = config.my;
|
||||
groupIfExists = grp:
|
||||
lib.lists.optional
|
||||
(builtins.hasAttr grp config.users.groups)
|
||||
grp;
|
||||
groupsIfExist = builtins.concatMap groupIfExists;
|
||||
groupExists = grp: builtins.hasAttr grp config.users.groups;
|
||||
groupsIfExist = builtins.filter groupExists;
|
||||
in
|
||||
{
|
||||
users.mutableUsers = false; # I want it to be declarative.
|
||||
|
|
Loading…
Reference in a new issue