initial commit

This commit is contained in:
Jonas Rabenstein 2025-01-05 16:35:55 +01:00
commit 5679c003d8
26 changed files with 296 additions and 0 deletions

10
export/nixosGroup.nix Normal file
View 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