{ pkgs, ... }: { # Main desktop user. users.users."seraphim" = { isNormalUser = true; description = "seraphim"; shell = pkgs.zsh; # wheel for sudo/doas, networkmanager to manage connections itself. extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; []; }; # doas (simpler sudo replacement) security.doas = { enable = true; # Give seraphim persistent passwordless-ish privileges, keeping the env. extraRules = [ { users = [ "seraphim" ]; keepEnv = true; persist = true; } ]; }; # fzf -- proper key bindings + completion for zsh. programs.fzf = { fuzzyCompletion = true; keybindings = true; }; # ZSH + completion, oh-my-zsh, autosuggestions. programs.zsh = { enable = true; enableCompletion = true; ohMyZsh.enable = true; autosuggestions = { enable = true; highlightStyle = "fg=#6c7086"; strategy = [ "history" "completion" ]; }; interactiveShellInit = '' # Fish-style full-screen Ctrl+R history search. export FZF_CTRL_R_OPTS=" --layout=reverse --scheme=history --height=100% --border=sharp --border-label=' Ctrl+R ' --highlight-line --pointer=→ --info=inline-right --header-first --header='enter: accept · ctrl-/ : toggle preview' --preview='echo {}' --preview-window=down:3:hidden:wrap --bind=ctrl-/:toggle-preview " ''; shellAliases = { ls = "eza -al --icons=auto"; ll = "eza -al --icons=auto"; fs = "fastfetch"; hf = "hyfetch"; sudo = "doas"; open = "xdg-open"; }; }; }