home/gui: Guard newer Codex settings option
CI / Check, build and cache nixfiles (push) Successful in 2h42m49s
Update docs / update (push) Successful in 1m20s

Only set `programs.codex.mutableSettings` when Home Manager exposes it.
This fixes evaluation on 26.05, including boxes with the GUI disabled.
Record the removal TODO and guidance for future compatibility guards.
This commit is contained in:
2026-10-19 17:14:21 +01:00
parent 46008cb25a
commit cbe54f7523
2 changed files with 10 additions and 3 deletions
+5
View File
@@ -116,6 +116,11 @@ Four pkgs sets are threaded everywhere as `pkgsFlakes` / `pkgs'` (and `hmFlakes`
channel via `nixpkgs` / `home-manager` / `hmNixpkgs` options (e.g. `nixpkgs = "mine-stable"`). channel via `nixpkgs` / `home-manager` / `hmNixpkgs` options (e.g. `nixpkgs = "mine-stable"`).
Modules receive `pkgs'` = an attrset of all channels for the current system. Modules receive `pkgs'` = an attrset of all channels for the current system.
For options absent from older channels, omit the attribute with `optionalAttrs` guarded by
the module's `options` argument. `mkIf false` still checks option existence. Add a `TODO`
comment explaining which older release needs the guard and which release upgrade allows
its removal, matching the existing release-gated TODOs.
### `lib.my` and the `my` option namespace ### `lib.my` and the `my` option namespace
`lib/default.nix` extends `lib` with a `my` attrset (helpers like `mkOpt'`, `mkBoolOpt'`, `lib/default.nix` extends `lib` with a `my` attrset (helpers like `mkOpt'`, `mkBoolOpt'`,
`mkDefault'`, `inlineModule'`, `mkDefaultSystemsPkgs`, `homeStateVersion`). It also pulls in: `mkDefault'`, `inlineModule'`, `mkDefaultSystemsPkgs`, `homeStateVersion`). It also pulls in:
+5 -3
View File
@@ -1,6 +1,6 @@
{ lib, pkgs', pkgs, inputs, config, ... }: { lib, pkgs', pkgs, inputs, config, options, ... }:
let let
inherit (lib) genAttrs mkIf mkMerge mkForce mapAttrs mkOptionDefault mkDefault optional; inherit (lib) genAttrs mkIf mkMerge mkForce mapAttrs mkOptionDefault mkDefault optional optionalAttrs;
inherit (lib.my) mkOpt' mkBoolOpt'; inherit (lib.my) mkOpt' mkBoolOpt';
inherit (lib.my.c) pubDomain; inherit (lib.my.c) pubDomain;
@@ -187,10 +187,10 @@ in
}; };
}; };
# TODO: Remove mutableSettings guard when Home Manager 26.11 releases; 26.05 lacks it.
codex = { codex = {
enable = true; enable = true;
package = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.codex; package = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.codex;
mutableSettings = true;
settings.sandbox_workspace_write.network_access = true; settings.sandbox_workspace_write.network_access = true;
settings.tui = { settings.tui = {
status_line = [ status_line = [
@@ -206,6 +206,8 @@ in
]; ];
status_line_use_colors = true; status_line_use_colors = true;
}; };
} // optionalAttrs (options.programs.codex ? mutableSettings) {
mutableSettings = true;
}; };
claude-code = { claude-code = {