fix NIX_PATH overlay interaction that was crashing nix-shell
This commit is contained in:
parent
108c1d9d60
commit
e0e3c36d1b
|
@ -8,6 +8,7 @@
|
||||||
./ids.nix
|
./ids.nix
|
||||||
./machine-id.nix
|
./machine-id.nix
|
||||||
./net.nix
|
./net.nix
|
||||||
|
./nix-path
|
||||||
./persist.nix
|
./persist.nix
|
||||||
./programs
|
./programs
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
|
@ -36,11 +37,6 @@
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
# allow `nix-shell` (and probably nix-index?) to locate our patched and custom packages
|
|
||||||
nix.nixPath = [
|
|
||||||
"nixpkgs=${pkgs.path}"
|
|
||||||
"nixpkgs-overlays=${../..}/overlays"
|
|
||||||
];
|
|
||||||
# hardlinks identical files in the nix store to save 25-35% disk space.
|
# hardlinks identical files in the nix store to save 25-35% disk space.
|
||||||
# unclear _when_ this occurs. it's not a service.
|
# unclear _when_ this occurs. it's not a service.
|
||||||
# does the daemon continually scan the nix store?
|
# does the daemon continually scan the nix store?
|
||||||
|
|
10
hosts/common/nix-path/default.nix
Normal file
10
hosts/common/nix-path/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# allow `nix-shell` (and probably nix-index?) to locate our patched and custom packages
|
||||||
|
nix.nixPath = [
|
||||||
|
"nixpkgs=${pkgs.path}"
|
||||||
|
# note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root
|
||||||
|
"nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay"
|
||||||
|
];
|
||||||
|
}
|
4
hosts/common/nix-path/overlay/default.nix
Normal file
4
hosts/common/nix-path/overlay/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# XXX: NIX_PATH=...:nixpkgs-overlays=... will import every overlay in the directory
|
||||||
|
# so we prefer to give it a directory with just this *one* overlay, otherwise it imports conflicting overlays
|
||||||
|
# and gets stuck in a loop until it OOMs
|
||||||
|
import ../../../../overlays/all.nix
|
Loading…
Reference in New Issue
Block a user