From c1cef0f7eafaf85bbae9878b92971a97d7583247 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Wed, 24 Sep 2025 13:35:39 -0500 Subject: changes; im lazy --- hosts/mercury/ai.nix | 2 +- hosts/mercury/config.nix | 1 + hosts/mercury/nixos.nix | 1 - modules/boot/nixos/default.nix | 10 ++++++++-- modules/terminal/hjem/default.nix | 2 ++ modules/terminal/hjem/programs/bash.nix | 27 ++++++++++++++------------- modules/terminal/hjem/programs/fish.nix | 15 +++++++++++++++ modules/terminal/hjem/programs/starship.nix | 5 ----- modules/terminal/nixos/bash.nix | 16 ++++++++++++++++ modules/terminal/nixos/default.nix | 4 ++++ 10 files changed, 61 insertions(+), 22 deletions(-) create mode 100644 modules/terminal/nixos/bash.nix diff --git a/hosts/mercury/ai.nix b/hosts/mercury/ai.nix index 42a478a..1ce6c25 100644 --- a/hosts/mercury/ai.nix +++ b/hosts/mercury/ai.nix @@ -3,5 +3,5 @@ enable = true; loadModels = ["deepseek-r1:1.5b"]; }; - environment.systemPackages = [pkgs.mcphost]; + # environment.systemPackages = [pkgs.mcphost]; } diff --git a/hosts/mercury/config.nix b/hosts/mercury/config.nix index d5f0832..d72277a 100644 --- a/hosts/mercury/config.nix +++ b/hosts/mercury/config.nix @@ -43,6 +43,7 @@ terminal = { shells.fish.enable = true; + shells.bash.enable = true; # for nix-shells programs = { tmux.enable = true; diff --git a/hosts/mercury/nixos.nix b/hosts/mercury/nixos.nix index 05e84a7..dfed04f 100644 --- a/hosts/mercury/nixos.nix +++ b/hosts/mercury/nixos.nix @@ -7,7 +7,6 @@ imports = [ ./disks.nix ./battery.nix - ./ai.nix inputs.nixos-facter-modules.nixosModules.facter {facter.reportPath = ./facter.json;} diff --git a/modules/boot/nixos/default.nix b/modules/boot/nixos/default.nix index 66f31fc..06e68c3 100644 --- a/modules/boot/nixos/default.nix +++ b/modules/boot/nixos/default.nix @@ -24,7 +24,7 @@ in { configurationLimit = 3; }; efi.canTouchEfiVariables = true; - timeout = 0; + timeout = 0; # hold space to show boot menu }; } // (lib.optionalAttrs cfg.secureBoot.enable { @@ -34,5 +34,11 @@ in { }; }); - environment.systemPackages = lib.mkIf cfg.secureBoot.enable [pkgs.sbctl]; + environment.systemPackages = + ( + if cfg.secureBoot.enable + then [pkgs.sbctl] + else [] + ) + ++ [pkgs.efibootmgr]; } diff --git a/modules/terminal/hjem/default.nix b/modules/terminal/hjem/default.nix index 7915319..681c3b3 100644 --- a/modules/terminal/hjem/default.nix +++ b/modules/terminal/hjem/default.nix @@ -10,6 +10,8 @@ ./programs/broot.nix ./programs/cmus.nix ./programs/helix.nix + ./programs/fish.nix + ./programs/bash.nix ]; } diff --git a/modules/terminal/hjem/programs/bash.nix b/modules/terminal/hjem/programs/bash.nix index 646cbf8..fe6f21d 100644 --- a/modules/terminal/hjem/programs/bash.nix +++ b/modules/terminal/hjem/programs/bash.nix @@ -8,22 +8,23 @@ in lib.mkIf cfg.enable { files = { - ".bashrc".text = '' + ".config/bash/bashrc".text = '' eval "$(direnv hook bash)" for file in ~/.config/bash/conf.d/*; do source "$file"; done ''; - - packages = with pkgs; [ - fish - ripgrep - fd - moreutils - zip - unzip - btop - jq - direnv - ]; }; + + packages = with pkgs; [ + fish + ripgrep + fd + wget + moreutils + zip + unzip + btop + jq + direnv + ]; } diff --git a/modules/terminal/hjem/programs/fish.nix b/modules/terminal/hjem/programs/fish.nix index 1aa4a40..2fdc184 100644 --- a/modules/terminal/hjem/programs/fish.nix +++ b/modules/terminal/hjem/programs/fish.nix @@ -8,6 +8,20 @@ in lib.mkIf cfg.enable { files = { + ".config/fish/conf.d/xdg.fish".text = + # fish + '' + set -gx XDG_DATA_HOME "$HOME/.local/share" + set -gx XDG_CONFIG_HOME "$HOME/.config" + set -gx XDG_STATE_HOME "$HOME/.local/state" + set -gx XDG_CACHE_HOME "$HOME/.cache" + + alias wget "wget --hsts-file=/dev/null" + set -gx GOPATH "$XDG_DATA_HOME/go" + set -gx GRADLE_USER_HOME "$XDG_DATA_HOME/gradle" + set -gx CARGO_HOME "$XDG_DATA_HOME/cargo" + ''; + ".config/fish/config.fish".text = '' set fish_greeting @@ -24,6 +38,7 @@ in fish ripgrep fd + wget moreutils zip unzip diff --git a/modules/terminal/hjem/programs/starship.nix b/modules/terminal/hjem/programs/starship.nix index e9d79b5..7f537d9 100644 --- a/modules/terminal/hjem/programs/starship.nix +++ b/modules/terminal/hjem/programs/starship.nix @@ -51,11 +51,6 @@ in starship init fish | source enable_transience ''; - }) - // (lib.optionalAttrs config.collinux.terminal.shells.bash.enable { - ".config/bash/conf.d/starship.bash".text = '' - eval "$(starship init bash)" - ''; }); packages = [pkgs.starship]; diff --git a/modules/terminal/nixos/bash.nix b/modules/terminal/nixos/bash.nix new file mode 100644 index 0000000..393ab94 --- /dev/null +++ b/modules/terminal/nixos/bash.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + ... +}: let + cfg = config.collinux.terminal.shells.bash; +in + lib.mkIf cfg.enable { + environment.etc = { + "bashrc.local".text = '' + if [ -s "''${XDG_CONFIG_HOME:-$HOME/.config}/bash/bashrc" ]; then + . "''${XDG_CONFIG_HOME:-$HOME/.config}/bash/bashrc" + fi + ''; + }; + } diff --git a/modules/terminal/nixos/default.nix b/modules/terminal/nixos/default.nix index 8118c63..4ececfa 100644 --- a/modules/terminal/nixos/default.nix +++ b/modules/terminal/nixos/default.nix @@ -1,6 +1,10 @@ {config, ...}: let cfg = config.collinux.terminal.shells; in { + imports = [ + ./bash.nix + ]; + programs.command-not-found.enable = false; # broken without nix-channels users.users."${config.collinux.user.name}" = { -- cgit v1.3.1