mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
lib/home-manager: update function names
This commit is contained in:
parent
92e92997bd
commit
3822562638
@ -6,7 +6,7 @@ rec {
|
||||
Checks if there is the `osConfig` attribute and get the attribute path from
|
||||
its system configuration.
|
||||
*/
|
||||
getOSConfigPath =
|
||||
hasNixOSConfigAttr =
|
||||
# The configuration attribute set of the home-manager configuration.
|
||||
attrs:
|
||||
|
||||
@ -15,10 +15,21 @@ rec {
|
||||
|
||||
# The default value when `attrPath` is missing.
|
||||
default:
|
||||
attrs ? osConfig && lib.attrByPath attrPath default attrs;
|
||||
attrs ? nixosConfig && lib.attrByPath attrPath default attrs;
|
||||
|
||||
hasDarwinConfigAttr =
|
||||
# The configuration attribute set of the home-manager configuration.
|
||||
attrs:
|
||||
|
||||
# A list of strings representing the attribute path.
|
||||
attrPath:
|
||||
|
||||
# The default value when `attrPath` is missing.
|
||||
default:
|
||||
attrs ? darwinConfig && lib.attrByPath attrPath default attrs;
|
||||
|
||||
/*
|
||||
A quick function to check if the optional system module is enabled.
|
||||
A quick function to check if the optional NixOS system module is enabled.
|
||||
*/
|
||||
hasOSModuleEnabled =
|
||||
# The configuration attribute set of the home-manager configuration.
|
||||
@ -26,5 +37,5 @@ rec {
|
||||
|
||||
# A list of strings representing the attribute path.
|
||||
attrPath:
|
||||
getOSConfigPath attrs attrPath false;
|
||||
hasNixOSConfigAttr attrs attrPath false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user