Compare commits

...

34 Commits

Author SHA1 Message Date
f08f14b09d wip: claude code and avante
This may be a mistake. We'll see.
2025-07-02 14:29:01 -05:00
e02f01f120 wip: add claude code as an option in neovim 2025-07-02 13:06:24 -05:00
f62d99a7f8 fix: update to new flake lockfile update command 2025-07-02 13:00:44 -05:00
8a87841d61 wip: update neovim stuff 2025-07-01 12:06:41 -05:00
8e0951d696 chore: cleanup an old comment 2025-06-30 11:06:37 -05:00
398c2a8291 fix: formatexpr with lsp changed
we need to adapt to it
2025-06-30 10:38:00 -05:00
b254617843 fix: diagnostic signs configuration 2025-06-25 10:00:40 -04:00
e605be817a wip: tree-sitter textobjects 2025-06-25 09:50:16 -04:00
d5bb8c8327 wip: cleanup my sign definition for new version of neovim 2025-06-16 18:48:17 -04:00
cdb41c2b4c cleanup: makefile sudo and unused flakes and packages 2025-06-16 18:47:22 -04:00
550794186a maint: update to 25.05 2025-06-12 18:23:58 -04:00
8bf123d387 fix: fold-level of 3 by default is annoying 2025-06-05 08:43:28 -04:00
44fc4edff5 chore: update some package versions 2025-06-05 08:42:39 -04:00
92685c062d Add some helpful keybinds 2025-05-30 10:42:33 -04:00
0811207844 feat: nvim: treesitter: enable code folding 2025-05-28 18:37:58 -04:00
f8d9064a6d feat: nvim: treesitter: enable incremental selection 2025-05-28 18:00:40 -04:00
f509a2ba87 feat: Update ollama 2025-05-28 17:59:33 -04:00
22b2647aea wip: better mcphub prompting 2025-05-08 20:59:49 -04:00
9cce1fb0b0 wip: fix mpchub tool integration configs 2025-05-07 12:29:17 -04:00
48ee2d8c65 feat: mcp-hub integration 2025-05-05 12:27:09 -04:00
9bfc721a29 feat: update some avante config 2025-05-02 12:07:27 -04:00
a9991d9111 chore: update nixpkgs and some formatting cleanup 2025-05-02 11:01:33 -04:00
3688f25dee chore: formatting 2025-04-22 14:41:24 -04:00
24ce299b9d feat: add jedi-language-server 2025-04-22 14:40:53 -04:00
55d60322b0 feat: add fq to our installed tools 2025-04-15 10:10:50 -04:00
233d24d47c wip: Make the default aventa provider claude 2025-04-12 15:41:26 -04:00
13de7d5a88 feat: Add a helper to restart durnitisp 2025-04-12 15:40:25 -04:00
72204b9817 feat: claude api support 2025-04-05 11:23:00 -04:00
303cec1b3c wip: ollama support? 2025-04-04 13:26:45 -04:00
8036d54fcd wip: use copilot 2025-04-02 11:52:45 -04:00
e281fdb1d0 feat: add avante-nvim 2025-04-02 11:52:45 -04:00
485f7f38a1 wip: update uv to later version 2025-04-02 11:52:07 -04:00
71394e207c wip: add uv 2025-04-02 11:01:53 -04:00
cbf5469bf4 feat: update to new sheetsui version 2025-02-19 14:53:04 -05:00
8 changed files with 728 additions and 489 deletions

View File

@ -1,5 +1,11 @@
{ {
"diagnostics.disable": [ "diagnostics.disable": [
"missing-fields" "missing-fields"
],
"diagnostics.globals": [
"vim",
"make_avante_system_prompt",
"update_avante_system_prompt",
"get_server_list_prompt"
] ]
} }

View File

@ -1,5 +1,5 @@
%-darwin: %-darwin:
darwin-rebuild --flake ./nix/base-system $* sudo darwin-rebuild --flake ./nix/base-system $*
update-input-%: update-input-%:
nix flake lock --update-input $* ./nix/base-system/ nix flake update $* ./nix/base-system/

View File

@ -6,10 +6,11 @@ in
nix = { nix = {
package = pkgs.nix; package = pkgs.nix;
enable = true;
# SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812 # SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812
settings.sandbox = "relaxed"; settings.sandbox = "relaxed";
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes repl-flake experimental-features = nix-command flakes
extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux
trusted-users = root zaphar trusted-users = root zaphar
''; '';
@ -44,6 +45,10 @@ in
# }; # };
#}; #};
services.ollama = {
enable = true;
user="zaphar";
};
services.my-lorri.enable = true; services.my-lorri.enable = true;
services.durnitisp.enable = true; services.durnitisp.enable = true;
services.node-exporter.enable = true; services.node-exporter.enable = true;
@ -343,9 +348,6 @@ in
vfkit vfkit
]; ];
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
#services.spacebar.enable = true; #services.spacebar.enable = true;
#services.spacebar.package = "${pkgs.spacebar}"; #services.spacebar.package = "${pkgs.spacebar}";
@ -361,6 +363,7 @@ in
(allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}")) (allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}"))
''; '';
}; };
system.primaryUser = "zaphar";
# Used for backwards compatibility, please read the changelog before changing. # Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog # $ darwin-rebuild changelog
system.stateVersion = 4; system.stateVersion = 4;

View File

@ -20,6 +20,38 @@
"type": "github" "type": "github"
} }
}, },
"avante-src": {
"flake": false,
"locked": {
"lastModified": 1746602870,
"narHash": "sha256-REBOplEe2muqfVLwcpTAmXpTrHlzSfhbh8T0litDTDA=",
"owner": "yetone",
"repo": "avante.nvim",
"rev": "113913355a6b9c0fbd62cf52d0cf3e5671d0e34a",
"type": "github"
},
"original": {
"owner": "yetone",
"repo": "avante.nvim",
"type": "github"
}
},
"claude-code-nvim-src": {
"flake": false,
"locked": {
"lastModified": 1749595024,
"narHash": "sha256-jKWm3lN5nyZ1BsIKMFt4EQhb0n+iyEyOw79Rj/A3yZI=",
"owner": "greggh",
"repo": "claude-code.nvim",
"rev": "275c47615f4424a0329290ce1d0c18a8320fd8b0",
"type": "github"
},
"original": {
"owner": "greggh",
"repo": "claude-code.nvim",
"type": "github"
}
},
"clio-flake": { "clio-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -46,8 +78,11 @@
}, },
"custom-flakes": { "custom-flakes": {
"inputs": { "inputs": {
"avante-src": "avante-src",
"claude-code-nvim-src": "claude-code-nvim-src",
"d2-vim-src": "d2-vim-src", "d2-vim-src": "d2-vim-src",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"gomod2nix-src": "gomod2nix-src",
"hunk-nvim-src": "hunk-nvim-src", "hunk-nvim-src": "hunk-nvim-src",
"ionide-nvim-src": "ionide-nvim-src", "ionide-nvim-src": "ionide-nvim-src",
"naersk": "naersk_2", "naersk": "naersk_2",
@ -61,15 +96,14 @@
"rust-overlay": "rust-overlay_3", "rust-overlay": "rust-overlay_3",
"tree-sitter-cli-src": "tree-sitter-cli-src", "tree-sitter-cli-src": "tree-sitter-cli-src",
"treesitter-context": "treesitter-context", "treesitter-context": "treesitter-context",
"victoria-logs-src": "victoria-logs-src",
"zig-src": "zig-src" "zig-src": "zig-src"
}, },
"locked": { "locked": {
"lastModified": 1732111397, "lastModified": 1751479151,
"narHash": "sha256-2qTl0546a5xZySPdN23gFhz48V6tA2INDjKm4NPBMTs=", "narHash": "sha256-JxS2yHOiScQQOk8YvK4UAGx68iQJXKnL5qNvV0+9s9A=",
"owner": "zaphar", "owner": "zaphar",
"repo": "nix-flakes", "repo": "nix-flakes",
"rev": "be1645a420b26b5a69a734db8596351a51d5a021", "rev": "0442ff179bd8e82ca3fe713d22e258c89f9caccc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -139,15 +173,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1715871485, "lastModified": 1749744770,
"narHash": "sha256-ywapEXmBBI+DVRx/YYC6+6Lk+W8vhShz1uJNvqPKzng=", "narHash": "sha256-MEM9XXHgBF/Cyv1RES1t6gqAX7/tvayBC1r/KPyK1ls=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "cb02884fa1ff5a619a44ab5f1bcc4dedd2d623c2", "rev": "536f951efb1ccda9b968e3c9dee39fbeb6d3fdeb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lnl7", "owner": "lnl7",
"ref": "nix-darwin-25.05",
"repo": "nix-darwin", "repo": "nix-darwin",
"type": "github" "type": "github"
} }
@ -155,7 +190,7 @@
"durnitisp-flake": { "durnitisp-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_6",
"naersk": "naersk_3" "naersk": "naersk_3"
}, },
"locked": { "locked": {
@ -252,6 +287,27 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"mcphub-flake",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -397,6 +453,24 @@
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
},
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
@ -411,7 +485,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_5": { "flake-utils_6": {
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
@ -426,24 +500,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_6": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_7": { "flake-utils_7": {
"inputs": { "inputs": {
"systems": "systems_6" "systems": "systems_6"
@ -467,11 +523,11 @@
"systems": "systems_7" "systems": "systems_7"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1705309234,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -485,11 +541,11 @@
"systems": "systems_8" "systems": "systems_8"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1731533236,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -519,29 +575,31 @@
"type": "github" "type": "github"
} }
}, },
"harpoon-src": { "gomod2nix-src": {
"flake": false, "inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_3"
},
"locked": { "locked": {
"lastModified": 1706306053, "lastModified": 1745875161,
"narHash": "sha256-RjwNUuKQpLkRBX3F9o25Vqvpu3Ah1TCFQ5Dk4jXhsbI=", "narHash": "sha256-0YkWCS13jpoo3+sX/3kcgdxBNt1VZTmvF+FhZb4rFKI=",
"owner": "ThePrimeagen", "owner": "nix-community",
"repo": "harpoon", "repo": "gomod2nix",
"rev": "a38be6e0dd4c6db66997deab71fc4453ace97f9c", "rev": "2cbd7fdd6eeab65c494cc426e18f4e4d2a5e35c0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "ThePrimeagen", "owner": "nix-community",
"ref": "harpoon2", "repo": "gomod2nix",
"repo": "harpoon",
"type": "github" "type": "github"
} }
}, },
"heracles-flake": { "heracles-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_7",
"naersk": "naersk_4", "naersk": "naersk_4",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_9",
"rust-overlay": "rust-overlay_4" "rust-overlay": "rust-overlay_4"
}, },
"locked": { "locked": {
@ -613,16 +671,16 @@
}, },
"jujutsu-flake": { "jujutsu-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_8", "flake-utils": "flake-utils_9",
"nixpkgs": "nixpkgs_9", "nixpkgs": "nixpkgs_10",
"rust-overlay": "rust-overlay_5" "rust-overlay": "rust-overlay_5"
}, },
"locked": { "locked": {
"lastModified": 1737911819, "lastModified": 1749118509,
"narHash": "sha256-EsxRZIwe1EaacXj3yp1xo2pqHufr/ZLaqOPnsOmEmI0=", "narHash": "sha256-HKqpDREmzpCskJdfUwvUMJwHTx1RHL7/XMJMUDDMVJA=",
"owner": "martinvonz", "owner": "martinvonz",
"repo": "jj", "repo": "jj",
"rev": "00069119d8165c9c9b3b176c00c3171c73c05138", "rev": "0dc9eb5187b79e3722d20f3c5e2c584edb501e1a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -647,6 +705,26 @@
"type": "github" "type": "github"
} }
}, },
"mcphub-flake": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_11"
},
"locked": {
"lastModified": 1746274546,
"narHash": "sha256-NdBF9cU7tyYQZBZ/dpUDami+uF7UDNqdCazyiW3uhIM=",
"owner": "ravitemer",
"repo": "mcphub.nvim",
"rev": "966a95e76d35fb841e0ead972f204677c42a4d3c",
"type": "github"
},
"original": {
"owner": "ravitemer",
"ref": "v5.0.1",
"repo": "mcphub.nvim",
"type": "github"
}
},
"naersk": { "naersk": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
@ -667,14 +745,14 @@
}, },
"naersk_2": { "naersk_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1721727458, "lastModified": 1739824009,
"narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=", "narHash": "sha256-fcNrCMUWVLMG3gKC5M9CBqVOAnJtyRvGPxptQFl5mVg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "naersk", "repo": "naersk",
"rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11", "rev": "e5130d37369bfa600144c2424270c96f0ef0e11d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -685,7 +763,7 @@
}, },
"naersk_3": { "naersk_3": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1671096816, "lastModified": 1671096816,
@ -703,7 +781,7 @@
}, },
"naersk_4": { "naersk_4": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1698420672, "lastModified": 1698420672,
@ -721,7 +799,7 @@
}, },
"naersk_5": { "naersk_5": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_14" "nixpkgs": "nixpkgs_15"
}, },
"locked": { "locked": {
"lastModified": 1650101877, "lastModified": 1650101877,
@ -739,7 +817,7 @@
}, },
"naersk_6": { "naersk_6": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_15" "nixpkgs": "nixpkgs_16"
}, },
"locked": { "locked": {
"lastModified": 1721727458, "lastModified": 1721727458,
@ -758,11 +836,11 @@
"neogit-src": { "neogit-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1728420708, "lastModified": 1741986669,
"narHash": "sha256-8tnWF7gmIzuXN4W/Z3Xy4ID6Y+lMU14UfrZdXYoYSXo=", "narHash": "sha256-4HLSTKNqngiFrRabffthYm3Zyfqr3IJCis9yhsH2Eps=",
"owner": "NeogitOrg", "owner": "NeogitOrg",
"repo": "neogit", "repo": "neogit",
"rev": "a8dd1509a7fc6bf92ca60f21e33393f685ab70aa", "rev": "333968f8222fda475d3e4545a9b15fe9912ca26a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -787,32 +865,10 @@
"type": "github" "type": "github"
} }
}, },
"neovim-flake": {
"inputs": {
"flake-utils": "flake-utils_9",
"nixpkgs": "nixpkgs_10"
},
"locked": {
"dir": "contrib",
"lastModified": 1715862872,
"narHash": "sha256-FCOipXHkAbkuFw9JjEpOIJ8BkyMkjkI0Dp+SzZ4yZlw=",
"owner": "neovim",
"repo": "neovim",
"rev": "27fb62988e922c2739035f477f93cc052a4fee1e",
"type": "github"
},
"original": {
"dir": "contrib",
"owner": "neovim",
"ref": "stable",
"repo": "neovim",
"type": "github"
}
},
"nil-flake": { "nil-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
@ -832,7 +888,7 @@
"nil-flake_2": { "nil-flake_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_10", "flake-utils": "flake-utils_10",
"nixpkgs": "nixpkgs_11", "nixpkgs": "nixpkgs_12",
"rust-overlay": "rust-overlay_6" "rust-overlay": "rust-overlay_6"
}, },
"locked": { "locked": {
@ -867,37 +923,53 @@
}, },
"nixpkgs-darwin": { "nixpkgs-darwin": {
"locked": { "locked": {
"lastModified": 1735564410, "lastModified": 1749596380,
"narHash": "sha256-HB/FA0+1gpSs8+/boEavrGJH+Eq08/R2wWNph1sM1Dg=", "narHash": "sha256-7DEKr2x/jIAKkwHPNNjG6lGUz9nk8SGrbyaeAFMtN34=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1e7a8f391f1a490460760065fa0630b5520f9cf8", "rev": "210a4a2e3d3853be3a6017e68d2897771fdace35",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixpkgs-24.05-darwin", "ref": "nixpkgs-25.05-darwin",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_10": { "nixpkgs_10": {
"locked": { "locked": {
"lastModified": 1715787315, "lastModified": 1747920628,
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=", "narHash": "sha256-IlAuXnIi+ZmyS89tt1YOFDCv7FKs9bNBHd3MXMp8PxE=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5", "rev": "e314d5c6d3b3a0f40ec5bcbc007b0cbe412f48ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_11": { "nixpkgs_11": {
"locked": {
"lastModified": 1745377448,
"narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1690441914, "lastModified": 1690441914,
"narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=", "narHash": "sha256-Ac+kJQ5z9MDAMyzSc0i0zJDx2i3qi9NjlW5Lz285G/I=",
@ -913,23 +985,23 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_12": { "nixpkgs_13": {
"locked": { "locked": {
"lastModified": 1738579205, "lastModified": 1749747690,
"narHash": "sha256-o6BeeanSUALvz8oL2CHOikVjCf7j+HqlA0WGvKOUX3Q=", "narHash": "sha256-FPhMfYq+ngKpZiYaOblqR6S9z9JVpTlW8EaQ98xwkkU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "be5cf18b3d26ba2db938a72ade93ac8a9a7462ff", "rev": "f7d4856c2d1af130193777964535304fdc76e368",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "release-24.11", "ref": "release-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_13": { "nixpkgs_14": {
"locked": { "locked": {
"lastModified": 1689850295, "lastModified": 1689850295,
"narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=",
@ -945,7 +1017,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_14": { "nixpkgs_15": {
"locked": { "locked": {
"lastModified": 1650109093, "lastModified": 1650109093,
"narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=", "narHash": "sha256-tqlnKrAdJktRLXTou9le0oTqrYBAFpGscV5RADdpArU=",
@ -959,20 +1031,6 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_15": {
"locked": {
"lastModified": 1729658218,
"narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_16": { "nixpkgs_16": {
"locked": { "locked": {
"lastModified": 1729658218, "lastModified": 1729658218,
@ -988,6 +1046,20 @@
} }
}, },
"nixpkgs_17": { "nixpkgs_17": {
"locked": {
"lastModified": 1729658218,
"narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_18": {
"locked": { "locked": {
"lastModified": 1682109806, "lastModified": 1682109806,
"narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=", "narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=",
@ -1019,11 +1091,27 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1728538411, "lastModified": 1658285632,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", "narHash": "sha256-zRS5S/hoeDGUbO+L95wXG9vJNwsSYcl93XiD0HQBXLk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", "rev": "5342fc6fb59d0595d26883c3cadff16ce58e44f3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1742738698,
"narHash": "sha256-KCtAXWwQs03JmEhP4ss59QVzT+rHZkhQO85KjNy8Crc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f3a2a0601e9669a6e38af25b46ce6c4563bcb6da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1031,7 +1119,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1726481836, "lastModified": 1726481836,
"narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=", "narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=",
@ -1047,7 +1135,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1708296515, "lastModified": 1708296515,
"narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=", "narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=",
@ -1063,7 +1151,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1678724065, "lastModified": 1678724065,
"narHash": "sha256-MjeRjunqfGTBGU401nxIjs7PC9PZZ1FBCZp/bRB3C2M=", "narHash": "sha256-MjeRjunqfGTBGU401nxIjs7PC9PZZ1FBCZp/bRB3C2M=",
@ -1077,20 +1165,6 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_7": {
"locked": {
"lastModified": 1708151420,
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1708151420, "lastModified": 1708151420,
@ -1107,23 +1181,21 @@
}, },
"nixpkgs_9": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1737557748, "lastModified": 1708151420,
"narHash": "sha256-BaMuhctP1x00+8cBE2cJveJQb70/tWHI50MHj/ZrtOY=", "narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "606996d74f6e2a12635d41c1bf58bfc7ea3bb5ec", "rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixpkgs-unstable", "type": "indirect"
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nurl-flake": { "nurl-flake": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1726505596, "lastModified": 1726505596,
@ -1141,7 +1213,7 @@
}, },
"nurl-flake_2": { "nurl-flake_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_13" "nixpkgs": "nixpkgs_14"
}, },
"locked": { "locked": {
"lastModified": 1701273941, "lastModified": 1701273941,
@ -1165,13 +1237,12 @@
"d2-vim-src": "d2-vim-src_2", "d2-vim-src": "d2-vim-src_2",
"darwin": "darwin_2", "darwin": "darwin_2",
"durnitisp-flake": "durnitisp-flake", "durnitisp-flake": "durnitisp-flake",
"harpoon-src": "harpoon-src",
"heracles-flake": "heracles-flake", "heracles-flake": "heracles-flake",
"jujutsu-flake": "jujutsu-flake", "jujutsu-flake": "jujutsu-flake",
"mcphub-flake": "mcphub-flake",
"neogit-src": "neogit-src_2", "neogit-src": "neogit-src_2",
"neovim-flake": "neovim-flake",
"nil-flake": "nil-flake_2", "nil-flake": "nil-flake_2",
"nixpkgs": "nixpkgs_12", "nixpkgs": "nixpkgs_13",
"nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-darwin": "nixpkgs-darwin",
"nurl-flake": "nurl-flake_2", "nurl-flake": "nurl-flake_2",
"roslyn-lsp": "roslyn-lsp_2", "roslyn-lsp": "roslyn-lsp_2",
@ -1179,7 +1250,6 @@
"rust-overlay-flake": "rust-overlay-flake", "rust-overlay-flake": "rust-overlay-flake",
"sheetsui-flake": "sheetsui-flake", "sheetsui-flake": "sheetsui-flake",
"sile-flake": "sile-flake", "sile-flake": "sile-flake",
"treesitter-context": "treesitter-context_2",
"unstable": "unstable" "unstable": "unstable"
} }
}, },
@ -1311,11 +1381,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1728461096, "lastModified": 1742351546,
"narHash": "sha256-cd0cXB85B3kGpm+iumP9xCnqFErspXL9Z/2X59kQ6c4=", "narHash": "sha256-GPubFcOXyi8TVm1xpltHYPcfGr+iO+if2u/EtzFVnHQ=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "e310b9bd71fa6c6a9fec0a8cf5af43ce798a0ad6", "rev": "b0a7450168c62a46f87d204280e6d9d1c0292671",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1327,7 +1397,7 @@
}, },
"rust-overlay_4": { "rust-overlay_4": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_7", "flake-utils": "flake-utils_8",
"nixpkgs": [ "nixpkgs": [
"heracles-flake", "heracles-flake",
"nixpkgs" "nixpkgs"
@ -1356,11 +1426,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737685583, "lastModified": 1747967795,
"narHash": "sha256-p+NVABRpGi+pT+xxf9HcLcFVxG6L+vEEy+NwzB9T0f8=", "narHash": "sha256-76s4jDRbQzxRO+5y8ilMp5V30qVgY9R6n8U7aOap8ig=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "eb64cbcc8eee0fa87ebded92805280d2ec97415a", "rev": "f1d5bfa8c692cacd798a3e1fb93d54c1b9ac701a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1419,20 +1489,19 @@
"inputs": { "inputs": {
"flake-utils": "flake-utils_13", "flake-utils": "flake-utils_13",
"naersk": "naersk_6", "naersk": "naersk_6",
"nixpkgs": "nixpkgs_16", "nixpkgs": "nixpkgs_17",
"rust-overlay": "rust-overlay_7" "rust-overlay": "rust-overlay_7"
}, },
"locked": { "locked": {
"lastModified": 1738116794, "lastModified": 1739926992,
"narHash": "sha256-TXTZx/cpk0Jv15t2QdXRliEME9B6bVyrA0SyHYBPKl8=", "narHash": "sha256-fUkGEWA0OuV95vo+5GeqamQEnK+OnYZzTZhaLNU9kTE=",
"owner": "zaphar", "owner": "zaphar",
"repo": "sheetsui", "repo": "sheetsui",
"rev": "0a6807493c3e8fd9f4261135f0226d801a472d53", "rev": "b5e0362a4e1b8d632b96ddc77ed99d9c8fd31feb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "zaphar", "owner": "zaphar",
"ref": "main",
"repo": "sheetsui", "repo": "sheetsui",
"type": "github" "type": "github"
} }
@ -1443,7 +1512,7 @@
"flake-utils": "flake-utils_14", "flake-utils": "flake-utils_14",
"gitignore": "gitignore", "gitignore": "gitignore",
"libtexpdf-src": "libtexpdf-src", "libtexpdf-src": "libtexpdf-src",
"nixpkgs": "nixpkgs_17" "nixpkgs": "nixpkgs_18"
}, },
"locked": { "locked": {
"lastModified": 1694595810, "lastModified": 1694595810,
@ -1642,11 +1711,11 @@
"tree-sitter-cli-src": { "tree-sitter-cli-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1728916102, "lastModified": 1742574818,
"narHash": "sha256-Aslud0Di5u3gaVHguEZPGkYwDJQPj6BACjo7+2wwfhE=", "narHash": "sha256-aV9tifiYFMAa2u+MkfJpm4TYUfmzajfsVc5jhs2ENzU=",
"owner": "tree-sitter", "owner": "tree-sitter",
"repo": "tree-sitter", "repo": "tree-sitter",
"rev": "fb23de926134188e2711bba2f7b589e3f25c14fd", "rev": "e3db212b0b12a189010979b4c129a792009e8361",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1672,30 +1741,13 @@
"type": "github" "type": "github"
} }
}, },
"treesitter-context_2": {
"flake": false,
"locked": {
"lastModified": 1693236978,
"narHash": "sha256-B6BXeFEWxTFf46JrlatsxEQcC6+/hPIDBb5cIcJpLZg=",
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
"type": "github"
},
"original": {
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
"type": "github"
}
},
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1728279793, "lastModified": 1751349533,
"narHash": "sha256-W3D5YpNrUVTFPVU4jiEiboaaUDShaiH5fRl9aJLqUnU=", "narHash": "sha256-5XRh0mB06/7WYDLu9ZXsx1GhyvvNVZDtPyg34sUCLJs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f85a2d005e83542784a755ca8da112f4f65c4aa4", "rev": "bdfd0f2afcf764e531d0960c821ab070a6174b15",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1703,23 +1755,6 @@
"type": "indirect" "type": "indirect"
} }
}, },
"victoria-logs-src": {
"flake": false,
"locked": {
"lastModified": 1728382879,
"narHash": "sha256-iaV4bjwjLqQcB//xIH16lRFry9ncxej+DLesb3pbm/4=",
"owner": "VictoriaMetrics",
"repo": "VictoriaMetrics",
"rev": "6878982c93e34a2bf6ab026b3809073b284b6afc",
"type": "github"
},
"original": {
"owner": "VictoriaMetrics",
"ref": "v0.34.0-victorialogs",
"repo": "VictoriaMetrics",
"type": "github"
}
},
"zig-src": { "zig-src": {
"flake": false, "flake": false,
"locked": { "locked": {

View File

@ -1,19 +1,19 @@
{ {
inputs = { inputs = {
# Default to sane nixpkgs versions # Default to sane nixpkgs versions
nixpkgs.url = "github:nixos/nixpkgs/release-24.11"; nixpkgs.url = "github:nixos/nixpkgs/release-25.05";
unstable.url = "nixpkgs"; unstable.url = "nixpkgs";
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin"; nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin";
#lean4-flake = { #lean4-flake = {
# url = "github:leanprover/lean4/v4.4.0"; # url = "github:leanprover/lean4/v4.4.0";
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
#}; #};
darwin = { darwin = {
url = "github:lnl7/nix-darwin"; url = "github:lnl7/nix-darwin/nix-darwin-25.05";
# ensure that darwinSystem uses our nixpkgs version # ensure that darwinSystem uses our nixpkgs version
inputs.nixpkgs.follows = "nixpkgs-darwin"; inputs.nixpkgs.follows = "nixpkgs-darwin";
}; };
sheetsui-flake.url = "github:zaphar/sheetsui/main"; sheetsui-flake.url = "github:zaphar/sheetsui";
sile-flake.url = "github:sile-typesetter/sile"; sile-flake.url = "github:sile-typesetter/sile";
durnitisp-flake.url = "github:zaphar/durnitisp"; durnitisp-flake.url = "github:zaphar/durnitisp";
runwhen-flake.url = "github:zaphar/runwhen"; runwhen-flake.url = "github:zaphar/runwhen";
@ -31,20 +31,16 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
neovim-flake = { #neovim-flake = {
url = "github:neovim/neovim/stable?dir=contrib"; # url = "github:neovim/neovim/stable?dir=contrib";
# NOTE(jeremy): Currently this needs a newer nixpkgs version # # NOTE(jeremy): Currently this needs a newer nixpkgs version
#inputs.nixpkgs.follows = "nixpkgs"; # #inputs.nixpkgs.follows = "nixpkgs";
}; #};
jujutsu-flake.url = "github:martinvonz/jj"; jujutsu-flake.url = "github:martinvonz/jj";
custom-flakes = { custom-flakes = {
url = "github:zaphar/nix-flakes"; url = "github:zaphar/nix-flakes";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
harpoon-src = {
url = "github:ThePrimeagen/harpoon/harpoon2";
flake = false;
};
neogit-src = { neogit-src = {
url = "github:NeogitOrg/neogit"; url = "github:NeogitOrg/neogit";
flake = false; flake = false;
@ -53,16 +49,12 @@
url = "github:terrastruct/d2-vim"; url = "github:terrastruct/d2-vim";
flake = false; flake = false;
}; };
# We need to pin to this version of treesitter because it breaks after this revision
treesitter-context = {
url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23";
flake = false;
};
roslyn-lsp = { roslyn-lsp = {
url = "github:zaphar/roslyn.nvim/main"; url = "github:zaphar/roslyn.nvim/main";
flake = false; flake = false;
}; };
heracles-flake.url = "github:zaphar/Heracles"; heracles-flake.url = "github:zaphar/Heracles";
mcphub-flake.url = "github:ravitemer/mcphub.nvim/v5.0.1";
}; };
outputs = { outputs = {
@ -75,39 +67,30 @@
agenix-flake, agenix-flake,
nil-flake, nil-flake,
nurl-flake, nurl-flake,
harpoon-src,
custom-flakes, custom-flakes,
unstable, unstable,
heracles-flake, heracles-flake,
neovim-flake,
clio-flake, clio-flake,
sheetsui-flake, sheetsui-flake,
mcphub-flake,
... # We don't use the self or nixpkgs args here so we just glob it. ... # We don't use the self or nixpkgs args here so we just glob it.
}: }:
rec { rec {
vimModule = system: let vimModule = system: let
nil-pkg = nil-flake.packages."${system}".default; nil-pkg = nil-flake.packages."${system}".default;
mcp-hub-binary = custom-flakes.packages."${system}".mcp-hub;
claude-code-binary = custom-flakes.packages."${system}".claude-code;
in in
{ config, pkgs, ...}: let { config, pkgs, ...}: let
unstablePkgs = import unstable { inherit system; }; unstablePkgs = import unstable { inherit system; };
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
inherit (pkgs.vimUtils) buildVimPlugin;
inherit (pkgs) fetchFromGitHub;
};
harpoon-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "harpoon";
version = "2024-01-28";
src = harpoon-src;
};
neogit-nvim = custom-flakes.packages."${system}".neogit-nvim; neogit-nvim = custom-flakes.packages."${system}".neogit-nvim;
d2-vim = custom-flakes.packages."${system}".d2-vim; d2-vim = custom-flakes.packages."${system}".d2-vim;
hunk-nvim = custom-flakes.packages."${system}".hunk-nvim; hunk-nvim = custom-flakes.packages."${system}".hunk-nvim;
# TODO(zaphar): Apparently this is a remote plugin so it needs some additional love. # TODO(zaphar): Apparently this is a remote plugin so it needs some additional love.
#nvim-bnf = custom-flakes.packages."${system}".nvim-bnf; #nvim-bnf = custom-flakes.packages."${system}".nvim-bnf;
nvim-treesitter-context = custom-flakes.packages."${system}".nvim-treesitter-context;
roslyn-nvim = custom-flakes.packages."${system}".roslyn-nvim; roslyn-nvim = custom-flakes.packages."${system}".roslyn-nvim;
ionide-nvim = custom-flakes.packages."${system}".ionide-nvim; ionide-nvim = custom-flakes.packages."${system}".ionide-nvim;
nvim = neovim-flake.packages."${system}".neovim; claude-code-nvim = custom-flakes.packages."${system}".claude-code-nvim;
# TODO(zaphar): Until nixpkgs update to a newer version of tree-sitter the queries will be wrong # TODO(zaphar): Until nixpkgs update to a newer version of tree-sitter the queries will be wrong
# for csharp # for csharp
#tree-sitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix { #tree-sitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix {
@ -120,6 +103,7 @@
# inherit (pkgs.tree-sitter) buildGrammar; # inherit (pkgs.tree-sitter) buildGrammar;
# inherit (pkgs) fetchFromGitHub; # inherit (pkgs) fetchFromGitHub;
#}; #};
mcphub-nvim = mcphub-flake.packages."${system}".default;
in { in {
imports = [ imports = [
./program-neovim.nix ./program-neovim.nix
@ -133,21 +117,22 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
custom-neovim = nvim;
lorri = unstablePkgs.lorri; lorri = unstablePkgs.lorri;
}) })
]; ];
programs = with pkgs; { programs = with unstablePkgs; {
neovim.enable = true; neovim.enable = true;
neovim.vimAlias = true; neovim.vimAlias = true;
neovim.viAlias = true; neovim.viAlias = true;
neovim.package = pkgs.custom-neovim; neovim.package = unstablePkgs.neovim-unwrapped;
neovim.configure = { neovim.configure = {
customRC = "lua << EOF customRC = "lua << EOF
${builtins.readFile ./init.lua} ${builtins.readFile ./init.lua}
EOF"; EOF";
packages.myVimPackage = { packages.myVimPackage = {
start = (with pkgs.vimPlugins; [ start = (with pkgs.vimPlugins; [
copilot-lua
avante-nvim
vim-sile vim-sile
nvim-tree-lua nvim-tree-lua
nvim-lspconfig nvim-lspconfig
@ -215,9 +200,9 @@ EOF";
vim-dadbod-completion vim-dadbod-completion
vim-dasht vim-dasht
direnv-vim direnv-vim
mcphub-nvim
claude-code-nvim
]) ++ [ ]) ++ [
possession-nvim
harpoon-nvim
d2-vim d2-vim
hunk-nvim hunk-nvim
neogit-nvim neogit-nvim
@ -228,6 +213,7 @@ EOF";
}; };
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [
terraform-ls terraform-ls
tinymist
nodePackages.typescript-language-server nodePackages.typescript-language-server
nodePackages.jsdoc nodePackages.jsdoc
# TODO find a version of the julia package that will install # TODO find a version of the julia package that will install
@ -239,6 +225,9 @@ EOF";
direnv direnv
lorri lorri
devenv devenv
unstablePkgs.fq
mcp-hub-binary
claude-code-binary
]); ]);
}; };
}; };
@ -277,8 +266,10 @@ EOF";
gnumeric = prev.gnumeric.overrideAttrs(oldAttrs: { gnumeric = prev.gnumeric.overrideAttrs(oldAttrs: {
meta.broken = false; meta.broken = false;
}); });
uv = unstablePkgs.uv;
quint = (pkgs.callPackage ../packages/quint/default.nix {})."@informalsystems/quint"; quint = (pkgs.callPackage ../packages/quint/default.nix {})."@informalsystems/quint";
quint-lsp = (pkgs.callPackage ../packages/quint/default.nix {})."@informalsystems/quint-language-server"; quint-lsp = (pkgs.callPackage ../packages/quint/default.nix {})."@informalsystems/quint-language-server";
ollama = unstablePkgs.ollama;
}) })
rust-overlay rust-overlay
]; ];
@ -305,21 +296,17 @@ EOF";
}; };
}; };
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [
isabelle
sheetsui sheetsui
lean4 lean4
quint quint
quint-lsp quint-lsp
terraform # TODO(jeremy): Replace with opentofu when that is an option. terraform # TODO(jeremy): Replace with opentofu when that is an option.
nomad
oha oha
nodejs nodejs
gnumake gnumake
# TODO(zaphar): find a version of the julia package that will install # TODO(zaphar): find a version of the julia package that will install
# on darwin and add it as an overlay # on darwin and add it as an overlay
python310 uv
python310Packages.pip
python310Packages.virtualenv
emacs emacs
git git
mercurial mercurial
@ -366,6 +353,8 @@ EOF";
victoriametrics victoriametrics
# TODO add sonic-pi here if it supports the arch # TODO add sonic-pi here if it supports the arch
unstablePkgs.dbeaver-bin unstablePkgs.dbeaver-bin
postgresql
unstablePkgs.ollama
]) ])
#++ (with pkgs.ocamlPackages; [ #++ (with pkgs.ocamlPackages; [
# dune_3 # dune_3
@ -394,6 +383,7 @@ EOF";
./modules/victoria-logs.nix ./modules/victoria-logs.nix
./modules/vector.nix ./modules/vector.nix
./modules/lorri.nix ./modules/lorri.nix
./modules/ollama.nix
./darwin-configuration.nix ./darwin-configuration.nix
]; ];
}; };

View File

@ -17,6 +17,13 @@ vim.opt.tabstop = 4
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
--vim.opt.smarttab = false --vim.opt.smarttab = false
vim.opt.fileformats = "unix,dos" vim.opt.fileformats = "unix,dos"
-- Recommended by Avante docs
-- views can only be fully collapsed with the global statusline
vim.opt.laststatus = 3
-- formatexpr defaulted to the lsp provider by default recently
-- which breaks `gq` and company paragraph formatting in non lsp
-- contexts.
vim.opt.formatexpr = ""
vim.g.BASH_AuthorName = 'Jeremy Wall' vim.g.BASH_AuthorName = 'Jeremy Wall'
vim.g.BASH_AuthorRef = 'jw' vim.g.BASH_AuthorRef = 'jw'
@ -29,17 +36,34 @@ vim.cmd("noswapfile")
vim.cmd("syntax on") vim.cmd("syntax on")
vim.cmd("filetype plugin on") vim.cmd("filetype plugin on")
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = {"*.qnt"}, pattern = { "*.qnt" },
callback = function(args) callback = function(args)
vim.lsp.start({ vim.lsp.start({
name = 'quint', name = 'quint',
cmd = {'quint-language-server', '--stdio'}, cmd = { 'quint-language-server', '--stdio' },
root_dir = vim.fs.dirname(vim.uri_from_bufnr(args.buf)) root_dir = vim.fs.dirname(vim.uri_from_bufnr(args.buf))
}) })
end, end,
}) })
vim.api.nvim_create_autocmd({ "BufNewfile", "BufRead" }, {
callback = function(args)
-- If treesitter supports this filetype then use the treesitter fold expression
local ft = vim.bo.filetype
if ft and ft ~= "" then
-- Safely check if a parser exists for this filetype
local has_parser = pcall(function() return vim.treesitter.language.inspect(ft) end)
if has_parser then
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.wo.foldmethod = 'expr'
vim.wo.foldlevel = 10
end
end
end,
})
vim.cmd([[ vim.cmd([[
au BufNewFile,BufRead *Makefile,*.mk set noexpandtab au BufNewFile,BufRead *Makefile,*.mk set noexpandtab
]]) ]])
@ -144,25 +168,30 @@ local caps = vim.tbl_deep_extend(
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local configure_lsp = function(name, config)
vim.lsp.enable(name)
vim.lsp.config(name, config)
end
-- Typst -- Typst
lspconfig.tinymist.setup{ configure_lsp('tinymist', {
capabilities = caps, capabilities = caps,
settings = { settings = {
exportPdf = "onSave", exportPdf = "onSave",
}, },
} })
-- Terraform lsp setup -- Terraform lsp setup
lspconfig.terraformls.setup {} configure_lsp('terraformls', {})
-- Nix language server support -- Nix language server support
lspconfig.nil_ls.setup { configure_lsp('nil_ls', {
capabilities = caps, capabilities = caps,
} })
require('roslyn').setup({ require('roslyn').setup({
-- client, bufnr -- client, bufnr
on_attach = function (_, _) on_attach = function(_, _)
--vim.notify(vim.inspect(client)) --vim.notify(vim.inspect(client))
end, end,
sdk_framework = "net8.0", sdk_framework = "net8.0",
@ -170,23 +199,14 @@ require('roslyn').setup({
log_level = "Trace", log_level = "Trace",
}); });
--ocaml
lspconfig.ocamllsp.setup {
capabilities = caps
}
-- Java language server support
lspconfig.java_language_server.setup {
capabilities = caps
}
-- Typescript language server support -- Typescript language server support
lspconfig.tsserver.setup { configure_lsp('tsserver', {
cmd = { 'typescript-language-server', '--stdio' },
capabilities = caps capabilities = caps
} })
-- Rust language server support -- Rust language server support
lspconfig.rust_analyzer.setup { configure_lsp('rust_analyzer', {
settings = { settings = {
-- https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc -- https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc
['rust-analyzer'] = { ['rust-analyzer'] = {
@ -194,10 +214,11 @@ lspconfig.rust_analyzer.setup {
} }
}, },
capabilities = caps capabilities = caps
} })
-- lua language server setup. -- lua language server setup.
lspconfig.lua_ls.setup { configure_lsp('lua_ls', {
cmd = { 'lua-language-server' },
settings = { settings = {
Lua = { Lua = {
runtime = { version = 'LuaJIT', }, runtime = { version = 'LuaJIT', },
@ -217,7 +238,13 @@ lspconfig.lua_ls.setup {
}, },
}, },
capabilities = caps capabilities = caps
} })
configure_lsp('ty', {
cmd = { 'ty', 'server' },
filetypes = { 'python' },
root_markers = { 'ty.toml', 'pyproject.toml', '.git' },
})
-- lsp configuration -- lsp configuration
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
@ -229,18 +256,22 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set({ "n", "v" }, "<Leader>a", vim.lsp.buf.code_action, opts) vim.keymap.set({ "n", "v" }, "<Leader>a", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, opts) vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, opts)
local client = vim.lsp.get_client_by_id(args.data.client_id) local client = vim.lsp.get_client_by_id(args.data.client_id)
---@diagnostic disable-next-line: undefined-field ---@diagnostic disable-next-line: undefined-field
if client and client.server_capabilities.codelens then if client and client.server_capabilities.codelens then
vim.lsp.codelens.refresh() vim.lsp.codelens.refresh()
end end
-- formatexpr defaulted to the lsp provider by default recently
-- which breaks `gq` and company paragraph formatting in non lsp
-- contexts.
vim.bo[args.buf].formatexpr = ""
end, end,
}) })
vim.api.nvim_create_autocmd({ 'BufEnter', 'InsertLeave', 'CursorHold' }, { vim.api.nvim_create_autocmd({ 'BufEnter', 'InsertLeave', 'CursorHold' }, {
callback = function(args) callback = function(args)
local clients = vim.lsp.get_clients({bufnr=args.buf}) local clients = vim.lsp.get_clients({ bufnr = args.buf })
for cid = 1, #clients do for cid = 1, #clients do
---@diagnostic disable-next-line: undefined-field ---@diagnostic disable-next-line: undefined-field
if clients[cid].server_capabilities.codelens then if clients[cid].server_capabilities.codelens then
vim.lsp.codelens.refresh() vim.lsp.codelens.refresh()
break break
@ -250,22 +281,8 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'InsertLeave', 'CursorHold' }, {
}) })
-- LSP Diagnostics Options Setup -- LSP Diagnostics Options Setup
local sign = function(opts)
vim.fn.sign_define(opts.name, {
texthl = opts.name,
text = opts.text,
numhl = ''
})
end
sign({ name = 'DiagnosticSignError', text = '🔥' })
sign({ name = 'DiagnosticSignWarn', text = '⚠️' })
sign({ name = 'DiagnosticSignHint', text = '➡️' })
sign({ name = 'DiagnosticSignInfo', text = '🗒️' })
vim.diagnostic.config({ vim.diagnostic.config({
virtual_text = false, virtual_text = false,
signs = true,
update_in_insert = true, update_in_insert = true,
underline = true, underline = true,
severity_sort = false, severity_sort = false,
@ -275,6 +292,14 @@ vim.diagnostic.config({
header = '', header = '',
prefix = '', prefix = '',
}, },
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '🔥',
[vim.diagnostic.severity.WARN] = '⚠️',
[vim.diagnostic.severity.HINT] = '➡️',
[vim.diagnostic.severity.INFO] = '🗒️',
},
}
}) })
vim.cmd([[ vim.cmd([[
@ -315,31 +340,55 @@ require('nvim-treesitter.configs').setup {
extended_mode = true, extended_mode = true,
max_file_lines = nil, max_file_lines = nil,
}, },
--textobjects = { textobjects = {
-- enable = true, move = {
-- select = { enable = true,
-- enable = true, set_jumps = true, -- whether to set jumps in the jumplist
-- lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim goto_next_start = {
-- keymaps = { ["]m"] = "@function.outer",
-- -- You can use the capture groups defined in textobjects.scm ["]]"] = { query = "@class.outer", desc = "Next class start" },
-- ['aa'] = '@parameter.outer', --
-- ['ia'] = '@parameter.inner', -- You can use regex matching (i.e. lua pattern) and/or pass a list in a "query" key to group multiple queries.
-- ['af'] = '@function.outer', ["]o"] = "@loop.*",
-- ['if'] = '@function.inner', -- ["]o"] = { query = { "@loop.inner", "@loop.outer" } }
-- ['ac'] = '@class.outer', --
-- ['ic'] = '@class.inner', -- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path.
-- }, -- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm.
-- }, ["]s"] = { query = "@local.scope", query_group = "locals", desc = "Next scope" },
--}, ["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
--incremental_selection = { },
-- enable = true, goto_next_end = {
-- keymaps = { ["]M"] = "@function.outer",
-- init_selection = '<Leader>c', ["]["] = "@class.outer",
-- node_incremental = '<Leader>c', },
-- scope_incremental = '<Leader>ci', goto_previous_start = {
-- node_decremental = '<Leader>cx', ["[m"] = "@function.outer",
-- }, ["[["] = "@class.outer",
--}, },
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
-- Below will go to either the start or the end, whichever is closer.
-- Use if you want more granular movements
-- Make it even more gradual by adding multiple queries and regex.
goto_next = {
["]d"] = "@conditional.outer",
},
goto_previous = {
["[d"] = "@conditional.outer",
}
},
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<Leader>c',
node_incremental = '<Leader>c',
scope_incremental = '<Leader>ci',
node_decremental = '<Leader>cx',
},
},
} }
require 'treesitter-context'.setup { require 'treesitter-context'.setup {
@ -462,33 +511,6 @@ vim.keymap.set("n", "<Leader>ga", function()
vim.cmd("!git add %") vim.cmd("!git add %")
end) end)
require('possession').setup {
commands = {
save = 'SSave',
load = 'SLoad',
delete = 'SDelete',
list = 'SList',
},
autosave = {
current = true,
on_load = true,
on_quit = true,
},
telescope = {
list = {
default_action = 'load',
mappings = {
save = { n = '<c-x>', i = '<c-x>' },
load = { n = '<c-v>', i = '<c-v>' },
delete = { n = '<c-t>', i = '<c-t>' },
rename = { n = '<c-r>', i = '<c-r>' },
},
},
},
}
telescope.load_extension('possession')
-- https://github.com/nvim-telescope/telescope.nvim -- https://github.com/nvim-telescope/telescope.nvim
telescope.setup({ telescope.setup({
defaults = { defaults = {
@ -510,9 +532,6 @@ telescope.setup({
}, },
}) })
local harpoon = require('harpoon')
harpoon:setup()
local lean = require 'lean' local lean = require 'lean'
@ -524,14 +543,13 @@ lean.setup {
vim.keymap.set({ "n", "v" }, "<Leader>ti", function() vim.cmd("LeanInfoviewToggle") end, opts) vim.keymap.set({ "n", "v" }, "<Leader>ti", function() vim.cmd("LeanInfoviewToggle") end, opts)
vim.keymap.set({ "n", "v" }, "<Leader>sg", function() vim.cmd("LeanGoal") end, opts) vim.keymap.set({ "n", "v" }, "<Leader>sg", function() vim.cmd("LeanGoal") end, opts)
vim.keymap.set({ "n", "v" }, "<Leader>stg", function() vim.cmd("LeanTermGoal") end, opts) vim.keymap.set({ "n", "v" }, "<Leader>stg", function() vim.cmd("LeanTermGoal") end, opts)
vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', {scope = "local", buf=bufnr}) vim.api.nvim_set_option_value('omnifunc', 'v:lua.vim.lsp.omnifunc', { scope = "local", buf = bufnr })
end end
}, },
mappings = true, mappings = true,
} }
-- telescope keymaps -- telescope keymaps
vim.keymap.set("n", "<Leader>pl", telescope.extensions.possession.list)
-- TODO(zaphar): Remove this once my muscle memory has set in. -- TODO(zaphar): Remove this once my muscle memory has set in.
vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd) vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd)
vim.keymap.set("n", "<Leader>ff", telescope_builtins.fd) vim.keymap.set("n", "<Leader>ff", telescope_builtins.fd)
@ -540,16 +558,13 @@ vim.keymap.set("n", "<Leader>rn", vim.lsp.buf.rename)
vim.keymap.set("n", "<Leader>sl", telescope_builtins.lsp_workspace_symbols) vim.keymap.set("n", "<Leader>sl", telescope_builtins.lsp_workspace_symbols)
vim.keymap.set("n", "<Leader>dl", telescope_builtins.diagnostics) vim.keymap.set("n", "<Leader>dl", telescope_builtins.diagnostics)
vim.keymap.set("n", "<Leader>rg", telescope_builtins.live_grep) vim.keymap.set("n", "<Leader>rg", telescope_builtins.live_grep)
vim.keymap.set("n", "<Leader>bl", function() telescope_builtins.buffers({ vim.keymap.set("n", "<Leader>bl", function()
}) end) telescope_builtins.buffers({
})
end)
vim.keymap.set("n", "<leader>lds", telescope_builtins.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" }) vim.keymap.set("n", "<leader>lds", telescope_builtins.lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
vim.keymap.set("n", "<leader>lws", telescope_builtins.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" }) vim.keymap.set("n", "<leader>lws", telescope_builtins.lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" })
-- harpoon keymaps
vim.keymap.set("n", "<Leader>ha", function() harpoon:list():append() end)
vim.keymap.set("n", "<Leader>he", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<Leader>hj", function() harpoon:list():prev() end)
vim.keymap.set("n", "<Leader>hk", function() harpoon:list():next() end)
-- codelens keymaps -- codelens keymaps
vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run) vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run)
@ -567,13 +582,13 @@ require('lualine').setup {
}, },
sections = { sections = {
-- left side -- left side
lualine_a = {'mode'}, lualine_a = { 'mode' },
lualine_b = {'filename'}, lualine_b = { 'filename' },
lualine_c = {'encoding', 'fileformat', 'filetype'}, lualine_c = { 'encoding', 'fileformat', 'filetype' },
-- right side -- right side
lualine_x = {'diagnostics'}, lualine_x = { 'diagnostics' },
lualine_y = {'progress', 'lsp_progress'}, lualine_y = { 'progress', 'lsp_progress' },
lualine_z = {'location'} lualine_z = { 'location' }
} }
} }
@ -667,3 +682,128 @@ dap.configurations.cs = {
end, end,
}, },
} }
local mcphub = require("mcphub")
mcphub.setup({
-- This sets vim.g.mcphub_auto_approve to false by default (can also be toggled from the HUB UI with `ga`)
config = vim.fn.expand("~/.config/mcphub/servers.json"),
auto_approve = true,
auto_toggle_mcp_servers = true, -- Let LLMs start and stop MCP servers automatically
extensions = {
avante = {
make_slash_commands = true, -- make /slash commands from MCP server prompts
},
},
cmd = "mcp-hub",
})
function get_server_list_prompt(hub_instance)
-- returns a list of mcp-servers with a `name` and a list of tools with `name`
local mcp_tool_prompt = "# MCP SERVERS\n\nThe Model Context Protocol (MCP) enables communication between the system and locally running MCP servers that provide additional tools and resources to extend your capabilities.\n\n# Connected MCP Servers\n\nWhen a server is connected, you can use the server's tools via the `use_mcp_tool` tool, and access the server's resources via the `access_mcp_resource` tool.\nNote: Server names are case sensitive and you should always use the exact full name like `Firecrawl MCP` or `src/user/main/time-mcp` etc\n\n"
if not hub_instance then
return ""
end
local servers = hub_instance:get_servers()
if not servers or #servers == 0 then
return ""
end
for _, server in ipairs(servers) do
mcp_tool_prompt = mcp_tool_prompt .. "## server name: `" .. server.name .. "`\n\n"
if server.capabilities and server.capabilities.tools and #server.capabilities.tools > 0 then
mcp_tool_prompt = mcp_tool_prompt .. "Available tools:\n\n"
for _, tool in ipairs(server.capabilities.tools) do
mcp_tool_prompt = mcp_tool_prompt .. "- tool name: `" .. tool.name .. "`\n"
if tool.description then
mcp_tool_prompt = mcp_tool_prompt .. " - Description: " .. tool.description .. "\n"
end
end
mcp_tool_prompt = mcp_tool_prompt .. "\n"
end
end
return mcp_tool_prompt
end
function make_avante_system_prompt(hub_instance)
return hub_instance and get_server_list_prompt(hub_instance) or ""
end
function update_avante_system_prompt()
local hub_instance = mcphub.get_hub_instance();
local system_prompt = make_avante_system_prompt(hub_instance)
if system_prompt then
require("avante.config").override({system_prompt = system_prompt})
end
end
vim.keymap.set("n", "<Leader>ab", function() require('avante').get().file_selector:add_buffer_files() end)
vim.keymap.set("n", "<Leader>af", function() require('avante').get().file_selector:add_current_buffer() end)
get_root_dir = function()
-- First try to get the root path from LSP
local bufnr = vim.api.nvim_get_current_buf()
local clients = vim.lsp.get_clients({ bufnr = bufnr })
-- Check if we have an active LSP client with a root_dir
for _, client in ipairs(clients) do
if client.config and client.config.root_dir then
return client.config.root_dir
end
end
-- Fall back to file-based detection
local root_file = vim.fs.find(function(name, path)
return name:match('(pyproject.toml|.sln|Cargo.toml|.git)$')
end, { upward = true })[1]
return root_file and vim.fs.dirname(root_file) or vim.fn.getcwd()
end
require('copilot').setup({
root_dir = get_root_dir,
})
require('avante').setup({
provider = "claude",
mode = "planning",
cursor_applying_provider = nil, -- default to whatever provider is configured
claude = {
endpoint = "https://api.anthropic.com",
model = "claude-3-7-sonnet-20250219",
timeout = 30000, -- Timeout in milliseconds
temperature = 0,
max_tokens = 20480,
},
copilot = {
model = "claude-3.7-sonnet",
},
behavior = {
enable_cursor_planning_mode = true,
},
windows = {
ask = {
start_insert=false,
focus_on_apply="theirs",
},
},
system_prompt = make_avante_system_prompt(mcphub.get_hub_instance()),
custom_tools = { require("mcphub.extensions.avante").mcp_tool() },
-- Disable these because we'll use the mcphub versions instead
--disabled_tools = {
-- "list_files", -- Built-in file operations
-- "search_files",
-- "read_file",
-- "create_file",
-- "rename_file",
-- "delete_file",
-- "create_dir",
-- "rename_dir",
-- "delete_dir",
-- "bash", -- Built-in terminal access
--},
})

View File

@ -0,0 +1,56 @@
{pkgs, lib, config, ...}:
with lib;
let
mkLauncher = import ../../packages/darwin-launcher.nix { inherit pkgs; };
ollamaLauncher = mkLauncher ''
exec ${pkgs.clio}/bin/clio \
--out-path=${config.services.ollama.stdoutPath} \
--err-path=${config.services.ollama.stdoutPath} \
--pid-file=${config.services.ollama.pidPath} \
--paranoid \
-- \
${pkgs.ollama}/bin/ollama \
serve
'';
in
{
options.services.ollama = {
enable = mkEnableOption "Enable the ollama agent";
stdoutPath = mkOption {
default = "/Users/${config.services.ollama.user}/config/ollama/out.log";
};
stderrPath = mkOption {
default = "/Users/${config.services.ollama.user}/config/ollama/err.log";
};
pidPath = mkOption {
default = "/Users/${config.services.ollama.user}/config/ollama/ollama.pid";
};
user = mkOption {
default="zaphar";
};
};
config = {
launchd.user.agents.ollama = mkIf config.services.ollama.enable {
serviceConfig = {
ProgramArguments = [
"${ollamaLauncher}"
];
EnvironmentVariables = {
"OLLAMA_HOST" = "127.0.0.1:11434";
"OLLAMA_MODELS" = "/Users/${config.services.ollama.user}/config/ollama/";
};
RunAtLoad = true;
};
};
environment.etc."newsyslog.d/org.nixos.ollama.conf" = mkIf config.services.ollama.enable {
text = ''
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
${config.services.ollama.stdoutPath} zaphar:staff 644 10 1000 * BJ ${config.services.ollama.pidPath} 1
${config.services.ollama.stderrPath} zaphar:staff 644 10 1000 * BJ ${config.services.ollama.pidPath} 1
'';
};
};
}

View File

@ -42,4 +42,13 @@ function disk_usage() {
/run/current-system/sw/bin/du --max-depth=1 -h "${path}" 2>/dev/null /run/current-system/sw/bin/du --max-depth=1 -h "${path}" 2>/dev/null
} }
# TODO(zaphar): Figure out why this thing doesn't come up or dies
function restart_durnitisp() {
sudo launchctl bootout system/org.nixos.durnitisp
sudo launchctl bootstrap system /Library/LaunchDaemons/org.nixos.durnitisp.plist org.nixos.durnitisp
}
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
export ANTHROPIC_API_KEY="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"
export OPENAI_API_KEY="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"