aboutsummaryrefslogtreecommitdiffstats
path: root/home/don/common
diff options
context:
space:
mode:
Diffstat (limited to 'home/don/common')
-rw-r--r--home/don/common/core/bash.nix8
-rw-r--r--home/don/common/core/default.nix4
-rw-r--r--home/don/common/core/zsh/default.nix55
-rw-r--r--home/don/common/core/zsh/zshrc125
4 files changed, 7 insertions, 185 deletions
diff --git a/home/don/common/core/bash.nix b/home/don/common/core/bash.nix
index 77f0cf4..7bfb808 100644
--- a/home/don/common/core/bash.nix
+++ b/home/don/common/core/bash.nix
@@ -3,8 +3,14 @@
enable = true;
enableCompletion = true;
shellAliases = {
- ll = "ls -alF --color=auto";
+ grep = "grep --color=auto";
+ ip = "ip -c=auto";
la = "ls -aF --color=auto";
+ ll = "ls -alF --color=auto";
+ lock = "xscreensaver-command -lock";
+ nix-list-derivations = "nix-store --query --requisites /run/current-system | cut -d- -f2- | sort | uniq";
+ nix-list-generations = "nixos-rebuild list-generations";
+ zgrep = "zgrep --color=auto";
};
};
}
diff --git a/home/don/common/core/default.nix b/home/don/common/core/default.nix
index 5983f42..8250d0c 100644
--- a/home/don/common/core/default.nix
+++ b/home/don/common/core/default.nix
@@ -2,11 +2,7 @@
{
imports = [
./bash.nix
- #./git.nix
- #./ssh.nix
- #./tmux
./vim
- ./zsh
];
home = {
diff --git a/home/don/common/core/zsh/default.nix b/home/don/common/core/zsh/default.nix
deleted file mode 100644
index c78884f..0000000
--- a/home/don/common/core/zsh/default.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ lib, ... }:
-{
- programs.zsh = {
- enable = true;
-
- history = {
- save = 100000;
- size = 100000;
- };
-
- initExtra = (builtins.readFile ./zshrc);
-
- sessionVariables = let makePluginPath = format:
- (lib.strings.makeSearchPath format [
- "$HOME/.nix-profile/lib"
- "/run/current-system/sw/lib"
- "/etc/profiles/per-user/$USER/lib"
- ]) + ":$HOME/.${format}";
- in {
- _JAVA_AWT_WM_NONREPARENTING = 1; # fix stupid broken Java shit
- BROWSER = "firefox";
- CLAP_PATH = makePluginPath "clap";
- COLORFGBG = ";0";
- #COLORFGBG = "green;blue";
- #COLORTERM = "truecolor";
- DSSI_PATH = makePluginPath "dssi";
- EDITOR = "vim";
- LADSPA_PATH = makePluginPath "ladspa";
- LC_COLLATE = "C";
- LV2_PATH = makePluginPath "lv2";
- LXVST_PATH = makePluginPath "lxvst";
- #NNTPSERVER = "news.giganews.com";
- PAGER = "less";
- #PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
- PATH = "$HOME/bin:$PATH";
- #PS1 = "%B%n%b@%U%m%u/%l:%~> ";
- QUOTING_STYLE = "literal";
- VST_PATH = makePluginPath "vst";
- VST3_PATH = makePluginPath "vst3";
- };
-
- shellAliases = {
- #fixkeyboard = "setxkbmap -layout us -option caps:super -option compose:ralt";
- grep = "grep --color=auto";
- ip = "ip -c=auto";
- la = "ls -aF --color=auto";
- ll = "ls -alFhs --color=auto";
- lock = "xscreensaver-command -lock";
- nix-list-derivations = "nix-store --query --requisites /run/current-system | cut -d- -f2- | sort | uniq";
- nix-list-generations = "nixos-rebuild list-generations";
- steam-no-beta = "steam -clearbeta";
- zgrep = "zgrep --color=auto";
- };
- };
-}
diff --git a/home/don/common/core/zsh/zshrc b/home/don/common/core/zsh/zshrc
deleted file mode 100644
index f724569..0000000
--- a/home/don/common/core/zsh/zshrc
+++ /dev/null
@@ -1,125 +0,0 @@
-umask 022
-
-eval $(dircolors)
-
-# set SWAYSOCK correctly
-#if pgrep -U don -x sway >/dev/null; then
-# export SWAYSOCK=/run/user/$(id -u)/sway-ipc.$(id -u).$(pgrep -x sway).sock
-#fi
-
-# start sway by default if logging into tty1
-#if [[ -z "${DISPLAY}" ]] && [[ $(tty) == "/dev/tty1" ]]; then
-#
-# export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
-#
-# # set some Wayland specific variables
-# export MOZ_ENABLE_WAYLAND=1
-# export GDK_BACKEND=wayland
-# export QT_QPA_PLATFORM=wayland
-# export SDL_VIDEODRIVER=wayland
-# export XDG_SESSION_TYPE=wayland
-#
-# exec sway > ~/.sway.log
-#
-#fi
-
-# if already in Wayland, update the GPG TTY so ssh-askpass will work correctly
-#if [[ -n "${WAYLAND_DISPLAY}" ]]; then
-# gpg-connect-agent updatestartuptty /bye >/dev/null
-#fi
-
-# completion options
-setopt LIST_PACKED MENU_COMPLETE
-# expansion and globbing options
-setopt NO_NOMATCH
-# history options
-setopt SHARE_HISTORY EXTENDED_HISTORY HIST_FCNTL_LOCK HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS HIST_SAVE_NO_DUPS
-# input/output options
-setopt PRINT_EXIT_VALUE RM_STAR_SILENT
-# job control options
-setopt LONG_LIST_JOBS NO_HUP
-# zle options
-setopt NO_BEEP
-
-# menu completion
-zstyle ':completion:*' menu select=5
-
-# vi keybindings and settings
-bindkey -v
-export KEYTIMEOUT=1
-autoload -U edit-command-line
-zle -N edit-command-line
-bindkey -M vicmd v edit-command-line
-
-# always open tmux if interactive
-[[ $- != *i* ]] && return
-#[[ -z "$TMUX" ]] && (tmux -2 new-session -t default \; new-window || tmux -2 new-session -s default)
-[[ -z "$TMUX" ]] && (tmux -2 attach -t default || tmux -2 new-session -s default)
-
-# useful helper functions
-function nix-file-list { find $(nix build ${1} --print-out-paths --no-link) }
-
-function ntrace {
-
- if [[ -z ${argv} ]]; then
- echo 'you must specify a command to strace!' >&2
- return 1
- fi
-
- eval strace -f -e trace=network -s 10000 ${=argv[@]}
-
-}
-
-# prompt/theme shit
-function precmd {
-
- local RC=${?}
- #local RC=${(%)RC-%?}
-
- print -nP '\n'
-
- # current user
- if [[ ${EUID} -eq 0 ]]; then
- print -nP '%{%S%F{red}%}%n%{%f%s%}'
- else
- print -nP '%{%F{magenta}%}%n%{%f%}'
- fi
-
- print -nP '@'
-
- # current host
- if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
- print -nP '%{%F{yellow}%}%m%{%f%}'
- else
- print -nP '%{%F{green}%}%m%{%f%}'
- fi
-
- # connected terminal
- print -nP '/%{%U%}%l%{%u%} '
-
- # cwd
- print -nP '%{%F{cyan}%}%~%{%f%} '
-
- # job count
- JOBCOUNT='%j'
- if [[ ${(%)JOBCOUNT} -gt 0 ]]; then
- print -nP 'j=%{%F{yellow}%}%j%{%f%} '
- fi
-
- # previous return code
- if [[ ${RC} -ne 0 ]]; then
- print -nP 'rc=%{%F{red}%}'
- echo -n "${RC}"
- print -nP '%{%f%} '
- else
- print -nP 'rc=%{%F{green}%}'
- echo -n "${RC}"
- print -nP '%{%f%} '
- fi
-
- # time stamp
- print -P '%{%F{cyan}%}%D{%FT%T%z}%{%f%}'
-
-}
-
-PS1='%# '