From c2726860a28a2f9331ef8bb4a8505998818bf471 Mon Sep 17 00:00:00 2001 From: ilkecan <40234257+ilkecan@users.noreply.github.com> Date: Mon, 18 Apr 2022 01:23:18 +0300 Subject: [PATCH] nix-darwin,nixos: convert `modulesPath` to string (#2714) `modulesPath` is usually used with antiquotation (`"${modulesPath}/some-module.nix"`). Since antiquoted paths are copied to the Nix store, one must explicitly do `"${toString modulesPath}/some-module.nix"` to avoid that. Ideally `modulesPath` should be a string to avoid this. Note that `modulesPath` is already defined as a string in /modules/default.nix and /nixos/lib/eval-config.nix. --- nix-darwin/default.nix | 2 +- nixos/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index 007e2de38..57f7559a3 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -13,7 +13,7 @@ let lib = extendedLib; darwinConfig = config; osConfig = config; - modulesPath = ../modules; + modulesPath = builtins.toString ../modules; } // cfg.extraSpecialArgs; modules = [ ({ name, ... }: { diff --git a/nixos/default.nix b/nixos/default.nix index a94ad1422..766ce76f9 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -13,7 +13,7 @@ let lib = extendedLib; nixosConfig = config; osConfig = config; - modulesPath = ../modules; + modulesPath = builtins.toString ../modules; } // cfg.extraSpecialArgs; modules = [ ({ name, ... }: {