diff --git a/modules/common.nix b/modules/common.nix index 702273e..6400120 100755 --- a/modules/common.nix +++ b/modules/common.nix @@ -18,6 +18,7 @@ users.users.nettika = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" ]; + shell = pkgs.fish; }; security.sudo.wheelNeedsPassword = false; @@ -47,6 +48,10 @@ ''; }; + programs.fish = { + enable = true; + }; + environment.systemPackages = with pkgs; [ git-crypt htop diff --git a/modules/prompt.nix b/modules/prompt.nix index 68f8b27..dad4f4c 100644 --- a/modules/prompt.nix +++ b/modules/prompt.nix @@ -7,4 +7,24 @@ config.programs.bash.promptInit = '' PS1="\[\e]0;\u@\h: \w\a\]\n${config.promptEmoji} \[\033[1;$((UID ? 32 : 31))m\]\w \\$\[\033[0m\] " ''; + + config.programs.fish = { + promptInit = '' + function fish_prompt + echo -n '${config.promptEmoji} ' + set_color brgreen + echo -n (prompt_pwd) + set_color normal + echo -n ' > ' + end + function fish_right_prompt + set_color bryellow + echo -n (git branch --show-current 2>/dev/null) + end + ''; + shellInit = '' + set -g fish_greeting + set -g fish_prompt_pwd_full_dirs 999 + ''; + }; }