6 Commits
Author SHA1 Message Date
jackos1998 198b172186 Update llm-agents
CI / Check, build and cache nixfiles (push) Successful in 48m59s
Update docs / update (push) Successful in 1m11s
2026-10-31 15:22:46 +00:00
jackos1998 4281aa9234 nix: Add Numtide binary cache for llm-agents
Configure the Numtide substituter and signing key in the shared cache
settings and flake configuration so Codex can use prebuilt binaries.
Document the cache and retain the input’s tested nixpkgs pin.
2026-10-31 15:21:26 +00:00
jackos1998 20ac77d8a0 devshell: Accept flake config in build-n-switch
Pass `--accept-flake-config` explicitly because `doas` drops the
devshell configuration that enables it. This avoids prompts for the
flake’s binary cache settings when rebuilding as root.
2026-10-31 15:19:14 +00:00
jackos1998 967faad269 home-manager/gui: Switch from swappy to satty for screenshots
CI / Check, build and cache nixfiles (push) Successful in 47m47s
Update docs / update (push) Successful in 1m14s
2026-10-30 12:16:16 +00:00
jackos1998 ebedb6b494 Update llm-agents
CI / Check, build and cache nixfiles (push) Successful in 1h24m33s
Update docs / update (push) Successful in 1m1s
2026-10-29 21:45:49 +00:00
jackos1998 cbe54f7523 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.
2026-10-19 17:14:21 +01:00
7 changed files with 34 additions and 18 deletions
+6 -1
View File
@@ -35,7 +35,7 @@ see its help, or browse `devshell/commands.nix` / `devshell/install.nix` / `devs
Common ones: Common ones:
- `fmt` — format Nix with `nixpkgs-fmt` (the canonical formatter here). - `fmt` — format Nix with `nixpkgs-fmt` (the canonical formatter here).
- `build-system <host> [nix args]` — build a NixOS system's `toplevel`. - `build-system <host> [nix args]` — build a NixOS system's `toplevel`.
- `build-n-switch <args>` — wraps `doas nixos-rebuild --flake .`. - `build-n-switch <args>` — wraps `doas nixos-rebuild --accept-flake-config --flake .`.
- `build-home <name>` / `home-switch` — build / switch a home-manager config. - `build-home <name>` / `home-switch` — build / switch a home-manager config.
- `run-vm <host>` — build & boot a system as a dev VM (installs `.keys/dev.key` into the VM). - `run-vm <host>` — build & boot a system as a dev VM (installs `.keys/dev.key` into the VM).
- `build-iso` / `build-kexec` / `build-netboot <host>` — alternate build outputs via `config.my.buildAs.*`. - `build-iso` / `build-kexec` / `build-netboot <host>` — alternate build outputs via `config.my.buildAs.*`.
@@ -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:
+2 -1
View File
@@ -106,7 +106,8 @@ in
# HACK: Upstream changes in Git + Nix makes this necessary # HACK: Upstream changes in Git + Nix makes this necessary
# https://github.com/NixOS/nix/issues/10202 # https://github.com/NixOS/nix/issues/10202
doas git config --global --add safe.directory "$PWD" doas git config --global --add safe.directory "$PWD"
doas nixos-rebuild --flake . "$@" # doas drops the devshell's NIX_USER_CONF_FILES, including accept-flake-config.
doas nixos-rebuild --accept-flake-config --flake . "$@"
''; '';
} }
{ {
+7 -3
View File
@@ -68,6 +68,10 @@ The shared GUI home-manager module installs Codex from the `llm-agents` input, r
that input's tested nixpkgs pin. Run `nix flake update llm-agents`, then switch the system that input's tested nixpkgs pin. Run `nix flake update llm-agents`, then switch the system
or home configuration to use the updated package. or home configuration to use the updated package.
The shared cache settings in `lib.my.c.nix.cache` and the flake's `nixConfig` include
the [Numtide binary cache](https://github.com/numtide/llm-agents.nix#binary-cache), so
Codex can be downloaded prebuilt. Keep the input's tested nixpkgs pin to preserve cache hits.
`programs.codex.mutableSettings` merges the declared status-line settings into the writable `programs.codex.mutableSettings` merges the declared status-line settings into the writable
`~/.codex/config.toml` during activation. Declared values take precedence on each switch; `~/.codex/config.toml` during activation. Declared values take precedence on each switch;
other settings, including model selection, providers and project trust, remain imperative. other settings, including model selection, providers and project trust, remain imperative.
@@ -82,7 +86,7 @@ command with no arguments for its help. From
|---|---| |---|---|
| `check-system <host> [nix args]` | Evaluates `.#nixosConfigurations."<host>".config.system.build.toplevel.drvPath` — catches module/option errors without building. Prefer this to validate a config change. | | `check-system <host> [nix args]` | Evaluates `.#nixosConfigurations."<host>".config.system.build.toplevel.drvPath` — catches module/option errors without building. Prefer this to validate a config change. |
| `build-system <host> [nix args]` | Builds the system's `toplevel` (extra args pass through to `nix build`). | | `build-system <host> [nix args]` | Builds the system's `toplevel` (extra args pass through to `nix build`). |
| `build-n-switch <args>` | `doas nixos-rebuild --flake .` (adds the repo as a git `safe.directory` for root first). | | `build-n-switch <args>` | `doas nixos-rebuild --accept-flake-config --flake .` (accepts the flake's cache settings and adds the repo as a git `safe.directory` for root first). |
| `build-home <name> [nix args]` | Builds `.#homeConfigurations."<name>".activationPackage`. | | `build-home <name> [nix args]` | Builds `.#homeConfigurations."<name>".activationPackage`. |
| `home-switch [args]` | `home-manager switch --flake .`. | | `home-switch [args]` | `home-manager switch --flake .`. |
| `deploy [args]` | `deploy-rs --skip-checks` (wrapper package in `devshell/default.nix`). | | `deploy [args]` | `deploy-rs --skip-checks` (wrapper package in `devshell/default.nix`). |
@@ -178,8 +182,8 @@ are unchanged, and the Determinate NixOS module is deliberately not imported.
Determinate without further change. Determinate without further change.
- **`accept-flake-config`.** Set true only in the devshell `nix.conf`, `.envrc` (as - **`accept-flake-config`.** Set true only in the devshell `nix.conf`, `.envrc` (as
`--accept-flake-config`, for direnv) and CI — the contexts that build this flake — so its `--accept-flake-config`, for direnv) and CI — the contexts that build this flake — so its
`nixConfig` (the Harmonia cache) is trusted without an interactive prompt. It is deliberately not `nixConfig` (the Harmonia and Numtide caches) is trusted without an interactive prompt. It is
set system-wide: boxes already trust that cache via `nix.settings`, so a global setting would only deliberately not set system-wide: boxes already trust those caches via `nix.settings`, so a global setting would only
blanket-trust every flake's `nixConfig` for no gain. blanket-trust every flake's `nixConfig` for no gain.
## Secrets ## Secrets
Generated
+6 -6
View File
@@ -695,11 +695,11 @@
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1792315957, "lastModified": 1793435943,
"narHash": "sha256-LzC5I1T+RoNzolKqp2xYk1x/SraHlmYnJzK27PU+ewg=", "narHash": "sha256-kl4L50m8mMMyQLjH2d46ljtdzR+9vlgpoDmOrpNV/SU=",
"owner": "numtide", "owner": "numtide",
"repo": "llm-agents.nix", "repo": "llm-agents.nix",
"rev": "14f2728181ecf9f5da168b72799bc9f42ae51803", "rev": "b14f9d18b6d127221bd9f63817a40e1cca2b344b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -919,11 +919,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1792116957, "lastModified": 1793345420,
"narHash": "sha256-EjZqHKObBfIOeHZnMRVV87HB3pPq/WBkmRJWyFxmZu8=", "narHash": "sha256-e/yiZ31gXRROBDcnOtT3YwDQ73NVG9Cepccbt86LIn8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f20cd90e28fe0403873f473b29e42662cd86e8c4", "rev": "885ba4d038f10c3d17d7a92e8c3cc185b99c9158",
"type": "github" "type": "github"
}, },
"original": { "original": {
+3 -1
View File
@@ -1,16 +1,18 @@
{ {
description = "System configs"; description = "System configs";
# Offer our Harmonia cache when building the flake itself, so `nix develop` / `nix build` don't # Offer our Harmonia and Numtide caches when building the flake, so `nix develop` / `nix build` don't
# rebuild from source. Nix reads `nixConfig` before the flake evaluates and rejects any computed # rebuild from source. Nix reads `nixConfig` before the flake evaluates and rejects any computed
# value (imports/thunks), so these must stay literal — keep them in sync with `lib.my.c.nix.cache`. # value (imports/thunks), so these must stay literal — keep them in sync with `lib.my.c.nix.cache`.
# Consumers must trust these (accept-flake-config / a trusted user) for them to take effect. # Consumers must trust these (accept-flake-config / a trusted user) for them to take effect.
nixConfig = { nixConfig = {
extra-substituters = [ extra-substituters = [
"https://nix-cache.nul.ie" "https://nix-cache.nul.ie"
"https://cache.numtide.com"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nix-cache.nul.ie-1:BzH5yMfF4HbzY1C977XzOxoPhEc9Zbu39ftPkUbH+m4=" "nix-cache.nul.ie-1:BzH5yMfF4HbzY1C977XzOxoPhEc9Zbu39ftPkUbH+m4="
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
]; ];
}; };
+8 -6
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;
@@ -84,7 +84,7 @@ in
grim grim
slurp slurp
swappy satty
python3Packages.python-lsp-server python3Packages.python-lsp-server
nil # nix language server nil # nix language server
@@ -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 = {
@@ -408,8 +410,8 @@ in
"${mod}+Shift+n" = "exec ${clearWsName}"; "${mod}+Shift+n" = "exec ${clearWsName}";
# Screenshots # Screenshots
"${mod}+Shift+d" = ''exec grim - | swappy -f -''; "${mod}+Shift+d" = ''exec grim - | satty -f -'';
"${mod}+Shift+s" = ''exec grim -g "$(slurp)" - | swappy -f -''; "${mod}+Shift+s" = ''exec grim -g "$(slurp)" - | satty -f -'';
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%"; "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%";
+2
View File
@@ -102,9 +102,11 @@ rec {
cache = rec { cache = rec {
substituters = [ substituters = [
"https://nix-cache.${pubDomain}" "https://nix-cache.${pubDomain}"
"https://cache.numtide.com"
]; ];
keys = [ keys = [
"nix-cache.nul.ie-1:BzH5yMfF4HbzY1C977XzOxoPhEc9Zbu39ftPkUbH+m4=" "nix-cache.nul.ie-1:BzH5yMfF4HbzY1C977XzOxoPhEc9Zbu39ftPkUbH+m4="
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
]; ];
conf = '' conf = ''
extra-substituters = ${concatStringsSep " " substituters} extra-substituters = ${concatStringsSep " " substituters}