nix-config/modules/basic-tools.nix

114 lines
2.2 KiB
Nix
Raw Normal View History

{ lib, config, pkgs, inputs, ... }:
2022-05-25 19:27:42 +02:00
{
environment.systemPackages = with pkgs; [
bat
fd
file
fzf
2022-06-17 13:12:25 +02:00
git
2022-05-25 19:27:42 +02:00
gnupg
htop
irssi
killall
neovim
ripgrep
tealdeer
traceroute
2022-09-27 01:16:19 +02:00
tcpdump
2022-05-25 19:27:42 +02:00
tree
(aspellWithDicts (ps: with ps; [ en en-science en-computers ru de ]))
exfatprogs
nmap
bind
nnn
2023-01-09 18:23:59 +01:00
ranger
2022-05-25 19:27:42 +02:00
man-pages
2022-09-28 21:42:37 +02:00
wlsunset
2022-10-03 13:06:00 +02:00
screen
2022-05-25 19:27:42 +02:00
];
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# override default nix shell nixpkgs# behaviour to use current flake lock
nix.registry =
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs.self.inputs;
in builtins.mapAttrs (name: v: { flake = v; }) flakes;
nix.nixPath = lib.mapAttrsToList (name: value: "${name}=${value.outPath}") inputs.self.inputs;
2022-05-25 19:27:42 +02:00
programs.tmux = {
enable = true;
keyMode = "vi";
escapeTime = 0;
historyLimit = 50000;
aggressiveResize = true;
terminal = "tmux-256color";
};
# set appropriate environ variables
environment.variables = {
EDITOR = "nvim";
2023-01-21 22:07:35 +01:00
PAGER = "less -F";
2022-05-25 19:27:42 +02:00
};
environment.shellAliases = {
2022-09-27 01:16:19 +02:00
ls = "ls --color=auto";
l = "ls -l";
la = "ls -la";
ll = "ls -lah";
lt = "ls --tree";
2022-05-25 19:27:42 +02:00
vim = "nvim";
vf = "$EDITOR $(fzf)";
vff = "$EDITOR $(ls|fzf)";
2022-06-11 23:28:31 +02:00
mutt = "neomutt";
2022-08-08 19:27:10 +02:00
grep = "grep --color=auto";
2022-05-25 19:27:42 +02:00
};
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
interactiveShellInit = ''
bindkey -e
export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=10000000
export SAVEHIST=10000000
2022-05-25 19:27:42 +02:00
'';
promptInit = ''
2022-09-28 21:42:37 +02:00
source ${pkgs.liquidprompt}/share/zsh/plugins/liquidprompt/liquidprompt
2022-05-25 19:27:42 +02:00
'';
};
environment.etc.liquidpromptrc = {
text = ''
LP_ENABLE_SSH_COLORS=1
LP_ENABLE_TITLE=1
LP_ENABLE_SCREEN_TITLE=1
2022-09-28 21:42:37 +02:00
LP_ENABLE_TEMP=0
LP_ENABLE_SVN=0
2023-01-14 12:57:53 +01:00
LP_BATTERY_THRESHOLD=15
2022-09-28 21:42:37 +02:00
LP_SSH_COLORS=1
2022-05-25 19:27:42 +02:00
'';
};
2022-06-17 13:12:25 +02:00
2022-05-25 19:27:42 +02:00
programs.iftop.enable = true;
programs.mosh.enable = true;
2022-10-03 13:06:00 +02:00
programs.screen.screenrc = ''
defscrollback 10000
startup_message off
hardstatus on
hardstatus alwayslastline
hardstatus string "%w"
'';
2022-05-25 19:27:42 +02:00
}