Compare commits

...
40 Commits
Author SHA1 Message Date
emmatherock f2b6e843eb chore(nixvim): preserve branch-specific setup 2026-09-21 08:46:37 -03:00
emmatherockandClaude Sonnet 5 09b138391b feat(vps): add wireguard peer 10.20.0.3
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 22:55:53 -03:00
emmatherock 0aa0cc0e0d feat(neovim): add OSC 52 clipboard support for SSH sessions
Lets "+y/"+p sync with the system clipboard over SSH (Termius -> VPS/homelab)
without relying on a local clipboard provider.
2026-09-05 20:01:42 -03:00
emmatherock 5d9cd9d835 feat(neovim): add snippets, autopairs and surround 2026-09-04 20:51:47 -03:00
emmatherockandClaude Sonnet 5 656fc82d7f feat(neovim): add Dockerfile/Compose LSP and treesitter support
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 18:06:36 -03:00
emmatherockandClaude Sonnet 5 f37b4db130 chore(flake): update flake.lock inputs
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018myBNc8EqfqaQmYrKdkxVM
2026-09-03 21:55:35 -03:00
emmatherockandClaude Sonnet 5 52c6a60404 feat(vps): enable IP forwarding for exit node support
Required so the host can route traffic as a Tailscale/Headscale exit node.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-01 15:43:17 -03:00
emmatherock f7c68efe3d chore(codex): configure NixOS MCP server 2026-08-31 03:59:06 -03:00
emmatherock 07c53ac387 docs(todo): remove completed items 2026-08-31 03:59:06 -03:00
emmatherock 0ea3a46059 fix(neovim): use canonical Codex adapter name 2026-08-31 03:59:06 -03:00
emmatherock b4443ea131 feat(homelab): add Ollama service with ROCm 2026-08-31 03:59:06 -03:00
emmatherockandClaude Sonnet 5 e47eef6e56 refactor(neovim): switch CodeCompanion adapter from gemini_cli to codex_acp
Reuses the codex CLI's ChatGPT login (auth_method = "chat-gpt") instead of
gemini's oauth-personal, and disables adapter preset noise in the picker.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-30 15:47:09 -03:00
emmatherock f4ac164633 feat(neovim): add vim-fugitive for Git integration
Enables interactive status, commits, push/pull, and file diffs
via <leader>g{s,c,p,l,d}, complementing gitsigns' hunk-level view.
2026-08-30 12:54:29 -03:00
emmatherock b14d48b3e2 refactor(agents): drop gemini-cli from home packages 2026-08-30 12:54:23 -03:00
emmatherock 3475d0cde1 feat(neovim): add chat window configuration with vertical layout 2026-08-29 15:49:04 -03:00
emmatherock 65d251504a refactor(flake.lock): remove obsolete nixpkgs_5 entry and update nixvim inputs 2026-08-29 14:45:01 -03:00
emmatherock 2b24333e3f feat(flake): restructure nixvim input to include follows attribute 2026-08-29 14:44:56 -03:00
emmatherock 8d0589e157 feat(neovim): add additional formatting and search tools to plugins 2026-08-29 14:44:51 -03:00
emmatherock bb549a8ad9 feat(agents): add codex-acp and claude-agent-acp to home packages 2026-08-29 14:06:10 -03:00
emmatherock 9ab0508157 feat(flake.lock): update flake inputs and locked versions for nixvim and flake-parts 2026-08-29 13:09:55 -03:00
emmatherock ca6e2b5a57 refactor(packages): remove vim and fastfetch from home packages 2026-08-29 13:09:49 -03:00
emmatherock ce139a1eec feat(core): add fastfetch to home packages 2026-08-29 13:09:44 -03:00
emmatherock 679d18b278 feat(agents): update home packages to include gemini-cli and codex 2026-08-29 13:09:37 -03:00
emmatherock b4f0765591 feat(neovim): add Neovim configuration and integrate with home profiles 2026-08-29 13:09:27 -03:00
emmatherock 01753a10f6 feat(default.nix): add extraPrograms to myHomeProfile for agent configuration 2026-08-26 03:49:00 -03:00
emmatherock 125edfb31b fix(users): update authorizedKeys for user emmatherock 2026-08-26 01:46:33 -03:00
emmatherock 58a47d94fb fix(users): update authorizedKeys for user emmatherock 2026-08-26 01:46:15 -03:00
emmatherock 81a7e80360 fix(flake.lock): update locked dependencies and their revisions 2026-08-26 01:28:03 -03:00
emmatherock 44d14fca6d feat(configuration): update NixOS description and enhance direnv integration 2026-08-26 01:27:52 -03:00
emmatherock 8770e95bbe fix(flake.lock): update locked dependencies and their revisions 2026-08-18 13:28:34 -03:00
emmatherock 2ecc910de4 feat(networking): enable useNetworkd option for static IP configuration 2026-08-18 13:24:02 -03:00
emmatherock 40f0dc0d45 feat(networking): add onlinkGateway option for static IP configuration 2026-08-13 21:34:30 -03:00
emmatherock 7a276567c6 fix(vps): update network interface from eth0 to ens3 2026-08-13 02:47:07 -03:00
emmatherockandClaude Sonnet 5 5a4b51112f feat(home-manager): add core+extras profile and wire it into vps
Introduce myHomeProfile.extraPrograms (mirrors myPackages.extra) so each
host's NixOS config declares which extra Home Manager modules it needs
on top of a shared core (fish, starship, btop, git). miku-homelab's
former home.nix becomes its extras list; vps gets home-manager for the
first time using core alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 02:43:27 -03:00
emmatherockandClaude Sonnet 5 e008288d52 feat(vps): switch to systemd-boot, set Buenos Aires timezone, bump stateVersion
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 04:00:48 -03:00
emmatherockandClaude Sonnet 5 1dcd29fd96 chore(vps): remove stale placeholder comment for vps-wg secret
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 03:54:31 -03:00
emmatherockandClaude Sonnet 5 64b031ceba feat(vps): add real vps WireGuard key and update miku-homelab peer
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 03:53:32 -03:00
emmatherockandClaude Sonnet 5 f3ddbb162c feat(secrets): wire up real vps SSH host key and new admin key
Fills in the real vps host key (replacing the install placeholder) and
registers vps-wg.age for agenix. Also adds Emma's NixOS-machine SSH key
as an admin decrypt key and to the vps host's authorizedKeys.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 03:41:10 -03:00
emmatherockandClaude Sonnet 5 d0cb1b5090 feat(vps): use real generated hardware-configuration.nix
Replaces the placeholder with the actual output of
nixos-generate-config from the installed VPS (real disk UUIDs,
qemu-guest profile, virtio kernel modules).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 03:21:07 -03:00
emmatherockandClaude Sonnet 5 7c2a09a360 refactor(packages): split core packages from per-host extras
modules/system/packages.nix now exposes myPackages.extra so hosts can
add their own tools on top of the always-installed core set, instead
of hardcoding every host's packages in one shared list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 03:20:28 -03:00
18 changed files with 629 additions and 99 deletions

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
## Me
[mcp_servers.nixos]
command = "nix"
args = ["run", "github:utensils/mcp-nixos", "--"]
-2
View File
@@ -1,3 +1 @@
- Evaluate Plasma Manager when Plasma 6.7 support improves
- Review system-wide package list periodically
- Add additional hosts
Generated
+109 -33
View File
@@ -37,11 +37,11 @@
"sf-pro": "sf-pro"
},
"locked": {
"lastModified": 1786018145,
"narHash": "sha256-4cjJFmq6JC0Gk9wWt3aZzqovtmM9mikrDWjsBL2ZWu8=",
"lastModified": 1787373040,
"narHash": "sha256-mSpL69LSAA/+cQx+v9tC2XC/DD7cUepUmhiMx0/Hw64=",
"owner": "Lyndeno",
"repo": "apple-fonts.nix",
"rev": "66b5379c6a429ad4ea6ff3943cc1f651df55cc70",
"rev": "69f20e9ba294420e4b6407a827c6b5aea3afcc12",
"type": "github"
},
"original": {
@@ -96,15 +96,16 @@
]
},
"locked": {
"lastModified": 1784665499,
"narHash": "sha256-9BMxlTxCCDAeoNLtb1a/st7udtTIJep+wpUzquA29VU=",
"owner": "nix-community",
"lastModified": 1788011267,
"narHash": "sha256-mEq2kU+ljompTToZ44Afvm7d/rHJ5iMBl0tjZuyShJs=",
"owner": "Mic92",
"repo": "bun2nix",
"rev": "0f2a1f0b6f42cebe3b149bf62d38754c5e0e9729",
"rev": "5765b0614591f75ee8ba5596e81ae85c167d1071",
"type": "github"
},
"original": {
"owner": "nix-community",
"owner": "Mic92",
"ref": "fix-structured-attrs-hook",
"repo": "bun2nix",
"type": "github"
}
@@ -161,11 +162,11 @@
]
},
"locked": {
"lastModified": 1785627969,
"narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=",
"lastModified": 1788450739,
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a",
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993",
"type": "github"
},
"original": {
@@ -175,6 +176,27 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1787559586,
"narHash": "sha256-onL0VLf9vPllmT0H/OlURIU5r5t5WIEl7t4tVNKT0Nw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9d0d87172c374f89da73c1cfe6d81ae62feac1f1",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
@@ -220,11 +242,11 @@
]
},
"locked": {
"lastModified": 1786356609,
"narHash": "sha256-ou8fYz5w9yhXC8YbvvExybFIa19MyW5G/8dEPqa90hM=",
"lastModified": 1788458226,
"narHash": "sha256-UZTAlg8iKVEmyEXakzKmukrzFIKrXezYsRy9vajDrGw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c30c7955cec30d664a9baced6bc0112e263d4647",
"rev": "aa308770461dcf22c333a5e8a31c8bddbde5bee9",
"type": "github"
},
"original": {
@@ -242,11 +264,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1786389530,
"narHash": "sha256-YTLO0pwBI3eAxT6tssly2MY1lhntcNOV3Xg1agIL5x4=",
"lastModified": 1788481344,
"narHash": "sha256-3jEfPEkegrp3ps+VuNT0i+kI4hhfDKoSICoUzZrXDOE=",
"owner": "numtide",
"repo": "llm-agents.nix",
"rev": "5b6721acbc198851658de3f93444d2be308ffe77",
"rev": "496d8f2d508dcd4673a1480cd58b3e9bf3400c15",
"type": "github"
},
"original": {
@@ -276,11 +298,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1786328173,
"narHash": "sha256-ghZYtP08BstfBD3keiUHM5KupIRY3+YS+naBsFPtGzc=",
"lastModified": 1788408011,
"narHash": "sha256-VErLyHIT3U4x64a2G6J6wplB4yDPIpMXlhUpBjUMNEE=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "f5911382d78f7d739197702509b83d790d592cea",
"rev": "f848614222a7ef023998450a6f6773e10f8adf83",
"type": "github"
},
"original": {
@@ -322,11 +344,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1785975029,
"narHash": "sha256-X44cn5rzytELc3NNoQsh0aLkjWA/QzPfc6HPQmsG3sU=",
"lastModified": 1788372231,
"narHash": "sha256-7aqErvrAEz/5OcPA5p3M+tVOqeYc4oJXkNIPXfCqxAw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "70ce234312134a463ba7728e94da2486a1d237ac",
"rev": "9387b3fcc0c23c86661636da63faabad4235a0a6",
"type": "github"
},
"original": {
@@ -354,11 +376,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1786106723,
"narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=",
"lastModified": 1788316716,
"narHash": "sha256-bc7rSpXIdn9QWGNqfWcPZWOhEVF8NoeAZkWq0XWnf/k=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238",
"rev": "3ed67ec0a4d3c7ab4ae1f04f8ee8df07bfa506a2",
"type": "github"
},
"original": {
@@ -368,6 +390,42 @@
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1789844176,
"narHash": "sha256-COQmpo4lFIzMgUjr3ntDpjH0NwrCnf7N0uhR+6WPGP8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "79b35bf0bda5cd110f856aa5b5b2c5ba4460dbf5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_5",
"systems": "systems_3"
},
"locked": {
"lastModified": 1788190018,
"narHash": "sha256-59BAfH0txPAZrPBF4QJqwvUWppD+ICrcjA1LZAmPnrQ=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "41844750e55f17b1385d5b09ca7ade5f11f49506",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"ny": {
"flake": false,
"locked": {
@@ -412,6 +470,7 @@
"nix-flatpak": "nix-flatpak",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
"plasma-manager": "plasma-manager",
"sidra": "sidra",
"vscode-server": "vscode-server"
@@ -508,11 +567,11 @@
]
},
"locked": {
"lastModified": 1785827118,
"narHash": "sha256-tS2eSSpa1uLPUyIAJBpf00+A9KSHpC92gKMLavmHuio=",
"lastModified": 1788475513,
"narHash": "sha256-JRZ3eQpeeExv3mR1icbZAjToe7MPm8XleJML0UsrAHg=",
"owner": "wimpysworld",
"repo": "sidra",
"rev": "0597e5438fe98fef935cb528c2c9aa5db60171c9",
"rev": "257dce10bd6805633d99e5cdae6897d014619dcc",
"type": "github"
},
"original": {
@@ -551,6 +610,23 @@
"type": "github"
}
},
"systems_3": {
"flake": false,
"locked": {
"lastModified": 1774449309,
"narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=",
"owner": "nix-systems",
"repo": "default",
"rev": "c29398b59d2048c4ab79345812849c9bd15e9150",
"type": "github"
},
"original": {
"owner": "nix-systems",
"ref": "future-26.11",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@@ -559,11 +635,11 @@
]
},
"locked": {
"lastModified": 1785945821,
"narHash": "sha256-NLSyTCW4K4ofhNBllt3omPasm6QpralXH1DBZOc91Dw=",
"lastModified": 1786901030,
"narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "ae7910970dddc408fe6ab1c8e4b277bb21d72dc0",
"rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa",
"type": "github"
},
"original": {
@@ -574,7 +650,7 @@
},
"vscode-server": {
"inputs": {
"flake-parts": "flake-parts_2"
"flake-parts": "flake-parts_3"
},
"locked": {
"lastModified": 1784312229,
+18 -2
View File
@@ -1,5 +1,5 @@
{
description = "NixOS configuration for my homelab";
description = "my nixos configurations";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
@@ -21,6 +21,7 @@
url = "github:gmodena/nix-flatpak/?ref=latest";
};
vscode-server.url = "github:nix-community/nixos-vscode-server";
nixvim.url = "github:nix-community/nixvim";
llm-agents.url = "github:numtide/llm-agents.nix";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
agenix = {
@@ -53,8 +54,11 @@
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.sharedModules = [
plasma-manager.homeModules.plasma-manager
inputs.nixvim.homeModules.nixvim
];
home-manager.users.emmatherock = import ./home/emmatherock/home.nix;
home-manager.users.emmatherock = { osConfig, ... }: {
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
};
}
];
};
@@ -65,8 +69,20 @@
specialArgs = { inherit inputs; };
modules = [
./hosts/vps
home-manager.nixosModules.home-manager
vscode-server.nixosModules.default
agenix.nixosModules.default
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.sharedModules = [
inputs.nixvim.homeModules.nixvim
];
home-manager.users.emmatherock = { osConfig, ... }: {
imports = [ ./home/emmatherock/core.nix ] ++ osConfig.myHomeProfile.extraPrograms;
};
}
];
};
};
+2 -1
View File
@@ -5,8 +5,9 @@ let
in
{
home.packages = with agents; [
antigravity-cli
codex
codex-acp
claude-code
claude-agent-acp
];
}
+22
View File
@@ -0,0 +1,22 @@
{ pkgs, ... }:
{
imports = [
./git.nix
./shell.nix
];
programs.home-manager.enable = true;
programs.btop.enable = true;
# Per-project toolchain resolution (nix-shell / flake devShell), used by
# nixvim's LSP servers so they don't need language toolchains installed globally.
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
home.packages = with pkgs; [
fastfetch
];
home.stateVersion = "25.11";
}
-18
View File
@@ -1,18 +0,0 @@
{
imports = [
./agents.nix
./audio.nix
./desktop-apps.nix
./deskflow.nix
./gaming.nix
./git.nix
./media.nix
./packages.nix
./plasma.nix
./shell.nix
./vscode.nix
];
programs.home-manager.enable = true;
home.stateVersion = "25.11";
}
+286
View File
@@ -0,0 +1,286 @@
# Declarative Neovim config via nixvim. Goal: a real, lean IDE — not a
# feature-for-feature VSCode clone. Every plugin here earns its place.
{ pkgs, ... }:
{
programs.nixvim = {
enable = true;
defaultEditor = true;
vimAlias = true; # `vim` -> nvim, handy when SSH'd into the VPS/homelab
colorschemes.catppuccin = {
enable = true;
settings.flavour = "mocha";
};
globals.mapleader = " ";
# --- System clipboard over OSC 52, so "+y / "+p work over SSH
# (Termius -> VPS/homelab) without a local clipboard provider.
# Requires Neovim 0.10+ for vim.ui.clipboard.osc52; confirmed
# present (Neovim 0.12.5 on the pinned nixpkgs as of 2026-09).
extraConfigLua = ''
vim.g.clipboard = {
name = "OSC 52",
copy = {
["+"] = require("vim.ui.clipboard.osc52").copy("+"),
["*"] = require("vim.ui.clipboard.osc52").copy("*"),
},
paste = {
["+"] = require("vim.ui.clipboard.osc52").paste("+"),
["*"] = require("vim.ui.clipboard.osc52").paste("*"),
},
}
'';
opts = {
number = true;
relativenumber = true;
shiftwidth = 2;
tabstop = 2;
expandtab = true;
termguicolors = true;
signcolumn = "yes";
scrolloff = 8;
};
# --- File explorer ---
plugins.neo-tree = {
enable = true;
settings.window.width = 30;
};
# --- Fuzzy finder: files, grep, buffers, LSP symbols ---
plugins.telescope = {
enable = true;
extensions.fzf-native.enable = true;
};
# --- Treesitter: syntax highlighting/parsing for your stack ---
plugins.treesitter = {
enable = true;
settings.ensure_installed = [
"nix" "bash" "lua" "markdown" "json" "yaml"
"rust" "go" "gomod" "c" "cpp" "c_sharp" "python"
"javascript" "typescript" "tsx" "vue" "html" "css" "dockerfile"
];
};
# --- LSP: one server per language/toolchain you use ---
plugins.lsp = {
enable = true;
servers = {
nixd.enable = true;
bashls.enable = true;
rust_analyzer = {
enable = true;
installCargo = true;
installRustc = true;
};
gopls.enable = true;
clangd.enable = true; # C / C++
csharp_ls.enable = true;
pyright.enable = true;
ts_ls.enable = true; # JS/TS, React
volar.enable = true; # Vue
html.enable = true;
cssls.enable = true;
tailwindcss.enable = true;
jsonls.enable = true;
dockerls.enable = true;
docker_compose_language_service.enable = true;
};
keymaps.lspBuf = {
"gd" = "definition";
"gr" = "references";
"K" = "hover";
"<leader>rn" = "rename";
"<leader>ca" = "code_action";
};
};
# --- Autocompletion ---
plugins.cmp = {
enable = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "luasnip"; }
{ name = "path"; }
{ name = "buffer"; }
];
settings.snippet.expand = ''
function(args)
require("luasnip").lsp_expand(args.body)
end
'';
settings.mapping = {
"<Tab>" = ''
cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
require("luasnip").expand_or_jump()
else
fallback()
end
end, { "i", "s" })
'';
"<S-Tab>" = ''
cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
require("luasnip").jump(-1)
else
fallback()
end
end, { "i", "s" })
'';
};
};
plugins.cmp-nvim-lsp.enable = true;
plugins.cmp_luasnip.enable = true;
plugins.cmp-path.enable = true;
plugins.cmp-buffer.enable = true;
# --- Snippets ---
plugins.luasnip = {
enable = true;
fromVscode = [ { paths = "${pkgs.vimPlugins.friendly-snippets}"; } ];
};
# --- Pairs and surrounding text ---
plugins.nvim-autopairs.enable = true;
plugins.nvim-surround.enable = true;
# --- Format on save ---
plugins.conform-nvim = {
enable = true;
settings = {
format_on_save = {
lsp_fallback = true;
timeout_ms = 500;
};
formatters_by_ft = {
rust = [ "rustfmt" ];
go = [ "gofmt" ];
c = [ "clang-format" ];
cpp = [ "clang-format" ];
python = [ "black" ];
javascript = [ "prettier" ];
typescript = [ "prettier" ];
javascriptreact = [ "prettier" ];
typescriptreact = [ "prettier" ];
vue = [ "prettier" ];
nix = [ "nixpkgs-fmt" ];
};
};
};
# --- Git: gutter signs, hunk stage/reset, blame ---
plugins.gitsigns.enable = true;
# --- Git: interactive status/commit/diff/blame ---
plugins.fugitive.enable = true;
# --- Statusline ---
plugins.lualine.enable = true;
# --- Discoverable keybindings while you're still learning ---
plugins.which-key.enable = true;
# --- AI agent: CodeCompanion, curated natively in nixvim ---
# Configured to reuse your existing `claude`/`codex` CLI auth via ACP
# adapters instead of a separate Anthropic Console/OpenAI API key.
#
# Verified against https://codecompanion.olimorris.dev/configuration/adapters-acp
# (CodeCompanion >= v18.0.0, which is what's pinned by nixvim's nixpkgs as of
# 2026-08). Two things changed from an older/assumed layout:
# - the default-adapter key is `interactions.chat.adapter`, not
# `strategies.chat.adapter` (renamed in v18.0.0);
# - the built-in adapter name is `claude_code` (no `_acp` suffix) and
# lives under `adapters.acp.<name>`.
#
# Neither adapter has a true zero-config mode that silently piggybacks on
# an already-logged-in CLI session:
# - codex: extends the built-in `codex` preset. `defaults.auth_method`
# accepts "api-key" | "chat-gpt" (confirmed against the docs above,
# not "chatgpt"/"openai-api-key"/"codex-api-key"). "chat-gpt" reuses
# your ChatGPT/Codex CLI login instead of an OPENAI_API_KEY.
# - claude_code: there's no oauth-personal equivalent. Run
# `claude setup-token` once (ties to your Pro/Max subscription rather
# than a Console API key) and save the result to
# ~/.config/codecompanion/claude-oauth-token (chmod 600, outside the
# nix store). It's read at runtime via the `cmd:` prefix below rather
# than embedded in this file.
plugins.codecompanion = {
enable = true;
settings = {
interactions.chat.adapter = "claude_code"; # switch to "codex" per-chat
interactions.inline.adapter = "claude_code";
adapters.acp = {
opts.show_presets = false;
claude_code.__raw = ''
function()
return require("codecompanion.adapters").extend("claude_code", {
env = {
CLAUDE_CODE_OAUTH_TOKEN = "cmd:cat ~/.config/codecompanion/claude-oauth-token",
},
})
end
'';
codex.__raw = ''
function()
return require("codecompanion.adapters").extend("codex", {
defaults = {
auth_method = "chat-gpt",
},
})
end
'';
};
adapters.http.opts.show_presets = false;
display.chat.window = {
layout = "vertical";
position = "right";
width = 0.4;
};
};
};
# --- Editor-level tooling only: formatters conform.nvim shells out to.
# Language toolchains themselves (cargo, go, dotnet-sdk, nodejs,
# a compiler, a python interpreter) come from your per-project
# nix-shell / flake devShell, not from here — launch nvim from
# inside that shell (`nix develop`, or nix-shell + direnv) so LSP
# servers resolve the right toolchain via PATH.
extraPackages = with pkgs; [
python3Packages.black
prettier
nixpkgs-fmt
file
ripgrep
sqlite
];
keymaps = [
{ mode = "n"; key = "<leader>e"; action = "<cmd>Neotree toggle<CR>"; }
{ mode = "n"; key = "<leader>ff"; action = "<cmd>Telescope find_files<CR>"; }
{ mode = "n"; key = "<leader>fg"; action = "<cmd>Telescope live_grep<CR>"; }
{ mode = "n"; key = "<leader>fb"; action = "<cmd>Telescope buffers<CR>"; }
# CodeCompanion
{ mode = [ "n" "v" ]; key = "<leader>ac"; action = "<cmd>CodeCompanionChat Toggle<CR>"; }
{ mode = "v"; key = "<leader>aa"; action = "<cmd>CodeCompanionChat Add<CR>"; }
{ mode = "n"; key = "<leader>ai"; action = "<cmd>CodeCompanion<CR>"; } # inline assistant
# Fugitive
{ mode = "n"; key = "<leader>gs"; action = "<cmd>Git<CR>"; } # status
{ mode = "n"; key = "<leader>gc"; action = "<cmd>Git commit<CR>"; } # interactive commit
{ mode = "n"; key = "<leader>gp"; action = "<cmd>Git push<CR>"; }
{ mode = "n"; key = "<leader>gl"; action = "<cmd>Git pull<CR>"; }
{ mode = "n"; key = "<leader>gd"; action = "<cmd>Gvdiffsplit<CR>"; } # diff current file
];
};
}
+2 -4
View File
@@ -1,10 +1,8 @@
{ pkgs, ... }:
{
programs.btop.package = pkgs.btop.override { cudaSupport = false; rocmSupport = true; };
home.packages = with pkgs; [
# --- Base y Terminal ---
vim
fastfetch
(btop.override { cudaSupport = false; rocmSupport = true; })
nvtopPackages.full
];
}
+31 -2
View File
@@ -5,13 +5,35 @@
./hardware-configuration.nix
../../modules/profiles/desktop.nix
../../modules/profiles/server.nix
../../modules/services/ollama.nix
../../modules/services/samba.nix
../../modules/system/home-profile.nix
../../modules/system/nix-ld.nix
../../modules/system/packages.nix
];
age.secrets.miku-homelab-wg.file = ../../secrets/miku-homelab-wg.age;
myPackages.extra = with pkgs; [
rocmPackages.rocm-smi
btrfs-progs
distrobox
steam-run
];
myHomeProfile.extraPrograms = [
../../home/emmatherock/agents.nix
../../home/emmatherock/audio.nix
../../home/emmatherock/desktop-apps.nix
../../home/emmatherock/deskflow.nix
../../home/emmatherock/gaming.nix
../../home/emmatherock/media.nix
#../../home/emmatherock/neovim.nix
../../home/emmatherock/packages.nix
../../home/emmatherock/plasma.nix
../../home/emmatherock/vscode.nix
];
myNetworking = {
hostName = "miku-homelab";
useNetworkManager = true;
@@ -31,7 +53,7 @@
privateKeyFile = config.age.secrets.miku-homelab-wg.path;
peers = [
{
publicKey = "zERcSEQhan+xtmPOIjuVSkQaBynTjH96SgZZF9CZNV8=";
publicKey = "BKs9VlsIEM1np6wHeVFL4NfbS1l69xnwins6Q12ByAM=";
allowedIPs = [ "10.20.0.1/32" ];
endpoint = "vps.external.mikufanclub.lat:51822";
persistentKeepalive = 25;
@@ -47,7 +69,7 @@
extraGroups = [ "plugdev" "networkmanager" "wheel" "video" "mikushare-group" "render" ];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO6pnKpUEaeoNXqlenc8MAz1GG8P6BRILyIHMSLtvdeF termius"
];
};
serviceUsers.mikushare = {
@@ -136,5 +158,12 @@
experimental-features = [ "nix-command" "flakes" ];
};
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 50;
priority = 100;
};
system.stateVersion = "25.11";
}
+30 -13
View File
@@ -1,26 +1,34 @@
{ config, ... }:
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
../../modules/profiles/server.nix
../../modules/system/home-profile.nix
../../modules/system/nix-ld.nix
../../modules/system/packages.nix
];
# PLACEHOLDER: secrets/vps-wg.age does not exist yet. It has to be created
# (same way as secrets/miku-homelab-wg.age) once this host is installed and
# its own WireGuard private key has been generated.
age.secrets.vps-wg.file = ../../secrets/vps-wg.age;
myHomeProfile.extraPrograms = [
../../home/emmatherock/agents.nix
../../home/emmatherock/neovim.nix
];
myNetworking = {
hostName = "vps";
useNetworkManager = false;
useNetworkd = true;
staticIp = {
interface = "eth0";
interface = "ens3";
address = "23.175.41.196";
prefixLength = 27;
gateway = "23.175.41.225";
nameservers = [ "1.1.1.1" "1.0.0.1" ];
onlinkGateway = true;
};
extraTcpPorts = [ 80 443 ];
extraUdpPorts = [ 51822 ];
sshAllowUsers = [ "emmatherock" ];
@@ -34,6 +42,10 @@
publicKey = "bqxDHQNxOSFpTo3We9ujC2WljtaRBgiNEewW+Rlu10k=";
allowedIPs = [ "10.20.0.2/32" ];
}
{
publicKey = "6aw0w7v9uFGvLn/eSdf7z/ljvzz4kviYlSOSj0LKp1E=";
allowedIPs = [ "10.20.0.3/32" ];
}
];
};
};
@@ -41,10 +53,12 @@
myUsers = {
admins.emmatherock = {
description = "EmmaTheRock";
shell = pkgs.fish;
extraGroups = [ "wheel" ];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUCpjAuJobymPPAoPjLdL1eD6g4v6wrquu3cyHP22Wj emmatherock@NixOS"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO6pnKpUEaeoNXqlenc8MAz1GG8P6BRILyIHMSLtvdeF termius"
];
};
};
@@ -57,17 +71,20 @@
};
};
# PLACEHOLDER: adjust once the real VPS image/provider is known (BIOS vs
# UEFI, actual boot device). Assumes a generic BIOS-booted image for now.
boot.loader.grub = {
enable = true;
device = "/dev/sda";
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true;
# Required for this host to act as a Tailscale/Headscale exit node.
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
time.timeZone = "UTC";
time.timeZone = "America/Argentina/Buenos_Aires";
i18n.defaultLocale = "en_US.UTF-8";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "25.11";
system.stateVersion = "26.05";
}
+16 -9
View File
@@ -1,19 +1,26 @@
{ lib, ... }:
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
# PLACEHOLDER: this host has not been installed yet. Replace this whole file
# with the real hardware-configuration.nix generated by `nixos-generate-config`
# during the actual installation (it will pick up the real disk UUIDs,
# filesystem types, and kernel modules for the VPS provider's image).
{
imports = [ ];
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9601-188F";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2fe62056-55d1-4d2a-97a4-74451f7a63d0";
fsType = "ext4";
};
+35
View File
@@ -0,0 +1,35 @@
{ pkgs, ... }:
{
services.ollama = {
enable = true;
# `services.ollama.acceleration` does not exist (that option only lives on
# services.tabby); GPU backend selection for ollama is done by package choice.
package = pkgs.ollama-rocm;
# Same "don't expose services directly" pattern as the rest of the homelab:
# bind to localhost only. If this needs to be reachable from other devices
# later, put it behind Traefik + Headscale like the other services instead
# of opening it up directly.
host = "127.0.0.1";
port = 11434;
environmentVariables = {
# Ollama is on-demand by design: it loads a model into VRAM on the first
# request and unloads it after this much idle time. 5m is already the
# ollama default, set explicitly so it's not an implicit behavior.
OLLAMA_KEEP_ALIVE = "5m";
};
# RDNA4 (gfx1200/gfx1201, incl. the RX 9060 XT) has official ROCm support
# since ROCm 6.4.4. Verified on this host (2026-08-30) with rocmPackages.clr
# 7.2.3: `rocminfo` correctly reports "Name: gfx1200" and `rocm-smi
# --showmeminfo vram` reports the full 16GiB, so the "detected with 0 VRAM,
# falls back to CPU" issue does not reproduce here and rocmOverrideGfx is
# not needed. If a future nixpkgs bump regresses this, re-check with:
# nix shell nixpkgs#rocmPackages.rocminfo -c rocminfo | grep -i gfx
# nix shell nixpkgs#rocmPackages.rocm-smi -c rocm-smi --showmeminfo vram
# and only then set rocmOverrideGfx = "12.0.0"; (gfx1200) if VRAM reports 0.
# rocmOverrideGfx = "12.0.0";
};
}
+8
View File
@@ -0,0 +1,8 @@
{ lib, ... }:
{
options.myHomeProfile.extraPrograms = lib.mkOption {
type = lib.types.listOf lib.types.path;
default = [ ];
description = "Extra Home Manager modules to import for this user, on top of the core profile.";
};
}
+43 -3
View File
@@ -39,6 +39,12 @@ in
description = "Whether to enable NetworkManager to manage network interfaces.";
};
useNetworkd = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether to configure the static IP via systemd-networkd instead of the classic scripted networking backend. Needed for reliable onlink default routes.";
};
staticIp = lib.mkOption {
type = lib.types.nullOr (lib.types.submodule {
options = {
@@ -63,6 +69,11 @@ in
default = [ "1.1.1.1" "8.8.8.8" ];
description = "DNS nameservers to use.";
};
onlinkGateway = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether the gateway lies outside the interface's subnet, requiring the onlink flag on the default route.";
};
};
});
default = null;
@@ -116,7 +127,8 @@ in
};
};
config = {
config = lib.mkMerge [
{
networking = lib.mkMerge [
{
hostName = cfg.hostName;
@@ -127,15 +139,17 @@ in
allowedTCPPorts = [ 22 ] ++ cfg.extraTcpPorts;
};
}
(lib.mkIf (cfg.staticIp != null) {
(lib.mkIf (cfg.staticIp != null && !cfg.useNetworkd) {
useDHCP = false;
interfaces.${cfg.staticIp.interface}.ipv4.addresses = [{
address = cfg.staticIp.address;
prefixLength = cfg.staticIp.prefixLength;
}];
defaultGateway = cfg.staticIp.gateway;
nameservers = cfg.staticIp.nameservers;
})
(lib.mkIf (cfg.staticIp != null && !cfg.useNetworkd && !cfg.staticIp.onlinkGateway) {
defaultGateway = cfg.staticIp.gateway;
})
(lib.mkIf cfg.wireguard.enable {
wireguard.interfaces."wg-${cfg.hostName}" = {
ips = cfg.wireguard.ips;
@@ -163,5 +177,31 @@ in
AllowUsers = cfg.sshAllowUsers;
};
};
}
(lib.mkIf (cfg.staticIp != null && cfg.useNetworkd) {
networking.useDHCP = false;
systemd.network.enable = true;
services.resolved.enable = true;
systemd.network.networks."10-${cfg.staticIp.interface}" = {
matchConfig.Name = cfg.staticIp.interface;
address = [ "${cfg.staticIp.address}/${toString cfg.staticIp.prefixLength}" ];
dns = cfg.staticIp.nameservers;
routes = [
({
routeConfig = {
Gateway = cfg.staticIp.gateway;
} // lib.optionalAttrs cfg.staticIp.onlinkGateway {
GatewayOnLink = true;
};
})
];
networkConfig = {
DHCP = "no";
};
linkConfig.RequiredForOnline = "routable";
};
})
];
}
+17 -6
View File
@@ -1,14 +1,25 @@
{pkgs, ... }:
{ lib, pkgs, config, ... }:
let
cfg = config.myPackages;
in
{
options.myPackages = {
extra = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
description = "Extra packages to install on this host, beyond the core set.";
};
};
config = {
environment.systemPackages = with pkgs; [
git
wget
curl
ethtool
fish
rocmPackages.rocm-smi
btrfs-progs
distrobox
steam-run
];
tmux
] ++ cfg.extra;
};
}
+5 -6
View File
@@ -1,20 +1,19 @@
let
# Emma's personal SSH keys (same ones authorized in modules/system/users.nix),
# so secrets can be edited/re-keyed from her own workstations.
# so secrets can be edited/re-keyed from his own workstations.
emma-main-pc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8vfwM5g9RJXqHtqTgNqsYg9SxSm+UMvFqTjBoAsLJ6 emmatherock@MAIN-PC";
emma-s21-plus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIpTslcK0yQ6k+h8foNl17wVRyJUfEGzq7f1h3014WNB s21 plus";
emma-nixos = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEUCpjAuJobymPPAoPjLdL1eD6g4v6wrquu3cyHP22Wj emmatherock@NixOS";
# Host SSH host keys, used by agenix at runtime to decrypt (via the default
# age.identityPaths, which points at services.openssh host keys).
miku-homelab = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH7zsQdzX7RHRd2plwrTKJR89uwR2YfzBm1n+HkcYEbb root@NixOS";
# TODO: replace with the real vps SSH host key once the host is installed
# (e.g. via `ssh-keyscan` or by reading /etc/ssh/ssh_host_ed25519_key.pub on
# the vps itself), then re-key any vps secrets that were encrypted without it.
vps = "ssh-ed25519 REPLACE_ME_AFTER_VPS_INSTALL";
vps = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDh8+hpWkGLRszFI4TC1/YHB8IiSdM0UUOsWbOwXPLn6 root@vps";
admins = [ emma-main-pc emma-s21-plus ];
admins = [ emma-main-pc emma-s21-plus emma-nixos ];
in
{
"miku-homelab-wg.age".publicKeys = admins ++ [ miku-homelab ];
"vps-wg.age".publicKeys = admins ++ [ vps ];
}
Binary file not shown.