diff --git a/home/shell/fish/default.nix b/home/shell/fish/default.nix new file mode 100644 index 0000000..cae2272 --- /dev/null +++ b/home/shell/fish/default.nix @@ -0,0 +1,31 @@ +{ pkgs, ...}: + +{ + # Fix underlying System POSIX bugs + 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.fish = { + enable = true; + shellAbbrs = { + ls = "eza"; + la = "eza -la"; + }; + interactiveShellInit = '' + fish_config prompt choose disco + function fish_greeting + fastfetch + echo (set_color yellow)(date +%T)(set_color normal) on $hostname + end + ''; + }; + + +} diff --git a/users/phil/home.nix b/users/phil/home.nix index 9df3934..cf2edb5 100644 --- a/users/phil/home.nix +++ b/users/phil/home.nix @@ -7,7 +7,8 @@ imports = [ ../../home/core.nix - + + ../../home/shell/fish ../../home/hyprland ../../home/programs ../../home/rofi diff --git a/users/phil/nixos.nix b/users/phil/nixos.nix index a76f13e..c231324 100644 --- a/users/phil/nixos.nix +++ b/users/phil/nixos.nix @@ -16,27 +16,4 @@ shell = pkgs.fish; }; - 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.fish = { - enable = true; - shellAbbrs = { - ls = "eza"; - la = "eza -la"; - }; - interactiveShellInit = '' - fish_config prompt choose disco - function fish_greeting - echo (set_color yellow)(date +%T)(set_color normal) on $hostname - end - ''; - }; }