This repository has been archived on 2026-09-17. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nixos-config/home/tnix/localModules/nixvim.nix
pijukka 26b51b0117 fix(agent-codex): stop Builder from self-triggering unscoped nix flake check
Found live during a board-pipeline smoke test (2026-09-06): the fixed
prompt told Codex it could/should run `nix flake check`/`nix build`
itself before the commit marker. Codex took this literally and ran a
bare, unscoped `nix flake check` itself -- twice, in parallel -- which
evaluates and builds every nixosConfiguration in the flake regardless
of which host the change concerns. This dragged in tnix's texliveFull
closure (one of nixpkgs' largest packages) and pinix's aarch64
cross-build, OOM-killing agent-codex-builder.service once and pushing
blunix's load average to 32 the second time, unrelated to the trivial
one-file change actually being committed.

- builder.py: FIXED_PROMPT now explicitly tells Codex not to run
  nix flake check/nix build itself -- the wrapper already does a
  host-scoped equivalent (run_flake_check()'s prior fix to
  `nix eval --raw .../toplevel.drvPath`, plus build_and_diff()'s
  existing scoped `nix build`) after Codex is done.
- hosts/tnix/localServices/packages.nix,
  home/tnix/localModules/nixvim.nix: texliveFull commented out (not
  deleted) -- it was the single largest contributor to the runaway
  evaluation/build cost whenever anything drags tnix's config in.
- board-agent.nix: systemd.tmpfiles.rules for builder-results(-consumed)
  -- found in the same session, ReadWritePaths on
  agent-codex-builder.service needs the directory to exist before
  service start (systemd sets up the bind-mount before any
  ExecStartPre runs), not lazily via mkdir at runtime.

68 agent-codex tests pass; blunix and tnix both eval clean; blunix
toplevel builds without touching tnix/pinix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ANg2L2xUmNJ45t9mcv6HVT
2026-09-06 19:05:55 +02:00

171 lines
4 KiB
Nix

{ pkgs, ... }:
let
nixvim = import (builtins.fetchGit {
url = "https://github.com/nix-community/nixvim";
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of nixvim.
rev = "1c5c991fda4519db56c30c9d75ba29ba7097af83";
});
in
{
imports = [
nixvim.homeManagerModules.nixvim
];
programs.nixvim = {
enable = false;
extraConfigLua = ''
vim.cmd("colorscheme zenbones")
'';
globals.mapleader = " ";
opts = {
number = true; # Show absolute line numbers
relativenumber = true; # Show relative line numbers (cursor line = 0)
};
extraPlugins = [pkgs.vimPlugins."lush-nvim" pkgs.vimPlugins."zenbones-nvim" ];
# colorschemes.monokai-pro = {
# enable = true;
# settings = {
# background_clear = [ "telescope" ];
## day_night = {
## enable = true;
## day_filter = "pro";
## }
# };
# luaConfig.post =''
# require("monokai-pro").setup({
# -- ...
# override = function()
# return {
# Normal = { fg = "#119C1F", bg = "#EBF2EF" };
# Comment = { fg = "#dddddd" };
# Constant = { fg = "#D2F229" };
# Functions = { fg = "#11466B" };
# String = { fg = "#AD1818" };
# Identifier = { fg = "#B30909" };
# Operator = { fg = "#000000" };
# Character = { fg = "#2AE896" };
# Number = { fg = "#BF2EC9" };
# Cursor = { fg = "#EBFF69" }
#
# }
# end
# -- ...
# })
# '';
#};
#colorschemes.gruvbox.enable = false;
#colorschemes.catppuccin.enable = false;
#colorschemes.kanagawa-paper.enable = true;
plugins.harpoon = {
enable = true;
enableTelescope = true;
};
plugins.web-devicons.enable = true;
plugins.neo-tree.enable = true;
plugins.telescope.enable = true;
plugins.hardtime.enable = true;
plugins.image.enable = true;
plugins.snacks = {
enable = true;
# settings = {
# image = {
# enabled = true;
# };
# };
};
plugins.neogit.enable = true;
plugins.yazi.enable = true;
plugins.vimtex.enable = true;
# texlivePackage commented out 06.09.2026 along with
# hosts/tnix/localServices/packages.nix's texliveFull -- see that
# file's comment for why.
# plugins.vimtex.texlivePackage = pkgs.texliveFull;
plugins.vimtex.settings = {
view_method = "zathura";
#compilerMethod = "latexrun";
#compilerOpts = [ "-lualatex" ];
#compilerOpts = [ "-pdf" "-pdflatex=lualatex" "-interaction=nonstopmode" ];
};
keymaps = [
#yanking to clipboard
{
mode = "t";
key = "<Esc>";
action = ''<C-\><C-n>'';
options = { noremap = true; silent = true; desc = "Exit terminal mode"; };
}
{
mode = "v";
key = "<leader>y";
action = ''"+y'';
options = { desc = "Yank visual selection to system clipboard"; };
}
{
mode = "n";
key = "<leader>Y";
action = ''"+yy'';
options = { desc = "Yank current line to system clipboard"; };
}
{
mode = [
"i"
"x"
"n"
"s"
];
key = "<C-s>";
action = "<cmd>w<cr><esc>";
options = {
desc = "Save File";
};
}
{
key = "<A-S-t>";
action = "<cmd>:tabnew +term<CR>";
}
{
key = "<C-S-y>";
action = "<cmd>Yazi<CR>";
}
{
action = "<cmd>Neotree toggle<CR>";
key = "<leader>e";
}
# this doesnt do anything i guess
{
mode = "n";
key = "<leader>ut";
action = "<cmd>UndotreeToggle<CR>";
options = {
desc = "Undotree";
};
}
{
key = "<Leader>g";
action = ":Neogit<CR>";
mode = "n";
options.desc = "open neogit";
}
{
action = "<cmd>Telescope find_files<CR>";
key = "<leader>ff";
}
{
key = "<Leader>fr";
action = "<cmd> Telescope oldfiles <CR>";
mode = "n";
options.desc = "Find recents";
}
];
};
}