summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authormediocregopher <mediocregopher@gmail.com>2023-08-13 21:34:14 +0200
committermediocregopher <mediocregopher@gmail.com>2023-08-13 21:35:17 +0200
commit1957081c122fe231eb6120192489dd979d214317 (patch)
treeb8cd0812ec3c0452d54cb789ba938e6f0c0e8278 /zsh
parentef8da74f1ae38d9eceb68846fe9ef402c8e30fcf (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')
-rw-r--r--zsh/default.nix29
-rw-r--r--zsh/env18
2 files changed, 26 insertions, 21 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
'';
diff --git a/zsh/env b/zsh/env
deleted file mode 100644
index 0188d76..0000000
--- a/zsh/env
+++ /dev/null
@@ -1,18 +0,0 @@
-#Global stuff shitty programs use
-export EDITOR=~/.nix-profile/bin/nvim
-
-#Basics
-export PATH=$PATH:/bin
-export PATH=$PATH:/usr/bin
-export PATH=$PATH:/usr/local/bin
-
-#my shit
-export PATH=~/bin:$PATH
-
-#Go has its own path system. Way to be difficult go
-export GOPATH=~/.go
-export GOBIN=$GOPATH/bin
-export PATH=$GOPATH/bin:$PATH
-
-# GPG is needy
-export GPG_TTY=$(tty)