Unpin opencode

This commit is contained in:
Martin Pander
2026-07-01 15:29:49 +02:00
parent bebb12d20d
commit 653ec4e4af
7 changed files with 43 additions and 68 deletions

77
flake.lock generated
View File

@@ -70,11 +70,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778446047, "lastModified": 1782772816,
"narHash": "sha256-oQvcadh2BCkrog+SGrG6YffKJrveYpjj3TdQJWaKhaM=", "narHash": "sha256-s9BuFv0mRuZx9C1MF8qPHRdcAK14ONi0A5m6E2wqOoM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "bun2nix", "repo": "bun2nix",
"rev": "f2bc12af1a6369648aac41041ceeaa0b866599c6", "rev": "5a39d717029e94163ac223aee8d5c9946cafed1c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -181,11 +181,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781319724, "lastModified": 1782704057,
"narHash": "sha256-ZGuxexEMo4Xv28KJ0dX/m/PHN4oZIOnxHZpNTyrvx4M=", "narHash": "sha256-G1I1gd32F7mp9LAe1DaZ4ZL7NX5gyiKwdCMwro1Vrck=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8355f0a16b2dbb06a97959a918af5b239bbe05ae", "rev": "868d0a692de703c2de98fab61968e4e310b7c28e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -202,11 +202,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781319724, "lastModified": 1782704057,
"narHash": "sha256-ZGuxexEMo4Xv28KJ0dX/m/PHN4oZIOnxHZpNTyrvx4M=", "narHash": "sha256-G1I1gd32F7mp9LAe1DaZ4ZL7NX5gyiKwdCMwro1Vrck=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8355f0a16b2dbb06a97959a918af5b239bbe05ae", "rev": "868d0a692de703c2de98fab61968e4e310b7c28e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -224,11 +224,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781895871, "lastModified": 1782739581,
"narHash": "sha256-UCuRKnUuDWJ7kcEHCYRV+p/LT7lYkCRzYrz9udm1vC0=", "narHash": "sha256-0zK4mQsx4dTQ0D8xY/6REuvE+onPfKSUvvZz+bAVwIw=",
"owner": "modem-dev", "owner": "modem-dev",
"repo": "hunk", "repo": "hunk",
"rev": "c05558cd8dbdf61a8e11bfc8378d9d619e4c0d8d", "rev": "65a27400099dd5db29d10e1dcbdd0918748cadba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -262,11 +262,11 @@
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1781935030, "lastModified": 1782888034,
"narHash": "sha256-VbghtmBX09cL/JIm5fXSzHnI2tFE8lorxe9Fx/hE6yk=", "narHash": "sha256-bmM+TfnodBmk/95HE/eIoNzRY8b7wRWbcYU3cUvKIZw=",
"owner": "numtide", "owner": "numtide",
"repo": "llm-agents.nix", "repo": "llm-agents.nix",
"rev": "6d65e7002dd5fe407af6d989ea49f9e89619d4db", "rev": "2a0d5e87e34cbec74c2df9764eeddf1a655d2046",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -340,11 +340,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1781607440, "lastModified": 1782760764,
"narHash": "sha256-rxO+uc/KFbSJp+pgyXRuAX6QlG9hJdnt0BXpEQRXY+U=", "narHash": "sha256-N66fYdUuZ9hpdM7jsQ7CUWtLJduqGDyTGCaLR62CXaQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3e41b24abd260e8f71dbe2f5737d24122f972158", "rev": "7a1a64774a5fd0b0cd39ac95d0e170ace8b266a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -384,29 +384,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-opencode": {
"locked": {
"lastModified": 1777270315,
"narHash": "sha256-yKB4G6cKsQsWN7M6rZGk6gkJPDNPIzT05y4qzRyCDlI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6368eda62c9775c38ef7f714b2555a741c20c72d",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6368eda62c9775c38ef7f714b2555a741c20c72d",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1781216227, "lastModified": 1782847225,
"narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=", "narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0", "rev": "95ca1e203c0750115fd4a6f17d5a245dfe6b1edd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -418,11 +402,11 @@
}, },
"nixpkgs-wsl-stable": { "nixpkgs-wsl-stable": {
"locked": { "locked": {
"lastModified": 1781216227, "lastModified": 1782847225,
"narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=", "narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0", "rev": "95ca1e203c0750115fd4a6f17d5a245dfe6b1edd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -434,11 +418,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1781577229, "lastModified": 1782723713,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", "narHash": "sha256-oPXCU/SSUokcGaJREHibG1CBX3+s/W7orDWQOZDsEeQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "rev": "b5aa0fbd538984f6e3d201be0005b4463d8b09f8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -474,7 +458,6 @@
"nixos-vscode-server": "nixos-vscode-server", "nixos-vscode-server": "nixos-vscode-server",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-opencode": "nixpkgs-opencode",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-wsl-stable": "nixpkgs-wsl-stable", "nixpkgs-wsl-stable": "nixpkgs-wsl-stable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
@@ -488,11 +471,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1780547341, "lastModified": 1782165805,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "narHash": "sha256-478kKQBvK6SYTOdN2h9jhKJv94nbXRbFMfuL1WshErg=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "rev": "56b24064fdcaedca53553b1a6d607fd23b613a24",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -9,9 +9,6 @@
nixpkgs-wsl-stable.url = "github:nixos/nixpkgs/nixos-26.05"; nixpkgs-wsl-stable.url = "github:nixos/nixpkgs/nixos-26.05";
# Pinned nixpkgs for opencode 1.14.25 (latest unstable segfaults)
nixpkgs-opencode.url = "github:nixos/nixpkgs/6368eda62c9775c38ef7f714b2555a741c20c72d";
nixos-wsl = { nixos-wsl = {
url = "github:nix-community/nixos-wsl/release-26.05"; url = "github:nix-community/nixos-wsl/release-26.05";
inputs.nixpkgs.follows = "nixpkgs-wsl-stable"; inputs.nixpkgs.follows = "nixpkgs-wsl-stable";
@@ -55,7 +52,7 @@
llm-agents.url = "github:numtide/llm-agents.nix"; llm-agents.url = "github:numtide/llm-agents.nix";
}; };
outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-wsl-stable, nixpkgs-opencode, nixos-wsl, home-manager, home-manager-wsl, nix-darwin, ... }@inputs: outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-wsl-stable, nixos-wsl, home-manager, home-manager-wsl, nix-darwin, ... }@inputs:
let let
linuxSystem = "x86_64-linux"; linuxSystem = "x86_64-linux";
linuxAarchSystem = "aarch64-linux"; linuxAarchSystem = "aarch64-linux";
@@ -82,7 +79,6 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nixpkgs.overlays = [
(import ./modules/overlays/unstable.nix nixpkgs) (import ./modules/overlays/unstable.nix nixpkgs)
(import ./modules/overlays/opencode.nix nixpkgs-opencode)
]; ];
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;

View File

@@ -52,7 +52,7 @@ in
(lib.mkIf cfg.enable { (lib.mkIf cfg.enable {
home.packages = home.packages =
(lib.optional cfg.claude-code.enable pkgs.unstable.claude-code) ++ (lib.optional cfg.claude-code.enable pkgs.unstable.claude-code) ++
(lib.optional cfg.opencode.enable (pkgs.opencode-pinned or pkgs.unstable.opencode)) ++ (lib.optional cfg.opencode.enable pkgs.unstable.opencode) ++
(lib.optional cfg.gemini-cli.enable pkgs.unstable.gemini-cli) ++ (lib.optional cfg.gemini-cli.enable pkgs.unstable.gemini-cli) ++
(lib.optional cfg.pi.enable inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.pi) ++ (lib.optional cfg.pi.enable inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.pi) ++
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.unstable.bubblewrap); (lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.unstable.bubblewrap);

View File

@@ -58,7 +58,7 @@ in
"claude-sonnet-4-6-default" = { name = "Sonnet 4.6"; }; "claude-sonnet-4-6-default" = { name = "Sonnet 4.6"; };
"claude-haiku-4-5-20251001" = { name = "Haiku 4.5"; }; "claude-haiku-4-5-20251001" = { name = "Haiku 4.5"; };
}; };
whitelist = ["claude-opus-4-7-default" "claude-opus-4-6-default" "claude-sonnet-4-6-default" "claude-haiku-4-5-20251001"]; whitelist = ["claude-opus-4-8-default" "claude-opus-4-7-default" "claude-opus-4-6-default" "claude-sonnet-4-6-default" "claude-haiku-4-5-20251001"];
}; };
# ollama = { # ollama = {
# npm = "@ai-sdk/openai-compatible"; # npm = "@ai-sdk/openai-compatible";

View File

@@ -148,6 +148,13 @@ in
${lib.optionalString cfg.workMode '' ${lib.optionalString cfg.workMode ''
bind C-s display-popup -E "projectSelector" bind C-s display-popup -E "projectSelector"
bind C-n display-popup -E -xC -yC -w 95% -h 95% -d "/mnt/c/Users/marti/Documents/notes/Work/" "vim quick_notes.md" bind C-n display-popup -E -xC -yC -w 95% -h 95% -d "/mnt/c/Users/marti/Documents/notes/Work/" "vim quick_notes.md"
bind C-q display-popup -E -xC -yC -w 95% -h 95% " \
SESSION_NAME=\$(tmux display-message -p '#S'); \
if [ \"\$SESSION_NAME\" = 'misc' ]; then \
cd '/mnt/c/Users/marti/Documents/notes/Work/' && vim task_notes.md; \
else \
cd \"\$HOME/pro/\$SESSION_NAME\" && vim task_notes.md; \
fi"
bind C-p display-popup -E -xC -yC -w 95% -h 95% -d "/mnt/c/Users/marti/Documents/notes/Work/development/" "vim mbpr.md" bind C-p display-popup -E -xC -yC -w 95% -h 95% -d "/mnt/c/Users/marti/Documents/notes/Work/development/" "vim mbpr.md"
''} ''}

View File

@@ -323,6 +323,8 @@ require("conform").setup({
sh = {"shfmt"}, sh = {"shfmt"},
bash = {"shfmt"}, bash = {"shfmt"},
zsh = {"shfmt"}, zsh = {"shfmt"},
c = {"clang-format"},
cpp = {"clang-format"},
}, },
format_on_save = { format_on_save = {
timeout_ms = 500, timeout_ms = 500,
@@ -463,7 +465,7 @@ require("obsidian").setup({
time_format = "%H:%M", time_format = "%H:%M",
}, },
checkbox = { checkbox = {
order = { " ", ">", "x", "!", "~" }, order = { " ", ">", "x", "!", "~", "" },
}, },
frontmatter = { frontmatter = {
enabled = true, enabled = true,

View File

@@ -1,13 +0,0 @@
# Overlay to provide a pinned version of opencode
# This pins opencode to a specific nixpkgs commit to avoid issues
# with the latest unstable version (segfaults).
#
# Usage: Pass nixpkgs-opencode input when applying overlay:
# overlays = [ (import ./modules/overlays/opencode.nix nixpkgs-opencode) ];
nixpkgs-opencode: final: prev: {
opencode-pinned = (import nixpkgs-opencode {
inherit (prev) system;
config.allowUnfree = true;
}).opencode;
}