52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{ common, ... }:
|
|
{
|
|
programs.bash = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
historyFile = "/dev/null";
|
|
sessionVariables = {
|
|
PS1 ="\\033[1m\\u\\033[0m@\\033[1m\\h\\033[0m: \\w\nλ ";
|
|
BROWSER = "firefox";
|
|
XINITRC = "${common.homeDir}/bin/xinitrc";
|
|
XAUTHORITY = "${common.homeDir}/.local/share/Xauthority";
|
|
PASH_KEYID = "3E4A909C8FEF6E3783699C79DFC26EF8EDAD6D71";
|
|
QT_AUTO_SCREEN_FACTOR = 1;
|
|
PATH = "${common.homeDir}/bin:$PATH";
|
|
};
|
|
shellAliases = {
|
|
x = "startx";
|
|
rm = "rm -i";
|
|
cal = "cal -m";
|
|
};
|
|
initExtra = ''
|
|
source ~/.profile
|
|
set -o vi
|
|
|
|
run() {
|
|
pkg="$1"
|
|
[ "$pkg" = "''${pkg##*#}" ] && pkg="nixpkgs#$pkg"
|
|
export NIXPKGS_ALLOW_UNFREE=1 NIXPKGS_ALLOW_BROKEN=1
|
|
nix run --impure "$pkg"
|
|
}
|
|
|
|
shell() {
|
|
i="$#"
|
|
while [ "$i" -gt 0 ]; do
|
|
pkg="$1"
|
|
[ "$pkg" = "''${pkg##*#}" ] && pkg="nixpkgs#$pkg"
|
|
shift
|
|
set -- "$@" "$pkg"
|
|
: $(( i -= 1 ))
|
|
done
|
|
export NIXPKGS_ALLOW_UNFREE=1 NIXPKGS_ALLOW_BROKEN=1
|
|
nix shell --impure "$@"
|
|
}
|
|
|
|
'';
|
|
};
|
|
programs.direnv = {
|
|
enable = true;
|
|
nix-direnv.enable = true;
|
|
};
|
|
}
|