1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11: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
fi
if [ ! -e shell.nix ]; then
cat > default.nix <<'EOF'
cat > shell.nix <<'EOF'
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [];
shellHook = "export HISTFILE=${toString ./.history}";
shellHook = "export HISTFILE=''${toString ./.history}";
}
EOF
''${EDITOR:-vim} default.nix
''${EDITOR:-vim} shell.nix
fi
'';
in {