From 5da8b87fc843646a7105e4888d22bfb4fb3a64cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Wed, 21 Dec 2022 21:03:18 +0100 Subject: [PATCH] feat: direnv --- .envrc | 1 + .gitignore | 1 + hosts/neodymium/configuration.nix | 6 ++++++ shell.nix | 3 +-- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .envrc create mode 100644 .gitignore diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92b2793 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv diff --git a/hosts/neodymium/configuration.nix b/hosts/neodymium/configuration.nix index ae63c70..4b9bb39 100644 --- a/hosts/neodymium/configuration.nix +++ b/hosts/neodymium/configuration.nix @@ -159,6 +159,7 @@ in { bindkey "^[[1;3D" backward-word bindkey '^H' backward-kill-word bindkey '5~' kill-word + eval "$(direnv hook zsh)" ''; plugins = [ { @@ -184,6 +185,11 @@ in { ]; }; + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; + programs.git = { enable = true; userName = "Laureηt"; diff --git a/shell.nix b/shell.nix index 0ff527c..43b7fce 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,3 @@ { pkgs ? import { } }: -with pkgs; -mkShell { buildInputs = [ colmena nixfmt ]; } +pkgs.mkShell { buildInputs = with pkgs; [ colmena nixfmt ]; }