- nixosConfigurations.vm: minimal NixOS for aarch64 UTM testing - modules/vm.nix: network, SSH, user, no display manager - imports shared + wgu home configs, no desktop/Hyprland - Moved pi/qmd from sscoble.nix → desktop.nix (clean separation)
175 lines
4.5 KiB
Nix
175 lines
4.5 KiB
Nix
{ 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
|
|
]) else []);
|
|
|
|
# === Home directory (conditional) ===
|
|
home.homeDirectory = if pkgs.stdenv.isDarwin
|
|
then "/Users/sscoble"
|
|
else "/home/sscoble";
|
|
|
|
# === Git Config ===
|
|
programs.git = {
|
|
enable = true;
|
|
userName = "Scott Scoble";
|
|
userEmail = "sscoble@scobleclaw.dev";
|
|
extraConfig = {
|
|
init.defaultBranch = "main";
|
|
pull.rebase = true;
|
|
push.autoSetupRemote = true;
|
|
core.editor = "nvim";
|
|
};
|
|
aliases = {
|
|
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", "<leader>rn", vim.lsp.buf.rename, { buffer = buf })
|
|
vim.keymap.set("n", "<leader>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";
|
|
};
|
|
autosuggestions.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";
|
|
};
|
|
initExtra = ''
|
|
# Nix flake shortcuts (adapts to platform)
|
|
if command -v nixos-rebuild &>/dev/null; then
|
|
alias nr="sudo nixos-rebuild switch --flake git+https://os.scoble.me/forgejo/sscoble/laptop-config.git#laptop"
|
|
elif command -v home-manager &>/dev/null; then
|
|
alias nr="home-manager switch --flake git+https://os.scoble.me/forgejo/sscoble/laptop-config.git#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'"
|
|
'';
|
|
envExtra = ''
|
|
export EDITOR=nvim
|
|
export VISUAL=nvim
|
|
'';
|
|
};
|
|
}
|