From 17402985b68c86e4dd530ab060ffdabc7ceb8303 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 26 Feb 2025 11:07:53 +0000 Subject: [PATCH] qenya/zsh: use direnv to load local dev shells --- .envrc | 1 + home/qenya/zsh.nix | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..4a4726a --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_nix diff --git a/home/qenya/zsh.nix b/home/qenya/zsh.nix index 0d8ecc2..b3c0465 100644 --- a/home/qenya/zsh.nix +++ b/home/qenya/zsh.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: { + home.packages = with pkgs; [ direnv ]; programs.zsh = { enable = true; enableCompletion = true; @@ -26,19 +27,10 @@ oh-my-zsh = { enable = true; - plugins = [ "git" "sudo" ]; + plugins = [ "git" "sudo" "direnv" ]; theme = "agnoster"; }; - initExtra = '' - # If a shell is started in a directory with a shell.nix, automatically run nix-shell - if [ -f ./shell.nix ]; then - if [ -z "$IN_NIX_SHELL" ]; then - nix-shell --command "zsh" - fi - fi - ''; - envExtra = '' DEFAULT_USER=qenya '';