2024-06-24 21:53:35 +02:00
|
|
|
{ common, ... }:
|
|
|
|
{
|
|
|
|
programs.bash = {
|
|
|
|
enable = true;
|
2024-07-09 17:21:17 +02:00
|
|
|
enableCompletion = true;
|
2024-06-24 21:53:35 +02:00
|
|
|
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
|
2024-07-09 18:16:28 +02:00
|
|
|
|
|
|
|
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 "$@"
|
|
|
|
}
|
|
|
|
|
2024-06-24 21:53:35 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
programs.direnv = {
|
|
|
|
enable = true;
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
};
|
|
|
|
}
|