diff options
author | mediocregopher <mediocregopher@gmail.com> | 2023-08-13 21:34:14 +0200 |
---|---|---|
committer | mediocregopher <mediocregopher@gmail.com> | 2023-08-13 21:35:17 +0200 |
commit | 1957081c122fe231eb6120192489dd979d214317 (patch) | |
tree | b8cd0812ec3c0452d54cb789ba938e6f0c0e8278 /zsh/default.nix | |
parent | ef8da74f1ae38d9eceb68846fe9ef402c8e30fcf (diff) |
Update branch with all changes which could be brought in from private branches
For a while I was keeping a private branch where there were a lot of
non-public things included, and that became the de-facto branch while
this one lagged. This one is now up-to-date, all private stuff is dealt
with via config files which are not committed.
Diffstat (limited to 'zsh/default.nix')
-rw-r--r-- | zsh/default.nix | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/zsh/default.nix b/zsh/default.nix index 5071c9f..c324a33 100644 --- a/zsh/default.nix +++ b/zsh/default.nix @@ -1,11 +1,29 @@ { - pkgs ? (import ../pkgs.nix) {}, + pkgs ? (import ../pkgs.nix).stable {}, + config, }: rec { ohMyZsh = ./oh-my-zsh; + bin = pkgs.buildEnv { + name = "mediocregopher-bin"; + paths = [ + (pkgs.stdenv.mkDerivation { + name = "mediocregopher-default-bin"; + src = ../bin; + builder = builtins.toFile "builder.sh" '' + source $stdenv/setup + mkdir -p "$out" + cp -rL "$src" "$out"/bin + ''; + }) + ] ++ ( + builtins.map (cFn: cFn pkgs) config.binExtra + ); + }; + zshrc = pkgs.writeTextDir ".zshrc" '' # oh-my-zsh @@ -16,10 +34,15 @@ plugins=(git vi-mode) source $ZSH/oh-my-zsh.sh - PATH=${../bin}:$PATH + export PATH=${bin}/bin:$PATH + + #Global stuff shitty programs use + export EDITOR=~/.nix-profile/bin/nvim + + # GPG is needy + export GPG_TTY=$(tty) . ${./zshrc} - . ${./env} . ${./aliases} . ${pkgs.nix}/etc/profile.d/nix.sh ''; |