summaryrefslogtreecommitdiff
path: root/users/seth/shell
diff options
context:
space:
mode:
authorseth <[email protected]>2023-02-20 01:53:23 -0500
committerseth <[email protected]>2023-02-20 01:53:23 -0500
commit0957b051ef4befd86ce97deef04f5095bea9543b (patch)
treea669111fa7b0123a4e77819ddce0c0c75bef554f /users/seth/shell
parenta276cdbfa83425423c096d8049e6e29770018e31 (diff)
start using nixpkgs-fmt
Diffstat (limited to 'users/seth/shell')
-rw-r--r--users/seth/shell/bash.nix60
-rw-r--r--users/seth/shell/default.nix46
-rw-r--r--users/seth/shell/fish.nix38
-rw-r--r--users/seth/shell/zsh/default.nix169
4 files changed, 156 insertions, 157 deletions
diff --git a/users/seth/shell/bash.nix b/users/seth/shell/bash.nix
index 0dfb717..031542b 100644
--- a/users/seth/shell/bash.nix
+++ b/users/seth/shell/bash.nix
@@ -1,31 +1,31 @@
-{config, ...}: {
- programs.bash = {
- enable = true;
- bashrcExtra = ''
- if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z "$BASH_EXECUTION_STRING" ]]
- then
- exec fish
- fi
- '';
- historyFile = "${config.xdg.stateHome}/bash/history";
- historyFileSize = 1000;
- historySize = 100;
- sessionVariables = {
- EDITOR = "nvim";
- VISUAL = "nvim";
- CARGO_HOME = "${config.xdg.dataHome}/cargo";
- RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
- LESSHISTFILE = "${config.xdg.stateHome}/less/history";
- NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
- };
- shellOptions = [
- "cdspell"
- "checkjobs"
- "checkwinsize"
- "dirspell"
- "globstar"
- "histappend"
- "no_empty_cmd_completion"
- ];
- };
+{ config, ... }: {
+ programs.bash = {
+ enable = true;
+ bashrcExtra = ''
+ if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z "$BASH_EXECUTION_STRING" ]]
+ then
+ exec fish
+ fi
+ '';
+ historyFile = "${config.xdg.stateHome}/bash/history";
+ historyFileSize = 1000;
+ historySize = 100;
+ sessionVariables = {
+ EDITOR = "nvim";
+ VISUAL = "nvim";
+ CARGO_HOME = "${config.xdg.dataHome}/cargo";
+ RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
+ LESSHISTFILE = "${config.xdg.stateHome}/less/history";
+ NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
+ };
+ shellOptions = [
+ "cdspell"
+ "checkjobs"
+ "checkwinsize"
+ "dirspell"
+ "globstar"
+ "histappend"
+ "no_empty_cmd_completion"
+ ];
+ };
}
diff --git a/users/seth/shell/default.nix b/users/seth/shell/default.nix
index ae0afa8..2529a48 100644
--- a/users/seth/shell/default.nix
+++ b/users/seth/shell/default.nix
@@ -1,26 +1,26 @@
-{config, ...}: {
- imports = [
- ./bash.nix
- ./fish.nix
- ./zsh
- ];
+{ config, ... }: {
+ imports = [
+ ./bash.nix
+ ./fish.nix
+ ./zsh
+ ];
- home.sessionVariables = {
- EDITOR = "nvim";
- VISUAL = "nvim";
- CARGO_HOME = "${config.xdg.dataHome}/cargo";
- RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
- LESSHISTFILE = "${config.xdg.stateHome}/less/history";
- NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
- };
+ home.sessionVariables = {
+ EDITOR = "nvim";
+ VISUAL = "nvim";
+ CARGO_HOME = "${config.xdg.dataHome}/cargo";
+ RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
+ LESSHISTFILE = "${config.xdg.stateHome}/less/history";
+ NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
+ };
- home.shellAliases = {
- ls = "exa --icons";
- la = "ls -a";
- diff = "diff --color=auto";
- g = "git";
- gs = "g status";
- nixsw = "sudo nixos-rebuild switch";
- nixup = "nixsw --upgrade";
- };
+ home.shellAliases = {
+ ls = "exa --icons";
+ la = "ls -a";
+ diff = "diff --color=auto";
+ g = "git";
+ gs = "g status";
+ nixsw = "sudo nixos-rebuild switch";
+ nixup = "nixsw --upgrade";
+ };
}
diff --git a/users/seth/shell/fish.nix b/users/seth/shell/fish.nix
index a5f9480..f00174f 100644
--- a/users/seth/shell/fish.nix
+++ b/users/seth/shell/fish.nix
@@ -1,21 +1,21 @@
-{pkgs, ...}: {
- programs.fish = {
- enable = true;
- plugins = [
- {
- name = "autopair-fish";
- src = pkgs.fishPlugins.autopair-fish;
- }
+{ pkgs, ... }: {
+ programs.fish = {
+ enable = true;
+ plugins = [
+ {
+ name = "autopair-fish";
+ src = pkgs.fishPlugins.autopair-fish;
+ }
- {
- name = "puffer-fish";
- src = pkgs.fetchFromGitHub {
- owner = "nickeb96";
- repo = "puffer-fish";
- rev = "fd0a9c95da59512beffddb3df95e64221f894631";
- sha256 = "sha256-aij48yQHeAKCoAD43rGhqW8X/qmEGGkg8B4jSeqjVU0=";
- };
- }
- ];
- };
+ {
+ name = "puffer-fish";
+ src = pkgs.fetchFromGitHub {
+ owner = "nickeb96";
+ repo = "puffer-fish";
+ rev = "fd0a9c95da59512beffddb3df95e64221f894631";
+ sha256 = "sha256-aij48yQHeAKCoAD43rGhqW8X/qmEGGkg8B4jSeqjVU0=";
+ };
+ }
+ ];
+ };
}
diff --git a/users/seth/shell/zsh/default.nix b/users/seth/shell/zsh/default.nix
index 8f78bcd..eb9145a 100644
--- a/users/seth/shell/zsh/default.nix
+++ b/users/seth/shell/zsh/default.nix
@@ -1,95 +1,94 @@
-{
- config,
- pkgs,
- ...
+{ config
+, pkgs
+, ...
}: {
- programs.zsh = {
- enable = false;
- enableAutosuggestions = true;
- enableSyntaxHighlighting = true;
- enableVteIntegration = true;
- completionInit = ''
- autoload -Uz bashcompinit compinit
- local zdump="${config.xdg.cacheHome}/zsh/zdump"
- bashcompinit
- compinit -d "$zdump"
- if [[ ! "$zdump.zwc" -nt "$zdump" ]]
- then
- zcompile "$zdump"
- fi
- unset zdump
- '';
- defaultKeymap = "emacs";
- dotDir = ".config/zsh";
- initExtra = ''
- autoload -Uz promptinit
- prompt walters
+ programs.zsh = {
+ enable = false;
+ enableAutosuggestions = true;
+ enableSyntaxHighlighting = true;
+ enableVteIntegration = true;
+ completionInit = ''
+ autoload -Uz bashcompinit compinit
+ local zdump="${config.xdg.cacheHome}/zsh/zdump"
+ bashcompinit
+ compinit -d "$zdump"
+ if [[ ! "$zdump.zwc" -nt "$zdump" ]]
+ then
+ zcompile "$zdump"
+ fi
+ unset zdump
+ '';
+ defaultKeymap = "emacs";
+ dotDir = ".config/zsh";
+ initExtra = ''
+ autoload -Uz promptinit
+ prompt walters
- zmodload zsh/zutil
- zmodload zsh/complist
- zstyle ":completion::*" group-name ""
- zstyle ":completion:*" menu "select"
- zstyle ":completion:*" squeeze-slashes "true"
- zstyle ":completion::*" use-cache "true"
- zstyle ":completion::*" cache-path "$zdump"
+ zmodload zsh/zutil
+ zmodload zsh/complist
+ zstyle ":completion::*" group-name ""
+ zstyle ":completion:*" menu "select"
+ zstyle ":completion:*" squeeze-slashes "true"
+ zstyle ":completion::*" use-cache "true"
+ zstyle ":completion::*" cache-path "$zdump"
- unsetopt beep
- unsetopt hist_beep
- unsetopt ignore_braces
- unsetopt list_beep
- setopt always_to_end
- setopt prompt_subst
- setopt share_history
+ unsetopt beep
+ unsetopt hist_beep
+ unsetopt ignore_braces
+ unsetopt list_beep
+ setopt always_to_end
+ setopt prompt_subst
+ setopt share_history
- # clear backbuffer with ctrl-l
- function clear-screen-and-scrollback() {
- echoti civis >"$TTY"
- printf '%b' '\e[H\e[2J' >"$TTY"
- zle .reset-prompt
- zle -R
- printf '%b' '\e[3J' >"$TTY"
- echoti cnorm >"$TTY"
- }
+ # clear backbuffer with ctrl-l
+ function clear-screen-and-scrollback() {
+ echoti civis >"$TTY"
+ printf '%b' '\e[H\e[2J' >"$TTY"
+ zle .reset-prompt
+ zle -R
+ printf '%b' '\e[3J' >"$TTY"
+ echoti cnorm >"$TTY"
+ }
- zle -N clear-screen-and-scrollback
- bindkey '^L' clear-screen-and-scrollback
- '';
- history = {
- expireDuplicatesFirst = true;
- path = "${config.xdg.stateHome}/zsh/zsh_history";
- save = 1000;
- size = 100;
- };
- plugins = [
- # {
- # name = "powerlevel10k";
- # src = pkgs.zsh-powerlevel10k;
- # file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
- # }
+ zle -N clear-screen-and-scrollback
+ bindkey '^L' clear-screen-and-scrollback
+ '';
+ history = {
+ expireDuplicatesFirst = true;
+ path = "${config.xdg.stateHome}/zsh/zsh_history";
+ save = 1000;
+ size = 100;
+ };
+ plugins = [
+ # {
+ # name = "powerlevel10k";
+ # src = pkgs.zsh-powerlevel10k;
+ # file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
+ # }
- {
- name = "zsh-completions";
- src = pkgs.zsh-completions;
- file = "share/zsh-completions/zsh-completions.plugin.zsh";
- }
+ {
+ name = "zsh-completions";
+ src = pkgs.zsh-completions;
+ file = "share/zsh-completions/zsh-completions.plugin.zsh";
+ }
- {
- name = "cattppuccin-zsh-syntax-highlighting";
- src = pkgs.fetchFromGitHub {
- owner = "catppuccin";
- repo = "zsh-syntax-highlighting";
- rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
- sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
- };
+ {
+ name = "cattppuccin-zsh-syntax-highlighting";
+ src = pkgs.fetchFromGitHub {
+ owner = "catppuccin";
+ repo = "zsh-syntax-highlighting";
+ rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
+ sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
+ };
- file = "themes/catppuccin_mocha-zsh-syntax-highlighting.zsh";
- }
+ file = "themes/catppuccin_mocha-zsh-syntax-highlighting.zsh";
+ }
- # {
- # name = "powerlevel10k-config";
- # src = ./files;
- # file = ".p10k.zsh";
- # }
- ];
- };
+ # {
+ # name = "powerlevel10k-config";
+ # src = ./files;
+ # file = ".p10k.zsh";
+ # }
+ ];
+ };
}