Files
nixos/home.nix
2025-08-15 17:44:24 -04:00

309 lines
7.5 KiB
Nix

{ config, pkgs, ... }:
{
home.username = "th3r00t";
home.homeDirectory = "/home/th3r00t";
home.file.".local/usr/bin" = {
source = ./home/.local/usr/bin;
recursive = true;
executable = true;
};
home.file.".local/usr/lib/blightmud" = {
source = ./home/.local/usr/lib/blightmud;
recursive = true;
executable = true;
};
home.file.".config/nvim" = {
source = ./home/config/nvim;
recursive = true;
executable = true;
};
home.file.".config/dosbox-x" = {
source = ./home/config/dosbox-x;
recursive = true;
executable = true;
};
home.packages = with pkgs; [
fastfetch
ranger
zip
unzip
xz
p7zip
ripgrep
jq
eza
fzf
tmux
cowsay
lolcat
gnused
gnutar
gnupg
hugo
bat
which
nix-output-monitor
devenv
luarocks
lua5_1
gimp
lua-language-server
go
nodejs
uv
readline
cachix
sqlite
rofi
qutebrowser
foot
vifm-full
ranger
zoxide
(python313.withPackages (python-pkgs: [
python-pkgs.prompt_toolkit
python-pkgs.pygments
python-pkgs.pynvim
])
)
# vimPlugins.nvim-treesitter.withAllGrammars
neovim
zig
nodejs
go
syncthing
dosbox-x
lazygit
];
programs.neovim.plugins = [
pkgs.vimPlugins.nvim-treesitter.withAllGrammars
];
programs.taskwarrior = {
enable = true;
};
services.syncthing = {
enable = true;
};
programs.ranger = {
enable = true;
extraConfig = ''
'';
extraPackages = [ ];
mappings = {
Q = "quitall";
q = "quit";
};
plugins = [
{
name = "zoxide";
src = builtins.fetchGit {
url = "https://github.com/jchook/ranger-zoxide.git";
rev = "363df97af34c96ea873c5b13b035413f56b12ead";
};
}
{
name = "tmux";
src = builtins.fetchGit {
url = "https://github.com/joouha/ranger_tmux.git";
rev = "05ba5ddf2ce5659a90aa0ada70eb1078470d972a";
};
}
];
settings = {
column_ratios = "1,3,3";
confirm_on_delete = "never";
scroll_offset = 8;
unicode_ellipsis = true;
};
};
programs.fzf = {
enable = true;
tmux.enableShellIntegration = true;
enableZshIntegration = true;
colors = {
fg = "#d0d0d0";
bg = "#24283b";
hl = "#5f87af";
"fg+" = "#d0d0d0";
"bg+" = "#414868";
"hl+" = "#5fd7ff";
info = "#afaf87";
prompt = "#d7005f";
pointer = "#af5fff";
marker = "#87ff00";
spinner = "#af5fff";
header = "#87afaf";
};
};
programs.tmux = {
enable = true;
baseIndex = 1;
clock24 = true;
disableConfirmationPrompt = true;
keyMode = "vi";
mouse = true;
newSession = true;
plugins = with pkgs; [
tmuxPlugins.cpu
{
plugin = tmuxPlugins.resurrect;
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '60'
'';
}
tmuxPlugins.yank
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.vim-tmux-focus-events
tmuxPlugins.urlview
{
plugin = tmuxPlugins.tokyo-night-tmux;
extraConfig = ''
set -g @tokyo-night-tmux_window_id_style digital
set -g @tokyo-night-tmux_pane_id_style hsquare
set -g @tokyo-night-tmux_zoom_id_style dsquare
set -g @tokyo-night-tmux_show_netspeed 1
set -g @tokyo-night-tmux_netspeed_iface "wlp2s0" # Detected via default route
set -g @tokyo-night-tmux_netspeed_showip 1 # Display IPv4 address (default 0)
set -g @tokyo-night-tmux_netspeed_refresh 1 # Update interval in seconds (default 1)
set -g @tokyo-night-tmux_show_path 1
set -g @tokyo-night-tmux_path_format relative # 'relative' or 'full'
set -g @tokyo-night-tmux_show_battery_widget 1
set -g @tokyo-night-tmux_battery_name "BAT0" # some linux distro have 'BAT0'
set -g @tokyo-night-tmux_battery_low_threshold 21 # default
'';
}
tmuxPlugins.tmux-fzf
# {
# plugin = tmuxPlugins.tilish;
# extraConfig = ''
# set -g @tilish-navigator 'on'
# set -g @tilish-default 'main-vertical'
# set -g @tilish-enforce 'none'
# set -g escape-time 0
# set -g @tilish-dmenu 'on'
# '';
# }
];
prefix = "C-a";
shell = "${pkgs.zsh}/bin/zsh";
# terminal = "xterm-kitty:RGB";
tmuxinator.enable = true;
extraConfig = ''
set-option -g status-position top
set -g default-terminal 'tmux-256color'
set -g terminal-overrides ',xterm-256color:RGB'
bind-key b choose-tree -Z "run-shell 'tmux swap-pane -s %%'"
# bind C-p display-popup -E -w 60% -h 70% 'tmuxsessions.sh'
bind C-p run-shell 'tmuxsessions.sh'
bind C-d run-shell 'dotfile-picker.sh'
bind [ run-shell 'project-picker.sh'
# bind C-c display-popup -E -w 50% -h 50% 'nvim +":cd ~/org" ~/org/refile.norg'
# bind C-c display-popup -E -w 50% -h 50% 'nvim +"VimwikiIndex"
bind C-c display-popup -E -w 40% -h 60% "pytui -n"
bind C-w display-popup -E -w 40% -h 60% "pytui -D"
bind C-o display-popup -E -w 50% -h 50% 'igrep ~/wiki/notes'
bind j run-shell 'popuptmux'
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind i split-window -v -c '\
#{pane_current_path}' 'emojicherrypick.py --menu fzf\
'
bind-key -n F4 run-shell 'ranger'
# bind-key -n C-e split-window -v -c '\
# #{pane_current_path}' 'vifm\
# '
bind-key -n C-f split-window 'ranger .'
bind F3 send-keys 'igrep .' C-m
'';
};
programs.git = {
enable = true;
userName = "th3r00t";
userEmail = "tty303@proton.me";
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
programs.eza = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
# starship - an customizable prompt for any shell
programs.starship = {
enable = true;
# custom settings
settings = {
add_newline = false;
aws.disabled = true;
gcloud.disabled = true;
line_break.disabled = true;
};
};
programs.zsh = {
enable = true;
sessionVariables = {
PATH="$PATH:$HOME/.local/usr/bin";
};
oh-my-zsh = {
enable = true;
plugins = [
"git"
"colored-man-pages"
"colorize"
"command-not-found"
"compleat"
"dirhistory"
"fzf"
"git-auto-fetch"
"git-extras"
"git-prompt"
"gitignore"
"gpg-agent"
"history"
"jsontools"
"man"
"nmap"
"pip"
"python"
"ssh-agent"
"sudo"
"tmux"
"vi-mode"
"zsh-navigation-tools"
];
# theme = "starship";
};
};
programs.bash = {
enable = true;
enableCompletion = true;
bashrcExtra = ''
export PATH="$PATH:$HOME/.local/usr/bin";
'';
shellAliases = {
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(il.unquote_plus(sys.stdin.read()))'";
ls = "eza";
cat = "bat";
};
};
home.stateVersion = "25.05";
}