1
0
mirror of https://github.com/kmein/niveum synced 2026-03-20 20:01:08 +01:00

fix(direnv): correctly setup history file, use shell.nix

This commit is contained in:
Kierán Meinhardt
2019-09-01 10:34:52 +02:00
parent bc8140125d
commit 5ed1eeacbc

View File

@@ -7,14 +7,14 @@ let nixify = pkgs.writers.writeDashBin "nixify" ''
direnv allow direnv allow
fi fi
if [ ! -e shell.nix ]; then if [ ! -e shell.nix ]; then
cat > default.nix <<'EOF' cat > shell.nix <<'EOF'
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; []; buildInputs = with pkgs; [];
shellHook = "export HISTFILE=${toString ./.history}"; shellHook = "export HISTFILE=''${toString ./.history}";
} }
EOF EOF
''${EDITOR:-vim} default.nix ''${EDITOR:-vim} shell.nix
fi fi
''; '';
in { in {