diff options
| author | seth <[email protected]> | 2024-02-03 19:27:26 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-03 20:47:55 -0500 |
| commit | fcc60b84e5e3cc44986d40af63f5de488caae909 (patch) | |
| tree | 45f4455c7dcbc63e59e62a9af79783e2e5509a2e /users/seth/shell | |
| parent | de003fa28e56b81a33e831099987cd94d2f53b39 (diff) | |
make everything a module
Diffstat (limited to 'users/seth/shell')
| -rw-r--r-- | users/seth/shell/bash.nix | 22 | ||||
| -rw-r--r-- | users/seth/shell/default.nix | 21 | ||||
| -rw-r--r-- | users/seth/shell/fish.nix | 40 | ||||
| -rw-r--r-- | users/seth/shell/nu.nix | 36 | ||||
| -rw-r--r-- | users/seth/shell/zsh.nix | 115 |
5 files changed, 0 insertions, 234 deletions
diff --git a/users/seth/shell/bash.nix b/users/seth/shell/bash.nix deleted file mode 100644 index 46c03d4..0000000 --- a/users/seth/shell/bash.nix +++ /dev/null @@ -1,22 +0,0 @@ -{config, ...}: { - programs.bash = { - enable = true; - # TODO: find out if i need this anymore with standalone HM - bashrcExtra = '' - nixfile=${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.sh - [ -e "$nixfile" ] && source "$nixfile" - ''; - historyFile = "${config.xdg.stateHome}/bash/history"; - historyFileSize = 1000; - historySize = 100; - 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 deleted file mode 100644 index 49192ce..0000000 --- a/users/seth/shell/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{config, ...}: { - imports = [ - ./bash.nix - ./fish.nix - ]; - - home = { - sessionVariables = rec { - EDITOR = "nvim"; - VISUAL = EDITOR; - CARGO_HOME = "${config.xdg.dataHome}/cargo"; - LESSHISTFILE = "${config.xdg.stateHome}/less/history"; - }; - - shellAliases = { - diff = "diff --color=auto"; - g = "git"; - gs = "g status"; - }; - }; -} diff --git a/users/seth/shell/fish.nix b/users/seth/shell/fish.nix deleted file mode 100644 index 279b021..0000000 --- a/users/seth/shell/fish.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - programs.fish = { - enable = true; - catppuccin.enable = true; - - interactiveShellInit = '' - set -l nixfile ${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.fish - if test -e $nixfile - source $nixfile - end - - ${lib.getExe pkgs.nix-your-shell} fish | source - - abbr -a !! --position anywhere --function last_history_item - ''; - - functions = { - last_history_item.body = "echo $history[1]"; - }; - - shellAbbrs = { - nixgc = "sudo nix-collect-garbage -d && nix-collect-garbage -d"; - }; - - plugins = let - mkFishPlugins = builtins.map (plugin: { - name = plugin; - inherit (pkgs.fishPlugins.${plugin}) src; - }); - in - mkFishPlugins [ - "autopair" - ]; - }; -} diff --git a/users/seth/shell/nu.nix b/users/seth/shell/nu.nix deleted file mode 100644 index 1437a97..0000000 --- a/users/seth/shell/nu.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - config, - lib, - inputs, - ... -}: let - theme = "catppuccin-${config.catppuccin.flavour}"; -in { - programs = { - nushell = { - enable = true; - - configFile.text = '' - def "nixgc" [] { - sudo nix-collect-garbage -d; nix-collect-garbage -d - } - ''; - - envFile.text = '' - use ${inputs.nu-scripts}/themes/nu-themes/${theme}.nu - $env.config.color_config = (${theme}) - ''; - - inherit (config.home) shellAliases; - }; - - bash.initExtra = lib.mkAfter '' - if [[ $(ps --no-header --pid=$PPID --format=comm) != "nu" && -z ''${BASH_EXECUTION_STRING} ]]; then - exec ${lib.getExe config.programs.nushell.package} - fi - ''; - - # builtin `ls` is good here! - eza.enable = lib.mkForce false; - }; -} diff --git a/users/seth/shell/zsh.nix b/users/seth/shell/zsh.nix deleted file mode 100644 index 2842a1f..0000000 --- a/users/seth/shell/zsh.nix +++ /dev/null @@ -1,115 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - programs.zsh = { - enable = true; - enableAutosuggestions = 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 = '' - if [[ -r "$XDG_CACHE_HOME/p10k-instant-prompt-*.zsh" ]]; then - source "$XDG_CACHE_HOME/p10k-instant-prompt-*.zsh" - fi - autoload -Uz promptinit colors - promptinit - colors - - ${lib.getExe pkgs.nix-your-shell} zsh | source /dev/stdin - - 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 - - # 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 - - [[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh - ''; - - history = { - expireDuplicatesFirst = true; - path = "${config.xdg.stateHome}/zsh/zsh_history"; - save = 1000; - size = 100; - }; - - plugins = [ - { - 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"; - } - - { - name = "nix-zsh-completions"; - src = pkgs.nix-zsh-completions; - file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh"; - } - - { - name = "powerlevel10k"; - src = pkgs.zsh-powerlevel10k; - file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - } - - { - name = "zsh-autopair"; - src = pkgs.zsh-autopair; - file = "share/zsh/zsh-autopair/autopair.zsh"; - } - - { - name = "zsh-completions"; - src = pkgs.zsh-completions; - file = "share/zsh-completions/zsh-completions.plugin.zsh"; - } - ]; - - enableSyntaxHighlighting = true; - }; -} |
