diff options
author | mediocregopher <mediocregopher@gmail.com> | 2024-01-06 11:59:31 +0100 |
---|---|---|
committer | mediocregopher <mediocregopher@gmail.com> | 2024-01-06 12:03:53 +0100 |
commit | a0e3c9325bc56a15c3784f91a02c74cb93f879f8 (patch) | |
tree | bb46c0c4adf677069d626b512f5a9100d637bcb9 | |
parent | d211b2efba99d17eab42439b4353865fa16f40bc (diff) |
Move bin derivation to global default.nix
-rwxr-xr-x | bin/sshfs | 3 | ||||
-rw-r--r-- | default.nix | 15 | ||||
-rw-r--r-- | zsh/default.nix | 31 | ||||
-rw-r--r-- | zsh/zshrc | 6 |
4 files changed, 22 insertions, 33 deletions
diff --git a/bin/sshfs b/bin/sshfs deleted file mode 100755 index d5d5ee7..0000000 --- a/bin/sshfs +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -/usr/bin/sshfs -oTCPKeepAlive=yes -oServerAliveCountMax=1 -oServerAliveInterval=5 $@ diff --git a/default.nix b/default.nix index fa82987..f12d079 100644 --- a/default.nix +++ b/default.nix @@ -36,7 +36,19 @@ in rec { exec ${pkgs.git}/bin/git "$@" ''; - zsh = ((import ./zsh) { inherit config; }).zsh; + bin = pkgs.buildEnv { + name = "mediocregopher-bin"; + paths = [ + (pkgs.runCommand "mediocregopher-default-bin" {} '' + mkdir -p "$out" + cp -rL "${./bin}" "$out"/bin + '') + ] ++ ( + builtins.map (cFn: cFn pkgs) config.binExtra + ); + }; + + zsh = ((import ./zsh) {}).zsh; awesome = ((import ./awesome) { inherit config; }); loadout = pkgs.buildEnv { @@ -95,6 +107,7 @@ in rec { pkgs.xterm # nice to have a backup + bin ((import ./nvim) {}).nvim zsh ((import ./alacritty) { inherit config zsh; }).alacritty diff --git a/zsh/default.nix b/zsh/default.nix index bc4a795..51fba90 100644 --- a/zsh/default.nix +++ b/zsh/default.nix @@ -1,31 +1,12 @@ { 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" '' - # Import before anything else, so that we have the full PATH available for everything following + # Import before anything else, so that we have the full PATH available for + # everything following . ${pkgs.nix}/etc/profile.d/nix.sh # oh-my-zsh @@ -36,14 +17,6 @@ plugins=(git vi-mode) source $ZSH/oh-my-zsh.sh - export PATH=${bin}/bin:$PATH - - #Global stuff shitty programs use - export EDITOR=~/.nix-profile/bin/nvim - - # GPG is needy - export GPG_TTY=$(tty) - . ${./zshrc} . ${./aliases} ''; @@ -1,3 +1,9 @@ +#Global stuff shitty programs use +export EDITOR=~/.nix-profile/bin/nvim + +# GPG is needy +export GPG_TTY=$(tty) + #Correctly background processes setopt nohup |