From 026074a7feac49eef0f97b241f758ea303a042f9 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 22 Feb 2026 16:13:46 -0500 Subject: [PATCH] please work --- config/bash/bashrc | 17 +++-------------- home/modules/shell.nix | 21 +++++++-------------- hosts/xps15/configuration.nix | 18 ++++++++---------- 3 files changed, 18 insertions(+), 38 deletions(-) diff --git a/config/bash/bashrc b/config/bash/bashrc index a7a1b84..c7a5cc3 100644 --- a/config/bash/bashrc +++ b/config/bash/bashrc @@ -1,25 +1,14 @@ -for _hm in "/etc/profiles/per-user/$(id -un)" "$HOME/.nix-profile"; do - [ -f "$_hm/etc/profile.d/hm-session-vars.sh" ] && . "$_hm/etc/profile.d/hm-session-vars.sh" && break -done -unset _hm - -shopt -s autocd globstar histappend +shopt -s autocd cdspell dirspell globstar histappend HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/bash_history" -HISTSIZE=2000 -HISTFILESIZE=2000 +HISTSIZE=50000 +HISTFILESIZE=50000 HISTCONTROL=ignoreboth:erasedups export GPG_TTY=$(tty) -export THEME="${THEME:-midnight}" export FZF_COMPLETION_TRIGGER=';' export FZF_TMUX=1 -eval "$(fzf --bash)" -eval "$(direnv hook bash)" -eval "$(starship init bash)" -eval "$(zoxide init bash)" - fzf-config-widget() { local selected selected="$(rg --files --hidden "$HOME"/.config | sed "s|$HOME|~|" | \ diff --git a/home/modules/shell.nix b/home/modules/shell.nix index d6b4c7f..d34bc65 100644 --- a/home/modules/shell.nix +++ b/home/modules/shell.nix @@ -113,6 +113,10 @@ in (lib.mkIf claude { CLAUDE_CONFIG_DIR = "${config.xdg.configHome}/claude"; }) + { + THEME = config.theme; + INPUTRC = "${repoDir}/config/bash/inputrc"; + } ]; home.sessionPath = lib.mkMerge [ @@ -195,26 +199,19 @@ in } ''; - programs.bash = lib.mkIf (!hostConfig.isNixOS) { + programs.bash = { enable = true; - shellAliases = { - ls = "eza"; - l = "ls --color=auto --group-directories-first"; - ll = "l -alF"; - la = "ll -R"; + shellAliases = lib.mkIf (!hostConfig.isNixOS) { g = "git"; nv = "nvim"; }; - initExtra = '' - export INPUTRC="$HOME/.config/nix/config/bash/inputrc" - export THEME="''${THEME:-midnight}" + initExtra = lib.mkAfter '' [ -f "$HOME/.config/nix/config/bash/bashrc" ] && . "$HOME/.config/nix/config/bash/bashrc" ''; }; programs.starship = { enable = true; - enableBashIntegration = false; settings = { format = lib.concatStrings [ "$directory" @@ -265,7 +262,6 @@ in programs.fzf = { enable = true; - enableBashIntegration = false; defaultCommand = "rg --files --hidden"; defaultOptions = [ "--bind=ctrl-a:select-all" @@ -281,18 +277,15 @@ in programs.eza = { enable = true; - enableBashIntegration = false; git = true; }; programs.zoxide = { enable = true; - enableBashIntegration = false; }; programs.direnv = { enable = true; - enableBashIntegration = false; nix-direnv.enable = true; config.global = { hide_env_diff = true; diff --git a/hosts/xps15/configuration.nix b/hosts/xps15/configuration.nix index f978db5..286cac1 100644 --- a/hosts/xps15/configuration.nix +++ b/hosts/xps15/configuration.nix @@ -87,19 +87,17 @@ in programs.bash = { enable = true; shellAliases = { - ls = "eza"; - l = "ls --color=auto --group-directories-first"; - ll = "l -alF"; - la = "ll -R"; g = "git"; nv = "nvim"; }; - shellInit = '' - export INPUTRC="$HOME/.config/nix/config/bash/inputrc" - export THEME="midnight" - ''; - interactiveShellInit = '' - [ -f "$HOME/.config/nix/config/bash/bashrc" ] && . "$HOME/.config/nix/config/bash/bashrc" + loginShellInit = '' + for _hm in "/etc/profiles/per-user/$(id -un)" "$HOME/.nix-profile"; do + [ -f "$_hm/etc/profile.d/hm-session-vars.sh" ] && . "$_hm/etc/profile.d/hm-session-vars.sh" && break + done + unset _hm + if [ "$(tty)" = "/dev/tty1" ]; then + exec Hyprland + fi ''; }; programs.hyprland = {