shell.nix: don't override NIX_CONF_DIR
This commit is contained in:
parent
093513e313
commit
e37634fb80
1 changed files with 5 additions and 10 deletions
15
shell.nix
15
shell.nix
|
@ -10,15 +10,10 @@ in pkgs.mkShell {
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
mkdir -p secrets
|
mkdir -p secrets
|
||||||
|
PATH=${
|
||||||
|
pkgs.writeShellScriptBin "nix" ''
|
||||||
|
${pkgs.nixFlakes}/bin/nix --option experimental-features "nix-command flakes ca-references" $@
|
||||||
|
''
|
||||||
|
}/bin:$PATH
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_CONF_DIR = let
|
|
||||||
current = pkgs.lib.optionalString (builtins.pathExists /etc/nix/nix.conf)
|
|
||||||
(builtins.readFile /etc/nix/nix.conf);
|
|
||||||
|
|
||||||
nixConf = pkgs.writeTextDir "opt/nix.conf" ''
|
|
||||||
${current}
|
|
||||||
experimental-features = nix-command flakes ca-references
|
|
||||||
'';
|
|
||||||
in "${nixConf}/opt";
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue