Kieran's opinionated (and probably slightly dumb) nix config

feat: add crush module

dunkirk.sh 4aa69149 9257e7eb

verified
Changed files
+39 -5
home-manager
app
+22
flake.lock
···
"type": "github"
}
},
+
"crush": {
+
"inputs": {
+
"nixpkgs": [
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1752804151,
+
"narHash": "sha256-7Eg0DftN7pSf8vWOZjqN66rCKHH7T+VDcY/k5TNTrDs=",
+
"ref": "taciturnaxoltol/flake",
+
"rev": "d15583ac01e0a2f5f9a10a889f76b70eb5de3669",
+
"revCount": 812,
+
"type": "git",
+
"url": "ssh://git@github.com/charmbracelet/crush"
+
},
+
"original": {
+
"ref": "taciturnaxoltol/flake",
+
"type": "git",
+
"url": "ssh://git@github.com/charmbracelet/crush"
+
}
+
},
"ctfd-alerts": {
"inputs": {
"nixpkgs": [
···
"catppuccin": "catppuccin",
"catppuccin-vsc": "catppuccin-vsc",
"claude-desktop": "claude-desktop",
+
"crush": "crush",
"ctfd-alerts": "ctfd-alerts",
"disko": "disko",
"frc-nix": "frc-nix",
+5
flake.nix
···
url = "github:taciturnaxolotl/ctfd-alerts";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+
crush = {
+
url = "git+ssh://git@github.com/charmbracelet/crush?ref=taciturnaxoltol/flake";
+
inputs.nixpkgs.follows = "nixpkgs";
+
};
};
outputs =
+12 -5
home-manager/app/crush.nix
···
{
-
lib,
+
inputs,
...
}:
{
-
home.file.".config/crush/crush.json" = {
-
text = lib.strings.toJSON {
+
imports = [
+
inputs.crush.homeManagerModules.default
+
];
+
+
programs.crush = {
+
enable = true;
+
settings = {
lsp = {
go = {
command = "gopls";
···
};
claude-pro = {
name = "Claude Pro";
-
provider_type = "anthropic";
+
provider_type = "openai";
base_url = "https://api.anthropic.com";
-
api_key = "$(bash ~/.config/crush/opencode.sh)";
+
api_key = "$(bash ~/.config/crush/anthropic.sh)";
extra_headers = {
+
"anthropic-version" = "2023-06-01";
+
"anthropic-beta" = "oauth-2025-04-20";
"User-Agent" = "CRUSH/1.0";
};
models = [