From bc950104c6b44766250a652fc1db50b7ec5fb5e8 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Thu, 27 Apr 2023 12:27:01 +0200 Subject: [PATCH] [Nix/Legacy] Fix legacy nix-* commands and enable them to use flake-locked nixpkgs + overlays --- nix/nix.nix | 5 +++++ overlays.nix | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/nix.nix b/nix/nix.nix index 9386e1e..935b348 100644 --- a/nix/nix.nix +++ b/nix/nix.nix @@ -104,5 +104,10 @@ in nixpkgs-unstable.flake = nixpkgs-unstable; }; + nix.nixPath = mkBefore [ + "nixpkgs=${nixpkgs.outPath}" + "nixos-config=/etc/nixos/configuration.nix" + ]; + }; } diff --git a/overlays.nix b/overlays.nix index 200de5a..ae09d09 100644 --- a/overlays.nix +++ b/overlays.nix @@ -21,8 +21,6 @@ in }; config = mkIf cfg.enable { nix.nixPath = - # Prepend default nixPath values. - options.nix.nixPath.default ++ # Append our nixpkgs-overlays. [ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ] ;