From f8e2746e7e39dd3912f24c31a9e55a1ab3364935 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 20 Dec 2020 20:09:09 -0500 Subject: [PATCH] Add shell.nix --- flake.nix | 3 +++ shell.nix | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 shell.nix diff --git a/flake.nix b/flake.nix index d88fbf5e..3c205c16 100644 --- a/flake.nix +++ b/flake.nix @@ -64,5 +64,8 @@ nixosConfigurations = mapHosts ./hosts { inherit system; }; + + devShell."${system}" = + import ./shell.nix { inherit pkgs; }; }; } diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..e8bcab0e --- /dev/null +++ b/shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import {} }: + +with pkgs; +let nixBin = + writeShellScriptBin "nix" '' + ${nixFlakes}/bin/nix --option experimental-features "nix-command flakes" "$@" + ''; +in mkShell { + buildInputs = [ + git + gnupg + nix-zsh-completions + ]; + shellHook = '' + export DOTFILES="$(pwd)" + export PATH="$DOTFILES/bin:${nixBin}/bin:$PATH" + ''; +}