qenya/zsh: use direnv to load local dev shells
This commit is contained in:
parent
8e4b0d26b3
commit
17402985b6
|
@ -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
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue