add nix-output-monitor

This commit is contained in:
Grigory Shipunov 2023-01-24 11:26:32 +01:00
parent a2732c6e6a
commit da02a43633
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C

View file

@ -58,7 +58,8 @@
# set appropriate environ variables # set appropriate environ variables
environment.variables = { environment.variables = {
EDITOR = "nvim"; EDITOR = "nvim";
PAGER = "less -F"; PAGER = "less";
LESS = "-X -R -F";
}; };
environment.shellAliases = { environment.shellAliases = {
@ -72,6 +73,8 @@
vff = "$EDITOR $(ls|fzf)"; vff = "$EDITOR $(ls|fzf)";
mutt = "neomutt"; mutt = "neomutt";
grep = "grep --color=auto"; grep = "grep --color=auto";
nix-build="${pkgs.nix-output-monitor}/bin/nom-build";
nix-shell="${pkgs.nix-output-monitor}/bin/nom-shell";
}; };
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
@ -86,6 +89,19 @@
export SAVEHIST=10000000 export SAVEHIST=10000000
# allow comments # allow comments
setopt interactivecomments setopt interactivecomments
# hacky wrapper for nix, so we can use nom automagically
export _nom_cmd=${pkgs.nix-output-monitor}/bin/nom
function nix {
case $1 in
build|shell|develop)
echo \[SUBSTITUTION\] ''$_nom_cmd ''${@:1} 1>&2
''$_nom_cmd ''${@:1}
;;
*)
${pkgs.nix}/bin/nix $@
esac
}
''; '';
promptInit = '' promptInit = ''
source ${pkgs.liquidprompt}/share/zsh/plugins/liquidprompt/liquidprompt source ${pkgs.liquidprompt}/share/zsh/plugins/liquidprompt/liquidprompt