Files
nix-config/home/shell/default.nix
2023-05-08 02:18:06 +08:00

44 lines
980 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{config, ...}: let
d = config.xdg.dataHome;
c = config.xdg.configHome;
cache = config.xdg.cacheHome;
in {
imports = [
./nushell
./common.nix
./starship.nix
./terminals.nix
];
programs.bash = {
enable = true;
enableCompletion = true;
bashrcExtra = ''
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
'';
};
# add environment variables
# 注意不要用 home.sessionVariables 或 home.xxx.sessionVariables这俩参数没用
systemd.user.sessionVariables = {
# clean up ~
LESSHISTFILE = cache + "/less/history";
LESSKEY = c + "/less/lesskey";
WINEPREFIX = d + "/wine";
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
# set default applications
EDITOR = "vim";
BROWSER = "firefox";
TERMINAL = "alacritty";
# enable scrolling in git diff
DELTA_PAGER = "less -R";
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
};
home.shellAliases = {
k = "kubectl";
};
}