commit 4ea518e296d660578688dab11bb6ae461ce14ed8
parent 98318b450d682a5ea5dc7af7a32df62609bf4ab0
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 17 Mar 2024 19:03:44 +0000
expose modulesPath to ease out-of-tree configuration.nix
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/default.nix b/default.nix
@@ -20,6 +20,9 @@ let
});
eval = pkgs.lib.evalModules {
+ specialArgs = {
+ modulesPath = builtins.toString ./modules;
+ };
modules = [
{ _module.args = { inherit pkgs; inherit (pkgs) lim; }; }
./modules/hardware.nix
diff --git a/examples/extneder.nix b/examples/extneder.nix
@@ -8,6 +8,7 @@
config,
pkgs,
lib,
+ modulesPath,
...
}: let
secrets = import ./extneder-secrets.nix;
@@ -20,8 +21,8 @@ in rec {
};
imports = [
- ../modules/profiles/wap.nix
- ../modules/vlan
+ "${modulesPath}/profiles/wap.nix"
+ "${modulesPath}/vlan"
];
hostname = "extneder";