50 lines
1.4 KiB
Nix
50 lines
1.4 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
home.packages = [
|
|
pkgs.nix-your-shell
|
|
pkgs.lolcat
|
|
pkgs.kittysay
|
|
];
|
|
|
|
programs.fish = {
|
|
enable = true;
|
|
shellInit = ''
|
|
function fish_prompt
|
|
if test -z $IN_NIX_SHELL
|
|
printf '%s%s λ %s' (set_color magenta) $(prompt_pwd) (set_color normal)
|
|
else
|
|
printf '%s%s%s [nix-shell %s]%s λ%s ' (set_color magenta) $(prompt_pwd) (set_color yellow) $IN_NIX_SHELL (set_color magenta) (set_color normal)
|
|
end
|
|
end
|
|
|
|
function fish_greeting
|
|
end
|
|
|
|
function nix-shell --description "Start an interactive shell based on a Nix expression"
|
|
nix-your-shell fish nix-shell -- $argv
|
|
end
|
|
|
|
function nix --description "Reproducible and declarative configuration management"
|
|
nix-your-shell fish nix -- $argv
|
|
end
|
|
'';
|
|
|
|
shellInitLast = ''
|
|
set fish_color_normal green
|
|
set fish_color_command magenta --bold
|
|
set fish_color_quote yellow
|
|
set fish_color_redirection white
|
|
set fish_color_end magenta
|
|
set fish_color_error red --bold
|
|
set fish_color_param blue
|
|
set fish_color_valid_path blue
|
|
set fish_color_option blue
|
|
set fish_color_comment brblack --italics
|
|
set fish_color_operator yellow
|
|
set fish_color_escape blue --italics
|
|
set fish_color_autosuggestion brblack
|
|
set fish_color_cancel brblack
|
|
'';
|
|
};
|
|
}
|