{ config, pkgs, ... }: { home.username = "sscoble"; home.stateVersion = "25.11"; # Don't let home-manager manage these manual.json.enable = false; manual.manpages.enable = false; # === Shared CLI packages (macOS + NixOS) === home.packages = with pkgs; [ bat eza delta fd jq ripgrep tldr rsync rclone neovim python3 uv go direnv nix-direnv tree htop tmux unzip curl wget ] ++ (if pkgs.stdenv.isLinux then (with pkgs; [ nodejs bun git tigervnc ]) else []); # === Home directory (conditional) === home.homeDirectory = if pkgs.stdenv.isDarwin then "/Users/sscoble" else "/home/sscoble"; # === Git Config === programs.git = { enable = true; settings = { user = { name = "Scott Scoble"; email = "sscoble@scobleclaw.dev"; }; init.defaultBranch = "main"; pull.rebase = true; push.autoSetupRemote = true; core.editor = "nvim"; alias = { lol = "log --graph --oneline --decorate --all"; co = "checkout"; br = "branch"; st = "status"; ci = "commit"; }; }; }; # === Neovim config (with LSP support) === home.file.".config/nvim/init.lua".text = '' vim.opt.number = true vim.opt.relativenumber = true vim.opt.expandtab = true vim.opt.shiftwidth = 2 vim.opt.tabstop = 2 vim.opt.smartindent = true vim.opt.wrap = false vim.opt.swapfile = false vim.opt.backup = false vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undofile = true vim.opt.hlsearch = false vim.opt.incsearch = true vim.opt.termguicolors = true vim.opt.scrolloff = 8 vim.opt.signcolumn = "yes" vim.opt.isfname:append("@-@") vim.opt.updatetime = 50 vim.opt.colorcolumn = "100" vim.g.mapleader = " " -- LSP: load per-filetype configs vim.api.nvim_create_autocmd("FileType", { pattern = "typst", callback = function() local ok, config = pcall(dofile, vim.fn.stdpath("config") .. "/lua/lsp/typst.lua") if ok and config then vim.lsp.start(config, { bufnr = 0 }) local buf = vim.api.nvim_get_current_buf() vim.keymap.set("n", "K", vim.lsp.buf.hover, { buffer = buf }) vim.keymap.set("n", "gd", vim.lsp.buf.definition, { buffer = buf }) vim.keymap.set("n", "rn", vim.lsp.buf.rename, { buffer = buf }) vim.keymap.set("n", "ca", vim.lsp.buf.code_action, { buffer = buf }) end end, }) ''; # === Pi config directory === home.file.".pi/agent/README.md".text = '' # Pi Agent Configuration Restore these files from backup: - SYSTEM.md (core agent directive) - models.json (provider + model configuration) - mcp.json (MCP server connections) - settings.json (pi preferences) - auth.json (API keys — keep secure!) ''; # === Vault directory === home.file."vault/.gitkeep".text = ""; # === Direnv === programs.direnv = { enable = true; nix-direnv.enable = true; }; # === SSH config === home.file.".ssh/config".text = '' Host n97-mini HostName 192.168.168.41 User sscoble ForwardAgent yes Host n97-mini-ext HostName os.scoble.me Port 22 User sscoble ForwardAgent yes Host forgejo HostName os.scoble.me User git ''; # === Zsh === programs.zsh = { enable = true; oh-my-zsh = { enable = true; plugins = [ "git" "node" "npm" "ssh-agent" "sudo" "history" ]; theme = "robbyrussell"; }; autosuggestion.enable = true; syntaxHighlighting.enable = true; shellAliases = { ll = "ls -la"; la = "ls -A"; l = "ls -CF"; nix-clean = "sudo nix-collect-garbage -d && nix-collect-garbage -d"; n97-mini = "vncviewer 100.104.70.88:5900"; }; initContent = '' # Nix flake shortcuts (adapts to platform) # Uses local checkout so uncommitted changes are picked up immediately. # Push to the remote repo separately when you want to share/sync. if command -v nixos-rebuild &>/dev/null; then alias nr="sudo nixos-rebuild switch --flake ~/laptop-config#laptop" elif command -v home-manager &>/dev/null; then alias nr="home-manager switch --flake ~/laptop-config#sscoble" fi # Pi / QMD (work from homebrew or nixpkgs) alias vq="qmd query" 2>/dev/null || alias vq="echo 'qmd not found — install with brew install qmd or bunx @tobilu/qmd'" # VNC into n97-mini server alias n97-mini="vncviewer 100.104.70.88:5900" ''; envExtra = '' export EDITOR=nvim export VISUAL=nvim export PATH=$HOME/.local/bin:$HOME/.npm-global/bin:$PATH ''; }; }