Files
nixos/demilich/home.nix
2026-08-20 14:34:03 -05:00

792 lines
23 KiB
Nix

{
email,
pkgs,
username,
stateVersion,
inputs,
config,
lib,
...
}:
{
imports = [
inputs.noctalia.homeModules.default
];
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [ "electron-39.8.10" ];
};
};
home = {
username = "${username}";
homeDirectory = "/home/${username}";
preferXdgDirectories = true;
stateVersion = stateVersion;
sessionPath = [
"$HOME/go/bin"
"$HOME/.local/bin"
];
packages = with pkgs; [
bitwarden-cli
bitwarden-desktop
duf
dust
sd
seafile-client
stow
tealdeer
xh
];
};
editorconfig = {
enable = true;
settings = {
"*" = {
charset = "utf-8";
end_of_line = "lf";
trim_trailing_whitespace = true;
insert_final_newline = false;
max_line_width = 80;
indent_style = "space";
indent_size = 2;
};
};
};
# fonts = {
# fontconfig = {
# defaultFonts = {
# emoji = with pkgs; [
# nerd-fonts.symbols-only
# font-awesome
# ];
# monospace = with pkgs; [
# nerd-fonts.jetbrains-mono
# nerd-fonts.hack
# nerd-fonts.symbols-only
# ];
# sansSerif = [
# liberation_ttf_v2
# ];
# serif = [
# liberation_ttf_v2
# ];
# };
# antialiasing = true;
# hinting = "medium";
# subpixelRendering = "rgb";
# };
# };
programs = {
aerc = {
enable = true;
};
bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [
batdiff
batman
batgrep
batwatch
];
};
chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
dictionaries = [
pkgs.hunspellDictsChromium.en-gb
pkgs.hunspellDictsChromium.en-us
pkgs.hunspellDictsChromium.fr-fr
];
};
command-not-found = {
enable = true;
};
delta = {
enable = true;
enableGitIntegration = true;
options = {
decorations = {
commit-decoration-style = "bold yellow box ul";
file-decoration-style = "none";
file-style = "bold yellow ul";
};
features = "decorations";
whitespace-error-style = "22 reverse";
};
};
direnv = {
enable = true;
enableZshIntegration = true;
};
eza = {
enable = true;
enableZshIntegration = true;
colors = "auto";
extraOptions = [
"--group-directories-first"
"--header"
];
git = true;
icons = "always";
};
fd = {
enable = true;
};
fuzzel = {
enable = true;
settings = {
main = {
terminal = "${pkgs.ghostty}/bin/ghostty";
layer = "overlay";
};
};
};
fzf = {
enable = true;
enableZshIntegration = true;
};
ghostty = {
enable = true;
enableZshIntegration = true;
installBatSyntax = true;
installVimSyntax = true;
settings = {
font-family = "JetBrainsMono Nerd Font";
font-size = 13;
theme = "sproutingdark";
macos-option-as-alt = true;
shell-integration-features = "no-cursor";
cursor-style = "block";
};
themes = {
sproutingdark = {
palette = [
"0=#1f2620"
"1=#e04b7c"
"2=#9dbf9e"
"3=#ccca7a"
"4=#5586db"
"5=#dc51de"
"6=#7ef3ef"
"7=#d8e5d8"
"8=#3f4c3f"
"9=#e8789d"
"10=#b1ccb1"
"11=#fffd98"
"12=#99b6e9"
"13=#ea97eb"
"14=#b2f8f5"
"15=#f5f9f5"
];
background = "#1f2620";
foreground = "#eaeaea";
cursor-color = "#fffd98";
cursor-text = "#3f4c3f";
cursor-opacity = 0.7;
cursor-style = "block";
selection-background = "#3f4c3f";
selection-foreground = "#ffffea";
background-opacity = 1;
window-padding-x = "2,2";
window-padding-y = "2,2";
window-padding-balance = true;
window-height = 25;
window-width = 80;
};
};
};
git = {
enable = true;
lfs = {
enable = true;
};
settings = {
user.name = "Matthew Stobbs";
user.email = "${email}";
init.defaultBranch = "main";
};
};
go = {
enable = true;
env = {
GOPRIVATE = [ "git.sprouting.cloud" ];
};
};
gpg = {
enable = true;
};
home-manager = {
enable = true;
};
jq = {
enable = true;
};
lazygit = {
enable = true;
enableZshIntegration = true;
};
librewolf = {
enable = true;
};
neovide = {
enable = true;
settings = {
wayland-app-id = "neovide";
font = {
normal = [ "JetBrainsMono Nerd Font" ];
size = 14.0;
};
};
};
neovim = {
enable = true;
initLua = builtins.readFile ../config/nvim/stobbsm/nvim.lua;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPerl = true;
withPython3 = true;
extraPackages = with pkgs; [
delve
ginkgo
golangci-lint
gopls
gotests
gotestsum
gotools
govulncheck
tree-sitter
];
};
# noctalia = {
# enable = true;
# settings = "${config.xdg.configHome}/dotfiles/niri/.config/niri/full.kdl";
# };
pandoc = {
enable = true;
};
ripgrep = {
enable = true;
};
starship = {
enable = true;
enableZshIntegration = true;
settings = {
palette = "sproutingdark";
add_newline = true;
command_timeout = 2000;
format = lib.concatStrings [
"\$username"
"[](fg:yellow)\$git_status\$git_branch\$directory"
"[](fg:yellow bg:green)"
"\$fill"
"\$c"
"\$golang"
"\$nodejs"
"\$rust"
"\$fill"
"[](fg:silver bg:green)\$time[](fg:silver)\n"
"\$character"
];
character = {
success_symbol = "[ ](bold lime)";
error_symbol = "[ ](bold red)";
};
username = {
show_always = false;
style_user = "bg:fuchsia fg:black";
style_root = "bg:fuchsia fg:black";
format = "[](fg:fuchsia)[\$user ](\$style)[](fg:fuchsia)";
disabled = false;
};
fill = {
symbol = " ";
style = "bg:green";
};
directory = {
style = "bg:yellow fg:black";
format = "[ \$path ](\$style)";
truncation_length = 3;
truncation_symbol = "/";
substitutions = {
"~" = "";
"Documents" = "󰈙";
"Downloads" = "";
"Music" = "";
"Pictures" = "";
};
};
time = {
disabled = false;
time_format = " %F %T";
style = "bg:silver fg:black";
format = "[ \$time ](\$style)";
};
docker_context = {
symbol = " ";
style = "bg:fuchsia fg:black";
format = "[ \$symbol \$context ](\$style)";
};
git_branch = {
symbol = "";
style = "bg:yellow fg:black";
format = "[ \$symbol \$branch ](\$style)";
};
git_status = {
style = "bg:yellow fg:black";
format = "[\$all_status\$ahead_behind ](\$style)";
};
c = {
symbol = " ";
style = "bg:aqua fg:black";
format = "[](fg:aqua bg:green)[\$symbol (\$version) ](\$style)[](fg:aqua bg:green)";
};
golang = {
symbol = " ";
style = "bg:aqua fg:black";
format = "[](fg:aqua bg:green)[\$symbol (\$version) ](\$style)[](fg:aqua bg:green)";
};
nodejs = {
symbol = " ";
style = "bg:aqua fg:black";
format = "[](fg:aqua bg:green)[\$symbol (\$version) ](\$style)[](fg:aqua bg:green)";
};
rust = {
symbol = " ";
style = "bg:aqua fg:black";
format = "[](fg:aqua bg:green)[\$symbol (\$version) ](\$style)[](fg:aqua bg:green)";
};
palettes = {
sproutingdark = {
black = "#1f2620";
grey = "#3f4c3f";
maroon = "#e04b7c";
red = "#e8789d";
green = "#9bdf9e";
lime = "#b1ccb1";
olive = "#ccca7a";
yellow = "#fffd98";
navy = "#5586db";
blue = "#99b6e9";
purple = "#dc51de";
fuchsia = "#ea97eb";
teal = "#7ef3ef";
aqua = "#b2f8f5";
silver = "#d8e5d8";
white = "#f5f9f5";
};
sproutinglight = {
black = "#3f4c3f";
grey = "#7e997e";
maroon = "#ad1849";
red = "#d81e5b";
green = "#7e997e";
lime = "#9dbf9e";
olive = "#99985b";
yellow = "#ccca7a";
navy = "#779ee2";
blue = "#446baf";
purple = "#843185";
fuchsia = "#b041b2";
teal = "#4c928f";
aqua = "#65c2bf";
silver = "#f5f9f5";
white = "#d8e5d8";
};
};
};
};
tmux = {
enable = true;
clock24 = true;
escapeTime = 10;
focusEvents = true;
historyLimit = 5000;
keyMode = "vi";
mouse = true;
newSession = true;
terminal = "xterm-256color";
};
uv = {
enable = true;
};
yazi = {
enable = true;
enableZshIntegration = true;
flavors = {
sprouting = ../config/yazi/themes/sprouting.yazi;
};
settings = {
mgr = {
show_hidden = true;
sort_by = "natural";
sort_sensitive = true;
sort_dir_first = true;
scrolloff = 5;
};
};
theme = {
flavor = {
dark = "sprouting";
light = "sprouting";
};
};
};
zoxide = {
enable = true;
enableZshIntegration = true;
};
zsh = {
enable = true;
enableCompletion = true;
oh-my-zsh = {
enable = true;
plugins = [
"aliases"
"direnv"
"eza"
"fzf"
"golang"
"podman"
"starship"
"zoxide"
];
theme = "robbyrussell";
extraConfig = ''
zstyle ':omz:update' mode reminder
'';
};
};
};
# wayland = {
# windowManager = {
# niri = {
# enable = true;
# settings = {
# layout = {
# focus-ring = {
# active-color = "#9bdf9e";
# inactive-color = "#7e997e";
# urgent-color = "#e04b7c";
# };
# border = {
# active-color = "#9bdf9e";
# inactive-color = "#7e997e";
# urgent-color = "#e04b7c";
# };
# shadow = {
# color = "#3f4c3f70";
# };
# tab-indicator = {
# active-color = "#9bdf9e";
# inactive-color = "#7e997e";
# urgent-color = "#e04b7c";
# };
# insert-hint = {
# color = "#3f4c3f80";
# };
# _props.gaps = 16;
# _props.center-focused-column = "never";
#
# _props.background-color = "transparent";
#
# preset-column-widths = ''
# proportion = 0.33333
# proportion = 0.5
# proportion = 0.66667
# '';
#
# _props.struts = "{}";
# };
# recent-windows = {
# highlight = {
# _props.active-color = "#b1ccb1";
# _props.urgent-color = "#e8789d";
# };
# };
# animations = {
# workspace-switch = {
# "spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001" = { };
# };
# window-open = {
# duration-ms = 200;
# curve = "ease-out-quad";
# };
# window-close = {
# duration-ms = 200;
# curve = "ease-out-cubic";
# };
# horizontal-view-movement = {
# "spring damping-ratio=1.0 stiffness=900 epsilon=0.0001" = { };
# };
# window-movement = {
# "spring damping-ratio=1.0 stiffness=800 epsilon=0.0001" = { };
# };
# window-resize = {
# "spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001" = { };
# };
# config-notification-open-close = {
# "spring damping-ratio=0.6 stiffness=1200 epsilon=0.001" = { };
# };
# screenshot-ui-open = {
# duration-ms = 300;
# curve = "ease-out-quad";
# };
# overview-open-close = {
# "spring damping-ratio=1.0 stiffness=900 epsilon=0.0001" = { };
# };
# };
# input = {
# keyboard = {
# xkb = {
# #layout = "us";
# };
# };
# touchpad = {
# tap = { };
# natural-scroll = { };
# };
# mouse = {
# accel-profile = "flat";
# accel-speed = 0.0;
# };
# focus-follows-mouse = { };
# workspace-auto-back-and-forth = { };
# };
# binds = {
# "Mod+Shift+ESCAPE".show-hotkey-overlay = { };
#
# "Mod+Return" = {
# _props.hotkey-overlay-title = "Open Terminal: Ghostty";
# spawn = [ "ghostty" ];
# };
# "Mod+B" = {
# _props.hotkey-overlay-title = "Open Browser: firefox";
# spawn = [ "firefox" ];
# };
# "Mod+ALT+L" = {
# _props.hotkey-overlay-title = "Lock Screen: noctalia lock";
# spawn-sh = [ "qs -c noctalia-shell ipc call lockScreen lock" ];
# };
# "Mod+Shift+Q" = {
# _props.hotkey-overlay-title = "Session Menu: noctalia sessionMenu";
# spawn-sh = [ "qs -c noctalia-shell ipc call sessionMenu toggle" ];
# };
#
# "Mod+E" = {
# _props.hotkey-overlay-title = "File Manager: Nautilus";
# spawn = [ "nautilus" ];
# };
#
# "XF86AudioRaiseVolume" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call volume increase" ];
# };
# "XF86AudioLowerVolume" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call volume decrease" ];
# };
# "XF86AudioMute" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call volume muteOutput" ];
# };
# "XF86AudioMicMute" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call volume muteInput" ];
# };
# "XF86AudioNext" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call media next" ];
# };
# "XF86AudioPrev" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call media previous" ];
# };
# "XF86AudioPlay" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call media playPause" ];
# };
# "XF86AudioPause" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call media playPause" ];
# };
#
# "XF86MonBrightnessUp" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call brightness increase" ];
# };
# "XF86MonBrightnessDown" = {
# _props.allow-when-locked = true;
# spawn-sh = [ "qs -c noctalia-shell ipc call brightness decrease" ];
# };
#
# "Mod+Q".close-window = { };
#
# "Mod+Left".focus-column-left = { };
# "Mod+H".focus-column-left = { };
# "Mod+Right".focus-column-right = { };
# "Mod+L".focus-column-right = { };
# "Mod+Up".focus-window-up = { };
# "Mod+K".focus-window-up = { };
# "Mod+Down".focus-window-down = { };
# "Mod+J".focus-window-down = { };
#
# "Mod+CTRL+Left".move-column-left = { };
# "Mod+CTRL+H".move-column-left = { };
# "Mod+CTRL+Right".move-column-right = { };
# "Mod+CTRL+L".move-column-right = { };
# "Mod+CTRL+UP".move-window-up = { };
# "Mod+CTRL+K".move-window-up = { };
# "Mod+CTRL+Down".move-window-down = { };
# "Mod+CTRL+J".move-window-down = { };
#
# "Mod+Home".focus-column-first = { };
# "Mod+End".focus-column-last = { };
# "Mod+CTRL+Home".move-column-to-first = { };
# "Mod+CTRL+End".move-column-to-last = { };
#
# "Mod+Shift+Left".focus-monitor-left = { };
# "Mod+Shift+Right".focus-monitor-right = { };
# "Mod+Shift+UP".focus-monitor-up = { };
# "Mod+Shift+Down".focus-monitor-down = { };
#
# "Mod+Shift+CTRL+Left".move-column-to-monitor-left = { };
# "Mod+Shift+CTRL+Right".move-column-to-monitor-right = { };
# "Mod+Shift+CTRL+UP".move-column-to-monitor-up = { };
# "Mod+Shift+CTRL+Down".move-column-to-monitor-down = { };
#
# "Mod+Next" = {
# _props.cooldown-ms = 150;
# _props.focus-workspace-down = { };
# };
# "Mod+Prior" = {
# _props.cooldown-ms = 150;
# _props.focus-workspace-up = { };
# };
# "Mod+CTRL+Next" = {
# _props.cooldown-ms = 150;
# _props.move-column-to-workspace-down = { };
# };
# "Mod+CTRL+Prior" = {
# _props.cooldown-ms = 150;
# _props.move-column-to-workspace-up = { };
# };
#
# "Mod+WheelScrollRight".focus-column-right = { };
# "Mod+WheelScrollLeft".focus-column-left = { };
# "Mod+CTRL+WheelScrollRight".move-column-right = { };
# "Mod+CTRL+WheelScrollLeft".move-column-left = { };
#
# "Mod+Shift+WheelScrollDown".focus-column-right = { };
# "Mod+Shift+WheelScrollUp".focus-column-left = { };
# "Mod+CTRL+Shift+WheelScrollDown".move-column-right = { };
# "Mod+CTRL+Shift+WheelScrollUp".move-column-left = { };
#
# "Mod+1".focus-workspace = 1;
# "Mod+2".focus-workspace = 2;
# "Mod+3".focus-workspace = 3;
# "Mod+4".focus-workspace = 4;
# "Mod+5".focus-workspace = 5;
# "Mod+6".focus-workspace = 6;
# "Mod+7".focus-workspace = 7;
# "Mod+8".focus-workspace = 8;
# "Mod+9".focus-workspace = 9;
#
# "Mod+CTRL+1".move-column-to-workspace = 1;
# "Mod+CTRL+2".move-column-to-workspace = 2;
# "Mod+CTRL+3".move-column-to-workspace = 3;
# "Mod+CTRL+4".move-column-to-workspace = 4;
# "Mod+CTRL+5".move-column-to-workspace = 5;
# "Mod+CTRL+6".move-column-to-workspace = 6;
# "Mod+CTRL+7".move-column-to-workspace = 7;
# "Mod+CTRL+8".move-column-to-workspace = 8;
# "Mod+CTRL+9".move-column-to-workspace = 9;
#
# "Mod+TAB".focus-workspace-previous = { };
#
# "Mod+CTRL+F".expand-column-to-available-width = { };
# "Mod+C".center-column = { };
# "Mod+CTRL+C".center-visible-columns = { };
# "Mod+Minus".set-column-width = "-10%";
# "Mod+Equal".set-column-width = "+10%";
# "Mod+Shift+Minus".set-window-height = "-10%";
# "Mod+Shift+Equal".set-window-height = "+10%";
#
# "Mod+T".toggle-window-floating = { };
# "Mod+F".fullscreen-window = { };
# "Mod+W".toggle-column-tabbed-display = { };
#
# "CTRL+Shift+1".screenshot = { };
# "CTRL+Shift+2".screenshot-screen = { };
# "CTRL+Shift+3".screenshot-window = { };
#
# "Mod+ESCAPE" = {
# allow-inhibiting = false;
# toggle-keyboard-shortcuts-inhibit = { };
# };
#
# "CTRL+ALT+Delete".quit = { };
# "Mod+Shift+P".power-off-monitors = { };
# "Mod+O" = {
# repeat = false;
# toggle-overview = { };
# };
# };
#
# _props.prefer-no-csd = { };
# screenshot-path = "null";
#
# environment = {
# ELECTRON_OZONE_PLATFORM_HINT = "auto";
# QT_QPA_PLATFORM = "wayland";
# QT_QPA_PLATFORMTHEME = "gtk3";
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
# XDG_CURRENT_DESKTOP = "niri";
# XDG_SESSION_TYPE = "wayland";
# };
#
# cursor = {
# xcursor-theme = "capitaine-cursors";
# xcursor-size = 24;
# };
#
# debug = {
# _props.honor-xdg-activation-with-invalid-serial = { };
# };
#
# hotkey-overlay = {
# _props.skip-at-startup = { };
# };
#
# window-rule = {
# _props.geometry-corner-radius = 20;
# clip-to-geometry = true;
# };
#
# window-rule = {
# match = "app-id=\"steam\"";
# exclude = "title=r#\"^[Ss]team$\"#";
# open-floating = true;
# };
#
# window-rule = {
# match = "app-id=\"steam\" title=r#\"^notificationtoasts_\d+_desktop$\"#";
# default-floating-position = "x=10 y=10 relative-to=\"bottom-right\"";
# open-focused = false;
# };
#
# layer-rule = {
# match = "namespace=\"^noctalia-wallpaper*\"";
# place-within-backdrop = true;
# };
# };
# systemd = {
# enable = true;
# };
# };
# };
# };
}