summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorJade Lovelace <software@lfcode.ca>2024-09-10 22:37:18 +0200
committerAntoine Cotten <hello@acotten.com>2024-09-11 08:24:41 +0200
commit8714f9e28529183d65d9f42ac92cdc5d70dbb6f7 (patch)
tree07ea0feadacda98c940ac9580be0a205c164c5f9 /flake.nix
parentf4f18f3d7229845e1c9d517457b7a0b90a38b728 (diff)
flake: put nixpkgs in NIX_PATH and system registry for flake configs
Currently there are a bunch of really wacky hacks required to get nixpkgs path correctly set up under flake configs such that `nix run nixpkgs#hello` and `nix run -f '<nixpkgs>' hello` hit the nixpkgs that the system was built with. In particular you have to use specialArgs or an anonymous module, and everyone has to include this hack in their own configs. We can do this for users automatically. NixOS/nixpkgs@e456032addae76701eb17e6c03fc515fd78ad74f Co-authored-by: Antoine Cotten <hello@acotten.com>
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index e25fe6a..0f79d77 100644
--- a/flake.nix
+++ b/flake.nix
@@ -27,6 +27,7 @@
}
++ [ ({ lib, ... }: {
nixpkgs.source = lib.mkDefault nixpkgs;
+ nixpkgs.flake.source = lib.mkDefault nixpkgs;
system.checks.verifyNixPath = lib.mkDefault false;