From 397c0e222f5bd834669046ef584cd77ef13e9156 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Wed, 23 Sep 2020 12:17:44 +0200 Subject: [PATCH] Set NIX_PATH to updateable value --- flake.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index 0a1f5ad5..7d256f76 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,14 @@ modules = [ home-manager.nixosModules.home-manager (./. + "/machines/${hostname}") + ({ pkgs, ... }: { + environment.etc."nixpkgs".source = (pkgs.runCommandNoCC "nixpkgs" { } '' + cp -r ${nixpkgs} $out + chmod 700 $out + echo "${nixpkgs.rev}" > $out/.version-suffix + ''); + nix.nixPath = [ "nixpkgs=/etc/nixpkgs" ]; + }) ]; }; in