[Nix-dev] Garbled man pages/incomplete environment
Jeffrey David Johnson
jefdaj at gmail.com
Sat Jul 4 18:24:13 CEST 2015
I'm having the same issue described here on the Gentoo forums:
https://forums.gentoo.org/viewtopic-t-670013.html
Man pages are hard to read because they're full of control characters. For example:
NIXOS-REBUILD(8) NixOS Reference Pages NIXOS-REBUILD(8)
ESC[1mNAMEESC[0m
nixos-rebuild - reconfigure a NixOS machine
ESC[1mSYNOPSISESC[0m
ESC[1mnixos-rebuild ESC[22m{ESC[1mswitch ESC[22m| ESC[1mboot ESC[22m| ESC[1mtest
ESC[22m| ESC[1mbuild ESC[22m| ESC[1mdry-build ESC[22m| ESC[1mdry-activate ESC[22m|
...
I expect it's a problem with my environment variables, so
here's my profile.nix which I import into configuration.nix:
with import <mypkgs>;
{
programs.bash = {
enableCompletion = true;
# promptInit = "PS1=\"# \"";
};
# replaces traditional xinitrc
services.xserver.displayManager.sessionCommands = ''
export EDITOR=qvim # why no gvim?
xsetroot -cursor_name left_ptr &
[[ -a ~/.fehbg ]] && eval $(cat ~/.fehbg)
unclutter -idle 1 &
eval "$(ssh-agent -s)" &
'';
environment.variables = lib.mkForce rec {
EDITOR = "vim" ;
TERM = TERMINAL;
TERMINAL = "xfce4-terminal";
};
# this gets reset if in environment.variables for some reason
environment.interactiveShellInit = ''
export NIX_PATH=/git/hub/nixcfg
'';
# TODO why can't nix-env find things on the regular NIX_PATH?
environment.shellAliases = {
"nix-env" = "nix-env -f ${<mypkgs>}";
};
}
As you can see I also have issues setting up NIX_PATH.
The current kludgy solution is working OK, but if you know
how to clean it up please mention that too! My worry is
that I've deleted all the environment variables not
mentioned here including some important ones, and man
pages are just the first thing I noticed.
Thanks
Jeff
More information about the nix-dev
mailing list