From 4ea518e296d660578688dab11bb6ae461ce14ed8 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 17 Mar 2024 19:03:44 +0000 Subject: [PATCH] expose modulesPath to ease out-of-tree configuration.nix --- default.nix | 3 +++ examples/extneder.nix | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index acfce7c..b4bd314 100644 --- 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 index 69f5345..b86e607 100644 --- 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";