Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

lib.validators:

lib.validators.ifTheyExist

a function that will append a list of groups if they exist in config.users.groups

Arguments

  • [config] the configuration that nixosConfigurations provides
  • [groups] a list of groups to check for

Type

ifTheyExist :: AttrSet -> List -> List

Example

ifTheyExist config ["wheel" "users"]
=> ["wheel"]

lib.validators.anyHome

check if a predicate for any user config is true

Arguments

  • [conf] the configuration that nixosConfigurations provides
  • [cond] predicate function to check against config variable

Type

anyHome :: AttrSet -> (Any -> Bool) -> Bool

Example

anyHome config (cfg: cfg.programs.hyprland.enable)
=> true