run nix format on this repository
This commit is contained in:
parent
db07347757
commit
5a3edc7ff0
19 changed files with 363 additions and 174 deletions
|
|
@ -1,10 +1,25 @@
|
|||
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
|
||||
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