# Base home.nix { config, lib, pkgs, inputs, user, ... }: { programs.home-manager.enable = true; home.username = "${user.name}"; home.homeDirectory = "/home/${user.name}"; home.sessionPath = [ "${config.home.homeDirectory}/.local/bin" ]; xdg = { enable = true; cacheHome = "${config.home.homeDirectory}/.cache"; configHome = "${config.home.homeDirectory}/.config"; dataHome = "${config.home.homeDirectory}/.local/share"; stateHome = "${config.home.homeDirectory}/.local/state"; }; home.file = { "bash_login" = { source = ./dots/bash_login; target = ".bash_login"; }; "bash_logout" = { source = ./dots/bash_logout; target = ".bash_logout"; }; "bashrc" = { source = ./dots/bashrc; target = ".bashrc"; }; }; programs.fzf = { enable = true; tmux.enableShellIntegration = true; }; programs.git = { enable = true; userName = "${user.long}"; userEmail = "${user.email}"; ignores = [ "*~" "*.swp" ]; extraConfig = { global = { init.defaultbranch = "main"; }; }; }; programs.neovim = { enable = true; defaultEditor = true; viAlias = true; vimAlias = true; extraConfig = '' syntax enable set wrap set spell spelllang=en_us set linebreak set number set relativenumber set splitbelow set splitright set tabstop=4 set shiftwidth=4 if filereadable(expand(".vim-project")) source .vim-project endif ''; }; programs.password-store = { enable = true; package = pkgs.pass.withExtensions (exts: [ exts.pass-otp exts.pass-import ]); settings = { PASSWORD_STORE_DIR = "XDG_DATA_HOME/password-store"; PASSWORD_STORE_CLIP_TIME = "60"; }; }; programs.tmux = { enable = true; baseIndex = 1; clock24 = true; escapeTime = 250; historyLimit = 8000; keyMode = "vi"; mouse = false; newSession = false; prefix = "C-b"; terminal = "screen-256color"; extraConfig = '' # Do not rename windows automatically set-option -g allow-rename off # Hide statusbar while using one window set -g status off set-hook -g after-new-window 'if "[ #{session_windows} -gt 1 ]" "set status on"' set-hook -g after-kill-pane 'if "[ #{session_windows} -lt 2 ]" "set status off"' set-hook -g pane-exited 'if "[ #{session_windows} -lt 2 ]" "set status off"' set-hook -g window-layout-changed 'if "[ #{session_windows} -lt 2 ]" "set status off"' # Reload tmux.conf unbind r bind r source-file $HOME/.config/tmux/tmux.conf \; display "tmux config reloaded" # Rebind vertical/horizontal splitting unbind % unbind v bind v split-window -h -c "#{pane_current_path}" unbind '"' unbind c bind c split-window -v -c "#{pane_current_path}" unbind Enter bind Enter new-window unbind Tab bind Tab last-window unbind l # Rebind moving panes bind -n C-h select-pane -L bind -n C-j select-pane -D bind -n C-k select-pane -U bind -n C-l select-pane -R bind -n M-h select-pane -L bind -n M-j select-pane -D bind -n M-k select-pane -U bind -n M-l select-pane -R # Set status bar postition set -g status-position top # Status bar theme set -g status-style "fg=#50fa7b" # Window theme setw -g window-status-current-style "bg=#50fa7b fg=#282a36" setw -g window-status-current-format " #I:#W#F " setw -g window-status-format "[#I:#W#F]" ''; plugins = with pkgs; [ tmuxPlugins.urlview tmuxPlugins.yank ]; }; home.stateVersion = "23.05"; }