{ config, lib, pkgs, ... }: { nixpkgs.config = { allowUnfree = true; allowUnfreePredicate = (_: true); }; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "jas"; home.homeDirectory = "/home/jas"; home.stateVersion = "24.05"; # Please read the comment before changing. # The home.packages option allows you to install Nix packages into your # environment. home.packages = with pkgs; [ curlie direnv diskonaut doggo duf dust eza fd glow gum httpie hyfetch hyperfine jq just nixfmt-rfc-style ripgrep starship tealdeer trash-cli vivid wthrr yazi zellij ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'. home.file = { ".justfile".source = confs/justfile; ".zshrc.d".source = confs/zshrc.d; ".doom.d/config.el".source = doom.d/config.el; ".doom.d/init.el".source = doom.d/init.el; ".doom.d/packages.el".source = doom.d/packages.el; }; ## PROGRAMS # bat config home.activation.buildBatCache = "${lib.getExe pkgs.bat} cache --build"; programs.bat = { enable = true; config.theme = "Catppuccin-mocha"; themes = { Catppuccin-mocha = { src = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "bat"; rev = "d3feec47b16a8e99eabb34cdfbaa115541d374fc"; sha256 = "sha256-s0CHTihXlBMCKmbBBb8dUhfgOOQu9PBCQ+uviy7o47w="; }; file = "/themes/Catppuccin Mocha.tmTheme"; }; }; }; # fzf config programs.fzf = { enable = true; colors = { "bg+" = "#302D41"; bg = "#1E1E2E"; spinner = "#F8BD96"; hl = "#F28FAD"; fg = "#D9E0EE"; header = "#F28FAD"; info = "#DDB6F2"; pointer = "#F8BD96"; marker = "#F8BD96"; "fg+" = "#F2CDCD"; prompt = "#DDB6F2"; "hl+" = "#F28FAD"; }; defaultCommand = "fd --type f --hidden --follow --exclude .git"; }; # starship.rs programs.starship = { enable = true; settings = lib.importTOML confs/starship.toml; }; # zsh config programs.zsh = { enable = true; enableCompletion = true; autosuggestion.enable = true; autocd = false; envExtra = '' export PATH="$HOME/bin:$HOME/.local/bin:/usr/sbin:$PATH" eval "$(starship init zsh)" ''; history = { extended = true; ignoreAllDups = false; ignoreDups = true; path = "${config.home.homeDirectory}/.zsh_history"; save = 65536; share = false; size = 100000; }; historySubstringSearch.enable = true; zplug.enable = true; zplug.plugins = [ { name = "zsh-users/zsh-syntax-highlighting"; tags = [ "defer:2" ]; } { name = "plugins/sudo"; tags = [ "from:oh-my-zsh" ]; } { name = "plugins/extract"; tags = [ "from:oh-my-zsh" ]; } { name = "plugins/systemd"; tags = [ "from:oh-my-zsh" ]; } { name = "${config.home.homeDirectory}/.zshrc.d"; tags = [ "from:local" "use:'*'" ]; } ]; shellAliases = { dnfi = "sudo dnf install $@"; dnfs = "sudo dnf search $@"; dnfu = "sudo dnf update $@"; dnfr = "sudo dnf remove $@"; ls = "eza --git --icons $@"; la = "eza --git --icons -a $@"; lal = "eza --git --icons -al $@"; ll = "eza --git --icons -l $@"; grep = "grep --color=auto"; df = "duf $@"; cp = "cp -i $@"; rm = "trash $@"; del = "/bin/rm -i $@"; mv = "mv -i $@"; zfun = "functions | bat -l zsh"; pubip4 = "curl -s -m 5 ipv4.icanhazip.com"; pubip6 = "curl -s -m 5 ipv6.icanhazip.com"; netcons = "lsof -i"; tulp = "ss -tulp"; openports = "sudo lsof -i | grep LISTEN"; pong = "ping -c 3 www.google.com"; lsock = "sudo lsof -i -P"; lsocku = "sudo lsof -nP | grep UDP"; lsockt = "sudo lsof -nP | grep TCP"; fw = "sudo firewall-cmd $@"; fwr = "sudo firewall-cmd --reload"; fwp = "sudo firewall-cmd --permanent $@"; ga = "git add $@"; gcl = "git clone $@"; gcmsg = "git commit -m $@"; gd = "git diff"; gp = "git push $@"; grm = "git rm $@"; grv = "git remote -v"; gst = "git status"; doomdoc = "\${xdg.configHome}/emacs/bin/doom doctor"; dsync = "\${xdg.configHome}/emacs/bin/doom sync"; dclean = "\${xdg.configHome}/emacs/bin/doom clean"; dgc = "\${xdg.configHome}/emacs/bin/doom gc"; dupgrade = "\${xdg.configHome}/emacs/bin/doom upgrade"; }; shellGlobalAliases = { G = "| grep"; J = "| jq"; CC = "| wl-copy"; H = "| head"; T = "| tail"; L = "| less -RFX"; C = "| wc -l"; B = "| bat"; }; sessionVariables = { PAGER = "less -RFX"; MANWIDTH = "88"; MANROFFOPT = "-c"; MANPAGER = "less -RFX"; EDITOR = "emacsclient"; GROFF_NO_SGR = 1; BAT_PAGER = "less -RFX"; BAT_STYLE = "plain"; }; initExtraFirst = '' export LS_COLORS=$(vivid generate catppuccin-mocha) export LESS_TERMCAP_mb=$'\e[1;31m' export LESS_TERMCAP_md=$'\e[1;34m' export LESS_TERMCAP_so=$'\e[01;0;33m' export LESS_TERMCAP_us=$'\e[01;31m' export LESS_TERMCAP_me=$'\e[0m' export LESS_TERMCAP_se=$'\e[0m' export LESS_TERMCAP_ue=$'\e[0m' if test -x ${config.home.homeDirectory}/bin/gumssh; then bindkey -s '^[s' 'gumssh^M'; fi bindkey -s '^[f' 'yazi^M' ''; }; # neovim programs.neovim = { enable = true; plugins = with pkgs.vimPlugins; [ vim-startify vim-lastplace nerdcommenter catppuccin-nvim ]; extraConfig = '' set nocompatible set showmatch set ignorecase set mouse=v set hlsearch set incsearch set tabstop=4 set softtabstop=4 set expandtab set shiftwidth=4 set autoindent set relativenumber set wildmode=longest,list set cc=80 filetype plugin indent on syntax on set clipboard=unnamedplus filetype plugin on set cursorline set ttyfast colorscheme catppuccin ''; }; # zellij config programs.zellij.enable = true; programs.zellij.settings = { theme = "catppuccin-mocha"; themes = { catppuccin-mocha = { bg = "#585b70"; fg = "#cdd6f4"; red = "#f38ba8"; green = "#a6e3a1"; blue = "#89b4fa"; yellow = "#f9e2af"; magenta = "#f5c2e7"; orange = "#fab387"; cyan = "#89dceb"; black = "#181825"; white = "#cdd6f4"; }; }; copy_command = "wl-copy"; copy_clipboard = "system"; copy_on_select = true; }; # Let Home Manager install and manage itself. programs.home-manager.enable = true; # XDG user dirs xdg.userDirs = { enable = true; createDirectories = true; download = "${config.home.homeDirectory}/downloads"; desktop = "${config.home.homeDirectory}/desktop"; documents = "${config.home.homeDirectory}/shared/documents"; publicShare = "${config.home.homeDirectory}/shared"; templates = null; music = null; pictures = "${config.home.homeDirectory}/shared/pictures"; videos = null; }; # git config programs.git = { enable = true; diff-so-fancy = { enable = true; pagerOpts = [ "--tabs=4" "-RFX" ]; }; userName = "Jeffrey Serio"; userEmail = "hyperreal@moonshadow.dev"; extraConfig = { core = { editor = "emacsclient"; }; init = { defaultBranch = "main"; }; pull = { rebase = true; }; }; }; # ssh config programs.ssh.enable = true; programs.ssh.matchBlocks = { "auxnc-8g" = { hostname = "152.53.39.153"; user = "jas"; }; "auxnc-96g" = { hostname = "auxnc-96g.lyrebird-marlin.ts.net"; user = "jas"; }; "bttracker.nirn.quest" = { hostname = "bttracker.nirn.quest"; user = "jas"; }; "hyperreal.coffee" = { hostname = "hyperreal.coffee"; user = "jas"; }; "nas" = { hostname = "nas.lyrebird-marlin.ts.net"; user = "jas"; }; }; # direnv programs.direnv = { enable = true; enableZshIntegration = true; nix-direnv.enable = true; }; }