jungle/m/common/base/env.nix

52 lines
1.1 KiB
Nix

{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
nix-diff ipmitool freeipmi ethtool lm_sensors cmake gnumake file tree
ncdu perf ldns pv
nix-output-monitor
# From jungle overlay
osumb nixgen
];
programs.direnv.enable = true;
# Increase limits
security.pam.loginLimits = [
{
domain = "*";
type = "-";
item = "memlock";
value = "1048576"; # 1 GiB of mem locked
}
];
environment.enableAllTerminfo = true;
environment.variables = {
EDITOR = "vim";
VISUAL = "vim";
};
programs.bash.promptInit = # bash
''
if echo "$PATH" | grep -qc '/nix/store'; then
# Inside a nix shell, dumb prompt
PS1="\h\\$ "
elif [ "$TERM" != "dumb" ] ; then
PROMPT_COLOR="1;31m"
((UID)) && PROMPT_COLOR="1;32m"
PS1="\n\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] "
if test "$TERM" = "xterm"; then
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
fi
fi
'';
time.timeZone = "Europe/Madrid";
i18n.defaultLocale = "en_DK.UTF-8";
}