lib.validators
lib.validators:
Section titled “lib.validators:”lib.validators.ifTheyExist
Section titled “lib.validators.ifTheyExist”a function that will append a list of groups if they exist in config.users.groups
Arguments
Section titled “Arguments”- [config] the configuration that nixosConfigurations provides
- [groups] a list of groups to check for
ifTheyExist :: AttrSet -> List -> ListExample
Section titled “Example”ifTheyExist config ["wheel" "users"]=> ["wheel"]lib.validators.anyHome
Section titled “lib.validators.anyHome”check if a predicate for any user config is true
Arguments
Section titled “Arguments”- [conf] the configuration that nixosConfigurations provides
- [cond] predicate function to check against config variable
anyHome :: AttrSet -> (Any -> Bool) -> BoolExample
Section titled “Example”anyHome config (cfg: cfg.programs.hyprland.enable)=> true