From 453bc1f249d6b481e9a32d3f4b0e3625760dcf6d Mon Sep 17 00:00:00 2001 From: biscuit Date: Tue, 20 May 2025 06:31:39 -0500 Subject: [PATCH] upd --- modules/biscuit/editor.nix | 3 ++- pkgs/fish/biscuit.nix | 22 ++++++++++++++++++++++ system/term.nix | 13 ++++++++++++- system/users.nix | 3 ++- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 pkgs/fish/biscuit.nix diff --git a/modules/biscuit/editor.nix b/modules/biscuit/editor.nix index 7cba168..4d2cd86 100644 --- a/modules/biscuit/editor.nix +++ b/modules/biscuit/editor.nix @@ -4,6 +4,7 @@ ../../pkgs/git/biscuit.nix ../../pkgs/kitty/biscuit.nix ../../pkgs/neovim/biscuit.nix - ../../pkgs/zsh/biscuit.nix + ../../pkgs/fish/biscuit.nix + # ../../pkgs/zsh/biscuit.nix ]; } diff --git a/pkgs/fish/biscuit.nix b/pkgs/fish/biscuit.nix new file mode 100644 index 0000000..14b64bc --- /dev/null +++ b/pkgs/fish/biscuit.nix @@ -0,0 +1,22 @@ +{...}: { + programs.fish = { + + plugins = with pkgs.fishPlugins; [ + { + name = "z"; + src = pkgs.fetchFromGitHub { + owner = "jethrokuan"; + repo = "z"; + rev = "e0e1b9dfdba362f8ab1ae8c1afc7ccf62b89f7eb"; + sha256 = "0dbnir6jbwjpjalz14snzd3cgdysgcs3raznsijd6savad3qhijc"; + }; + } + ]; + }; + shellAliases = { + ll = "ls -l"; + upd = "sudo nixos-rebuild switch --flake ~/Nixos/#biscuit"; + hupd = "home-manager switch --flake ~/Nixos/#biscuit"; + agu = "pkill gjs & ags run ~/Nixos/pkgs/ags/biscuit/app.ts &"; + }; +} diff --git a/system/term.nix b/system/term.nix index 2c1f221..9940eb9 100644 --- a/system/term.nix +++ b/system/term.nix @@ -1,3 +1,14 @@ -{...}: { +{pkgs, ...}: { + programs.bash = { + interactiveShellInit = '' + if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; + programs.zsh.enable = true; + programs.fish.enable = true; } diff --git a/system/users.nix b/system/users.nix index ed55a5b..3c22ff1 100644 --- a/system/users.nix +++ b/system/users.nix @@ -3,7 +3,8 @@ isNormalUser = true; extraGroups = [ "wheel" "networkmanager" ]; initialHashedPassword = "$6$Qab6SSvEJM2YRtVA$7Oyl7E3pp/FKtCC.2Tb2tyzp3yp7BFHFAKngUYJssQJ.v1Q2mqsgW9m7njpaKNcka2vyCwrnmw1R.YPlFqR0p1"; - shell = pkgs.zsh; + # shell = pkgs.zsh; + shell = pkgs.fish; packages = with pkgs; [ ]; };