{ lib, pkgs, ... }: let username = "lcech"; homedir = "/Users/${username}"; zshSourceDirs = [ ]; in { home.username = username; home.homeDirectory = homedir; home.stateVersion = "24.11"; home.packages = with pkgs; [ awscli2 hammerspoon k9s kubectl nixd pstree watch ]; # ghostty marked as broken as of 2025-01-05 in nix, using homebrew and custom config home.file = { "${homedir}/Library/Application Support/com.mitchellh.ghostty/config" = { text = '' theme = "catppuccin-mocha" font-size = 14 window-width = 9999 window-height = 9999 ''; }; "${homedir}/.hammerspoon/init.lua" = { text = '' ''; }; }; programs.direnv = { enable = true; nix-direnv.enable = true; }; programs.git = { enable = true; userName = "Lukas Cech"; userEmail = "lcech@veracode.com"; ignores = [ ".vscode" ".direnv" ".devenv" ".envrc" ]; extraConfig = { core = { autocrlf = "input"; editor = "vim"; }; pull.rebase = false; init.defaultBranch = "main"; }; }; programs.htop = { enable = true; }; programs.jq = { enable = true; }; programs.k9s = { enable = true; settings = { k9s = { refreshRate = 2; ui = { logoless = true; headless = true; }; logger = { tail = 1000; sinceSeconds = 60 * 30; fullScreen = true; showtime = true; }; }; }; }; programs.lsd = { enable = true; enableAliases = true; settings = { blocks = [ "permission" "user" "group" "size" "date" "git" "name" ]; sorting = { dir-grouping = "first"; }; }; }; programs.mcfly = { enable = true; enableZshIntegration = true; keyScheme = "vim"; # TODO: Test fuzzySearchFactor = 2; settings = { colors = { menubar = { bg = "black"; fg = "red"; }; darkmode = { prompt = "cyan"; timing = "yellow"; }; }; }; }; programs.pay-respects = { enable = true; enableZshIntegration = true; }; programs.starship = { enable = true; enableZshIntegration = true; settings = { format = lib.concatStrings [ "$username" "$hostname" "$directory" "$character" ]; right_format = lib.concatStrings [ "$git_branch" "$git_commit" "$git_state" "$git_metrics" "$git_status" "($cmd_duration)" ]; scan_timeout = 25; add_newline = false; continuation_prompt = "[▸▹ ](dimmed white)"; follow_symlinks = false; directory = { truncate_to_repo = false; truncation_length = 20; truncation_symbol = "…/"; }; cmd_duration = { min_time = 100; show_milliseconds = true; format = "took [$duration]($style) "; style = "bold yellow"; }; character = { success_symbol = "✓"; error_symbol = "⚠"; }; }; }; programs.zsh = { enable = true; dirHashes = { mac = "${homedir}/storage/.macshare"; nix = "${homedir}/.config/nix"; }; initExtra = '' ${builtins.concatStringsSep "\n" ( builtins.map (dir: '' for file in ${dir}/*.zsh; do source "$file" done '') zshSourceDirs )} autoload -U +X bashcompinit && bashcompinit source <(kubectl completion zsh) complete -C '/usr/local/bin/aws_completer' aws ''; }; home.sessionVariables = { EDITOR = "vim"; GO111MODULE = "on"; TERMINAL = "ghostty"; }; launchd.agents.keepass-sync = { enable = true; config = { Program = /bin/cp; ProgramArguments = [ "${homedir}/storage/.macshare/.secret/arnie.kdbx" "${homedir}/arnie.kdbx" ]; StartInterval = 60 * 10; StandardErrorPath = "/var/log/keepass-sync.error.log"; StandardOutPath = "/var/log/keepass-sync.out.log"; }; }; }