initial commit
This commit is contained in:
commit
5679c003d8
26 changed files with 296 additions and 0 deletions
10
export/nixosGroup.nix
Normal file
10
export/nixosGroup.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
flake: { ... }@inputs: { group, ... }@imports: let
|
||||
group' = name: snippets: { pkgs, lib, options, config, ... }@args: let
|
||||
invoke = x: if builtins.isFunction x then x args else x;
|
||||
in {
|
||||
options.fbs42.group.${name} = lib.mkEnableOption name;
|
||||
config.users.groups.${name} = lib.mkIf
|
||||
(config.fbs42.group.${name} || builtins.any (usr: usr.group == name) (builtins.attrValues config.users.users))
|
||||
(lib.mkMerge (map invoke snippets));
|
||||
};
|
||||
in builtins.mapAttrs group' group
|
||||
Loading…
Add table
Add a link
Reference in a new issue