From e92bb060eefdaa7255f3435b808bd97dcf6a46a6 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 5 Jan 2020 23:01:00 -0700 Subject: [PATCH] utils: rename `utils` to `usr` for module args Avoids a name conflict. --- README.md | 6 +++--- hosts/default.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 60e3c77..fee6d61 100644 --- a/README.md +++ b/README.md @@ -121,13 +121,13 @@ from this directory. ## Lib 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 -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: ``` # hosts/some-host.nix -{ utils, ... }: -let data = utils.myFunction # ... +{ usr, ... }: +let data = usr.myFunction # ... in { # NixOS configuration diff --git a/hosts/default.nix b/hosts/default.nix index f33d8a9..7915817 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -10,7 +10,7 @@ let nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = { inherit utils; }; + specialArgs.usr = utils; modules = let core = ../profiles/core.nix;