utils: rename utils
to usr
for module args
Avoids a name conflict.
This commit is contained in:
parent
6770621c70
commit
e92bb060ee
@ -121,13 +121,13 @@ from this directory.
|
|||||||
## Lib
|
## Lib
|
||||||
The [lib](lib) directory contains a file `utils.nix` which is an attribute set
|
The [lib](lib) directory contains a file `utils.nix` which is an attribute set
|
||||||
meant to consist mainly of utility functions you might want to write and use
|
meant to consist mainly of utility functions you might want to write and use
|
||||||
throughout the configuration. They are available via a new `utils` attribute
|
throughout the configuration. They are available via a new `usr` attribute
|
||||||
passed to every NixOS module, eg:
|
passed to every NixOS module, eg:
|
||||||
|
|
||||||
```
|
```
|
||||||
# hosts/some-host.nix
|
# hosts/some-host.nix
|
||||||
{ utils, ... }:
|
{ usr, ... }:
|
||||||
let data = utils.myFunction # ...
|
let data = usr.myFunction # ...
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# NixOS configuration
|
# NixOS configuration
|
||||||
|
@ -10,7 +10,7 @@ let
|
|||||||
nixpkgs.lib.nixosSystem rec {
|
nixpkgs.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
specialArgs = { inherit utils; };
|
specialArgs.usr = utils;
|
||||||
|
|
||||||
modules = let
|
modules = let
|
||||||
core = ../profiles/core.nix;
|
core = ../profiles/core.nix;
|
||||||
|
Loading…
Reference in New Issue
Block a user