From aa68e8619af59ae90cd6866cb3c21b659390fa0e Mon Sep 17 00:00:00 2001 From: Sam Willcocks Date: Mon, 10 Jan 2022 13:22:07 +0000 Subject: [PATCH] Add direnv, reorder home.nix --- home.nix | 52 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/home.nix b/home.nix index d63ab86..435f00d 100644 --- a/home.nix +++ b/home.nix @@ -5,6 +5,39 @@ in { home.packages = mypkgs.all; programs = { home-manager.enable = true; + + # Shell and env-y stuff + zsh = { + enable = true; + envExtra = '' + export SSH_AUTH_SOCK=/Users/sam.willcocks/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh + ''; + shellAliases = { + g = "git"; + cat = "bat"; + hmswitch = ''home-manager switch --flake ".#$(hostname -s)"''; + nrswitch = "nixos-rebuild switch --flake '.#'"; + }; + prezto = { + enable = true; + prompt.theme = "giddie"; + }; + plugins = [{ + name = "zsh-z"; + file = "share/zsh-z/zsh-z.plugin.zsh"; + src = pkgs.zsh-z; + }]; + }; + + direnv = { + enable = true; + nix-direnv.enable = true; + nix-direnv.enableFlakes = true; + }; + + fzf.enable = true; + + # Tools git = { enable = true; userName = "Sam Willcocks"; @@ -39,24 +72,5 @@ in { include.path = "~/.gitconfig.local"; }; }; - fzf.enable = true; - zsh = { - enable = true; - shellAliases = { - g = "git"; - cat = "bat"; - hmswitch = ''home-manager switch --flake ".#$(hostname -s)"''; - nrswitch = "nixos-rebuild switch --flake '.#'"; - }; - prezto = { - enable = true; - prompt.theme = "giddie"; - }; - plugins = [{ - name = "zsh-z"; - file = "share/zsh-z/zsh-z.plugin.zsh"; - src = pkgs.zsh-z; - }]; - }; }; }