ci: Convert GHA workflows to Woodpecker CI pipelines#546
Conversation
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughThis pull request migrates the repository's CI infrastructure from GitHub Actions to Woodpecker, introduces an isolated Nix store daemon service for safe CI container execution, adds comprehensive new Nushell scripting and tooling, and delivers full documentation and container image building support for the new architecture. ChangesWoodpecker CI and isolated Nix infrastructure
🎯 4 (Complex) | ⏱️ ~60 minutes
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
|
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 📃 Configuration Change RequirementsWonderful, this rule succeeded.Mergify configuration change
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Do not merge outdated PRsWonderful, this rule succeeded.Make sure PRs are almost up to date before merging
|
🧪 CI InsightsHere's what we observed from your CI run for a0a3211. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Pull request overview
Converts CI execution from GitHub Actions workflows to Woodpecker pipelines and adds supporting Nushell/Nix utilities for affected-output and package discovery/build automation.
Changes:
- Added Woodpecker pipelines for flake checks, output builds, package builds, and automated package updates.
- Introduced shared Nushell library helpers and flake-change detection utilities used by CI scripts.
- Updated Nix packaging helper to bundle Nushell libs and adjust runtime inputs for CI scripting.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/package.nix | Extends Nu app builder to vendor sources/libs into the store and copy lib/*.nu during build. |
| lib/nu-lib/lib.nu | Adds reusable Nushell utilities (logging setup and required env var checks). |
| flake/dev/scripts/lib/flake.nu | Adds helpers to read flake lock inputs and detect changed files across a git range. |
| flake/dev/scripts/lib | Points dev scripts at the shared lib/nu-lib module directory. |
| flake/dev/scripts/default.nix | Wires dev scripts to the shared Nu lib source. |
| flake/ci/scripts/setup-attic.nu | Adds CI helper script to login to Attic and optionally watch the store. |
| flake/ci/scripts/lib | Adds a lib pointer for CI scripts (currently absolute). |
| flake/ci/scripts/eval.nix | Adds Nix helper to locate package source positions for package discovery. |
| flake/ci/scripts/discover-packages.nu | Adds CI script to list/filter packages and detect which changed in a git range. |
| flake/ci/scripts/default.nix | Exposes new CI scripts and wires them to the shared Nu lib source. |
| .woodpecker/update-packages.yaml | Adds Woodpecker cron/manual pipeline to run nix-update and open PRs. |
| .woodpecker/packages.yaml | Adds Woodpecker matrix pipeline to build packages with basic “affected” skipping. |
| .woodpecker/ci.yaml | Adds Woodpecker pipelines to build only affected NixOS/Home-Manager outputs plus treefmt checks. |
| .github/workflows/update-packages.yaml | Disables the GHA schedule trigger (migration to Woodpecker). |
| .github/workflows/packages.yaml | Disables the GHA PR/push triggers (migration to Woodpecker). |
Comments suppressed due to low confidence (1)
flake/ci/scripts/lib:1
- This looks like a symlink target committed as an absolute path. In CI and for other contributors,
/persist/nix-config/...likely won’t exist, breakinguse lib/...imports. Prefer a repo-relative symlink/loader path (as inflake/dev/scripts/lib) so the checkout is self-contained.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
67ce93c to
a0a3211
Compare
There was a problem hiding this comment.
Actionable comments posted: 29
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/update-packages.yaml:
- Around line 4-5: The scheduled cron trigger was commented out leaving no
automated updates; add a clear comment next to the disabled schedule explaining
that the cron is migrated to Woodpecker and requires creating a cron job named
"update-packages" in the Woodpecker UI (or document this migration in the repo
README/migration guide) so reviewers/operators know automated updates remain
disabled until that manual UI step is performed.
In @.opencode/agent/test.md:
- Line 129: Fix the typo in the README line by replacing the incorrect command
string "detect-affecteded-outputs" with the correct "detect-affected-outputs" in
the .opencode/agent/test.md content; search for the exact token
"detect-affecteded-outputs" and update it to "detect-affected-outputs" so the
displayed command name matches the actual module output.
In @.woodpecker/checks.yaml:
- Line 131: Update the error message string in the echo command that currently
reads "Missing packages in packages.yaml: $${MISSING_PACKAGES[@]}" to reference
the correct filename "ci-packages.yaml" instead, i.e., modify the echo
invocation that mentions the MISSING_PACKAGES array so it prints "Missing
packages in ci-packages.yaml: $${MISSING_PACKAGES[@]}".
- Line 169: The grep pattern in the if clause (the line using echo
"$CHANGED_FILES" | grep -E 'ci-(hosts|homes|packages|update-packages)\.yaml' >
/dev/null; then) doesn't match the actual filename update-packages.yaml; update
the regex to explicitly allow either the ci- prefixed files or the standalone
update-packages.yaml, e.g. replace the pattern with one that matches
(ci-(hosts|homes|packages)\.yaml|update-packages\.yaml) so changes to
update-packages.yaml are detected.
- Around line 68-154: The four matrix validation jobs (matrix-ci-hosts.yaml,
matrix-ci-homes.yaml, matrix-packages.yaml, matrix-update-packages.yaml) behave
inconsistently on mismatches (some auto-fix, some exit, some only echo); pick a
single policy and apply it to all jobs: either (A) auto-fix by updating the YAML
with yq and git add the file (mirror the behavior in matrix-ci-hosts.yaml) for
matrix-ci-homes.yaml, matrix-packages.yaml and matrix-update-packages.yaml, or
(B) fail fast by echoing the missing items and exit 1 for the auto-fixing jobs
(matrix-ci-hosts.yaml and matrix-update-packages.yaml); also fix the obvious
loop typo in matrix-update-packages.yaml (the for package in
"$${ALL_PACKAGES}[@]}"; do should iterate over "$${ALL_PACKAGES[@]}") so the
consistency change applies correctly.
- Line 145: The for-loop in .woodpecker/checks.yaml uses a malformed expansion
of the ALL_PACKAGES array (the extra closing brace in the expression used to
iterate causes a bash syntax error); fix the loop that iterates the ALL_PACKAGES
variable by removing the stray brace and using a proper, quoted array expansion
of ALL_PACKAGES so the loop iterates elements correctly.
- Line 171: Update the git add invocation that currently lists
".woodpecker/packages.yaml" to reference the correct file name
".woodpecker/ci-packages.yaml" so the command becomes: git add
.woodpecker/ci-hosts.yaml .woodpecker/ci-homes.yaml .woodpecker/ci-packages.yaml
.woodpecker/update-packages.yaml; modify the line containing that git add
command in the checks.yaml where it's currently written.
- Around line 118-119: Update the MATRIX_PACKAGES and ALL_PACKAGES assignments:
change the filename reference used by MATRIX_PACKAGES from
".woodpecker/packages.yaml" to the correct ".woodpecker/ci-packages.yaml", and
fix the flake attribute path used by ALL_PACKAGES from ".#package.x86_64-linux"
to ".#packages.x86_64-linux" so the commands that populate MATRIX_PACKAGES and
ALL_PACKAGES (the variables named MATRIX_PACKAGES and ALL_PACKAGES in the diff)
point to the correct file and flake attribute.
- Line 142: The ALL_PACKAGES line uses an invalid Nix expression (calling a
non‑existent `filter` in `--apply`) and must be replaced with a valid approach:
either change the nix eval --apply expression to a proper Nix filter that
operates on attributes (e.g., use builtins.attrValues and builtins.filter to
select items with passtru.update-script) or keep the existing plain eval to list
package names and perform the passtru.update-script check in the shell loop
(like the existing passtru.discovery check at line 124); update the command
building ALL_PACKAGES and the downstream loop to use whichever approach you
choose so that packages are actually filtered by passtru.update-script without
using a non‑builtin `filter`.
In @.woodpecker/ci-homes.yaml:
- Around line 49-50: The workflow's build step currently relies on a when.path
check against a marker file created by the decide-${HOME} step, but Woodpecker
evaluates path conditions from the SCM diff and won't see .do-build; change the
build step to always run and move the .do-build presence check into its
commands: at the start of the build step's commands section (the step that
previously used when.path) add a shell conditional that exits early if .do-build
does not exist (e.g., test -f .do-build || exit 0) so the step is skipped at
runtime when the marker is absent; ensure decide-${HOME} still creates .do-build
when needed.
In @.woodpecker/ci-hosts.yaml:
- Around line 56-57: The pipeline uses when.path: .do-build to gate
build-${HOST}, but .do-build is created at runtime by decide-${HOST} so the path
filter never matches; remove the when.path: .do-build from the build-${HOST}
step and instead rely on depends_on: ["decide-${HOST}"] (or pass an env
var/artifact from decide-${HOST} like SHOULD_BUILD) so the build step runs only
after the decision and can check the runtime flag; apply the same change for the
other matching step(s) that reference .do-build and when.path.
In @.woodpecker/ci-packages.yaml:
- Around line 73-74: The decision step currently creates a runtime marker file
`.do-build` which Woodpecker's when.path cannot see (it evaluates the git
changeset at trigger time), so the build step will still run; instead, change
the decision step to exit with a non-zero code when SHOULD_BUILD is false (or
exit 0 when true) and update the build step to use when.exit_status to gate
execution (e.g., run the decision step script that checks the env var and `exit
1` when not building, and set the build step to run only when the prior step
exit_status is 0); apply the same change for the other instance that touches
`.do-build` on lines 81–82 so both decision steps use process exit codes and
when.exit_status gating rather than creating `.do-build`.
In @.woodpecker/lix.yaml:
- Line 71: The publish-step image reference "image:
registry.racci.dev/lix-woodpecker" uses an implicit latest tag; update it to an
explicit tag or digest (e.g., registry.racci.dev/lix-woodpecker:<version> or
`@sha256`:...) to match the explicit tagging used elsewhere (see the other image
reference) so builds are reproducible and predictable.
- Line 15: Update the bare image reference under the image key in
.woodpecker/lix.yaml to include an explicit tag or immutable digest for
reproducibility; replace "image: registry.racci.dev/lix-woodpecker" with a
pinned form like "image: registry.racci.dev/lix-woodpecker:<tag>" or the digest
form "image: registry.racci.dev/lix-woodpecker@sha256:<digest>" so the CI uses a
fixed version instead of relying on the implicit :latest.
In @.woodpecker/update-packages.yaml:
- Around line 48-49: The current use of when.path: .push won't gate manual or
cron runs because path filters only apply to push/pull_request and on_empty:
true makes the condition always pass for manual/cron; replace the path-based
gate with an explicit event or input-based check (e.g., use when.event to
restrict to push events or add a manual input/environment variable like
INPUT_RUN and check it with an if/when condition) or split into a separate
workflow for cron/manual; update occurrences of when.path and references to
.push and remove reliance on on_empty for these runs.
- Around line 20-21: The workflow fails because io-guardian-client and
io-guardian-server are included in the matrix but lack passthru.updateScript
required by the --use-update-script flag; either add a passthru.updateScript to
both packages following the same pattern used by other packages (e.g., set
passthru.updateScript to the nix-update-script invocation used by
alvr-bin/terminal-manager) or remove io-guardian-client and io-guardian-server
from the matrix; update the package derivations (the io-guardian-client and
io-guardian-server derivations) to include passthru.updateScript or drop them
from the workflow so the --use-update-script flag no longer applies to packages
without that attribute.
- Around line 1-3: The CI branch variable currently uses a single shared branch
name (BRANCH -> update/packages) so parallel matrix jobs force-push and clobber
each other; change BRANCH to include a package-specific identifier (e.g., derive
from the matrix item or package name) so each job writes to its own branch
instead of the shared update/packages; also add passthru.updateScript to the
io-guardian packages (pkgs/io-guardian/default.nix for io-guardian-client and
io-guardian-server) so the update step that runs nix-update --use-update-script
can succeed.
In @.woodpecker/update.yaml:
- Line 18: The image reference in .woodpecker/update.yaml currently uses an
unpinned image name "registry.racci.dev/lix-woodpecker"; update that "image"
value to a pinned reference (either a specific tag like
"registry.racci.dev/lix-woodpecker:2026.03.18" or an immutable digest like
"registry.racci.dev/lix-woodpecker@sha256:<digest>") so builds are reproducible,
and commit the updated YAML; ensure the chosen tag/digest corresponds to the
exact container you want to lock to.
In `@flake/ci/scripts/default.nix`:
- Around line 34-36: The new attr detect-affected-outputs calls
writeNuApplicationWithLibs but omits the required name parameter; update the
detect-affected-outputs definition to pass a unique name argument to
writeNuApplicationWithLibs (e.g., name = "detect-affected-outputs") so that the
function receives the required identifier and evaluation of
.#detect-affected-outputs succeeds; modify the detect-affected-outputs block
that invokes writeNuApplicationWithLibs to include the name field.
In `@flake/ci/scripts/detect-affected-outputs.nu`:
- Around line 22-30: Function parameter $outputs is being reassigned (immutable)
— introduce a mutable local binding instead: create a mutable local variable
(e.g., let mut outputs = $outputs) at the top of the function and use that
mutable variable in the is-empty check and when assigning the result of
get_outputs $type; do the same replacement for the later reassignment on lines
32–33 so all updates target the mutable local (outputs) rather than the
immutable parameter.
In `@flake/ci/scripts/discover-packages.nu`:
- Line 21: The eval can fail when pkg.meta.broken is absent; update the --apply
expression so it supplies a default for meta.broken alongside the existing
passthru.discovery fallback. Locate the expression using pkg.passthru.discovery
or true and inherit (pkg.meta) broken and change it to provide a fallback for
broken (for example by inheriting from pkg.meta or a default object with
broken=false, or by explicitly setting broken = pkg.meta.broken or false) so
packages missing meta.broken do not cause evaluation errors.
- Around line 35-47: The script hardcodes
/persist/nix-config/flake/ci/scripts/eval.nix and /persist/nix-config and a
fixed "x86_64-linux" in the attribute_json construction; change eval_nix and the
importPath to use paths relative to the script (e.g., compute script directory
and join with "eval.nix" and the flake root) and replace the literal
"x86_64-linux" with a parameter (e.g., arch or system) so attribute_json becomes
["packages", arch, $package_name] and cmd uses that parameter; also update the
caller that invokes get_changed (and any function that builds cmd) to accept and
forward the arch parameter so the architecture is threaded through.
- Line 80: all_related_files currently uses a shallow listing (ls $pkg_folder |
get name) which misses nested files; update the assignment for all_related_files
to use a recursive glob/walk (e.g., ls $pkg_folder/** | where type == "File" |
get name or use the shell's recursive ls/walk) so that files inside
subdirectories (like patches/) are included; modify the expression that defines
all_related_files to use that recursive pattern instead of the current shallow
ls.
In `@flake/ci/scripts/lib`:
- Line 1: The symlink at flake/ci/scripts/lib currently points to the absolute
path "/persist/nix-config/flake/dev/scripts/lib", which is machine-specific;
change the symlink target to a relative path ("../../dev/scripts/lib") so it is
portable across environments, update the symlink creation step in any
install/script that creates flake/ci/scripts/lib to use the relative target, and
verify the new link resolves correctly in CI and local clones.
In `@flake/ci/scripts/setup-attic.nu`:
- Around line 20-21: The script currently writes the token to a predictable /tmp
file and passes it on the attic command line (the lines using save -f /tmp/netrc
and attic login raccidev ... $env.BINARY_CACHE_TOKEN); change this to a
protected, non-predictable flow: create a secure temp file with mktemp, chmod
600, write the "machine ..." entry there (or alternatively avoid a file entirely
and pipe the token to attic via stdin if attic supports it), then invoke attic
without the token on argv so it reads credentials from the secure netrc (or from
stdin), and finally shred/remove the temp file immediately; ensure you stop
using /tmp/netrc and stop passing $env.BINARY_CACHE_TOKEN as a command-line
argument.
In `@lib/nu-lib/flake.nu`:
- Around line 141-151: get_flake_input currently ignores its input_name
parameter by hardcoding .nodes[$r].inputs.nixpkgs; change the jq invocation to
accept and use the input_name variable: pass --arg input_name "$input_name" to
jq and replace (.nodes[$r].inputs.nixpkgs // "nixpkgs") with
(.nodes[$r].inputs[$input_name] // $input_name), and likewise ensure the
fallback that picks a string vs array uses $input_name instead of the hardcoded
"nixpkgs"; keep the rest of the pipeline (rev/narHash extraction and from json)
unchanged.
In `@lib/nu-lib/lib.nu`:
- Around line 25-27: The log statement leaks environment values; change the log
debug $"Receive value of [($value)] for variable [($var)]" to only log the
variable name (e.g., $"Receive value for variable [($var)]") and do not include
$value, and ensure the missing-vars failure path that currently exits 0 is
changed to exit non-zero (exit 1) so CI fails when required vars are missing;
update the same pattern for the other block referenced (the second occurrence
using $missing_vars | append $var) so both places avoid value logging and return
a non-zero exit on missing variables.
- Around line 4-6: Remove the implicit side-effect by deleting the call to
setup_logging from the export-env block so importing lib.nu no longer
auto-configures logging; keep the setup_logging function exported (or
documented) so callers can call setup_logging explicitly when they want it, and
update any tests/docs and the importers (e.g., setup-attic.nu) to call
setup_logging themselves where needed instead of relying on the import-time
call.
In `@result-lix-woodpecker`:
- Line 1: Remove the committed Nix build artifacts (the files named "result" and
"result-lix-woodpecker") from the repository and add a gitignore rule to prevent
re-committing ephemeral Nix store outputs: delete the files from the index (git
rm --cached or remove and commit), add a line like "result*" to .gitignore,
commit the updated .gitignore and the removal, and push; ensure you reference
the specific artifact names ("result" and "result-lix-woodpecker") when removing
them so only these ephemeral build outputs are excluded.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f63cfa1c-cd14-424b-96c1-65ad4c1dba2d
📒 Files selected for processing (35)
.github/actions/setup-nix/action.yaml.github/workflows/ci.yaml.github/workflows/docs.yaml.github/workflows/packages.yaml.github/workflows/update-packages.yaml.mergify.yml.opencode/agent/ci-failure.md.opencode/agent/test.md.opencode/skills/testing/SKILL.md.woodpecker/check-upstream-todos.yaml.woodpecker/check.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.woodpecker/ci-packages.yaml.woodpecker/flake-checker.yaml.woodpecker/lix.yaml.woodpecker/security.yaml.woodpecker/update-packages.yaml.woodpecker/update.yamlAGENTS.mdflake/ci/scripts/default.nixflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nixflake/ci/scripts/libflake/ci/scripts/setup-attic.nuflake/dev/scripts/default.nixflake/dev/scripts/libflake/dev/treefmt.nixlib/nu-lib/flake.nulib/nu-lib/lib.nulib/package.nixpkgs/lix-woodpecker/default.nixresult-lix-woodpecker
💤 Files with no reviewable changes (7)
- .github/workflows/packages.yaml
- .woodpecker/check.yaml
- .woodpecker/security.yaml
- .woodpecker/flake-checker.yaml
- .github/workflows/docs.yaml
- .woodpecker/check-upstream-todos.yaml
- .github/actions/setup-nix/action.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Mergify Merge Protections
- GitHub Check: Summary
🧰 Additional context used
📓 Path-based instructions (5)
flake/ci/**
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
CI-specific flake definitions and scripts should be located in the
flake/ci/directory
Files:
flake/ci/scripts/setup-attic.nuflake/ci/scripts/discover-packages.nuflake/ci/scripts/libflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nixflake/ci/scripts/default.nix
**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/building/SKILL.md)
Use
nix fmtto format Nix code and check syntax
**/*.nix: Runnix fmt <paths...>after making any changes to ensure consistent formatting
Use 2 spaces for indentation in Nix files
Use kebab-case for Nix file and directory names
Use camelCase for Nix attributes (e.g.,myOption,enableFeature)
Use camelCase for Nix option paths (e.g.,services.myService.enable)
Prefer minimal comments; code should be self-explanatory, using comments to explain why, not what
Prefer relative imports over absolute imports (e.g.,./modules/foo.nix)
Group imports at the top of the Nix file and use list format for multiple imports
When generating JSON, YAML, or other structured formats, define as Nix attribute sets and convert using builtins functions (e.g.,builtins.toJSON), rather than using inline string literals
Follow the standard module structure pattern withconfig,lib,pkgsdestructuring,letbindings for module configuration, andoptions/configsections
Useletbindings withinheritfor importing functions from libraries (e.g.,inherit (lib) mkIf mkEnableOption)Run
nix fmtto format code before submitting changes
**/*.nix: Usebuiltins.traceto add trace statements for seeing values during Nix evaluation, withbuiltins.toJSONfor complex attribute sets
Check for circular dependencies in imports or option definitions as the root cause of infinite recursion errors in Nix
Verify attribute names, imports, and option paths to resolve 'attribute missing' errors in Nix configurationsRun
nix fmton changed Nix files after modifying modules
**/*.nix: Declare secrets in Nix usingsops.secretswith the secret path as the key
Specify custom permissions for secrets usingowner,group, andmodeattributes in sops.secrets declarations
Usesops.templatesto combine multiple secrets into configuration files with placeholders
AddrestartUnitsto secret declarations to automatically restart services when secrets change
Use empty `k...
Files:
pkgs/lix-woodpecker/default.nixlib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/eval.nixflake/dev/treefmt.nixflake/ci/scripts/default.nix
pkgs/*/default.nix
📄 CodeRabbit inference engine (.opencode/skills/packages/SKILL.md)
pkgs/*/default.nix: Each package should have its own directory under pkgs/ with a default.nix file containing the package definition
Use stdenv.mkDerivation for standard binary packages with required fields: pname, version, src, and meta (description, license, platforms)
Use writeShellApplication for shell script wrappers, specifying name, text (via builtins.readFile), and runtimeInputs
Use autoPatchelfHook in nativeBuildInputs for binary packages to automatically patch ELF dependencies
Use python3Packages.buildPythonApplication for Python applications with pyproject = true, specifying build-system and dependencies
For multi-output packages, use a let binding to define multiple outputs and register them with inherit syntax in pkgs/default.nix
Include passthru.updateScript in package definitions using nix-update-script with extraArgs for automatic update support
Files:
pkgs/lix-woodpecker/default.nix
pkgs/**
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Custom packages and package sets should be located in the
pkgs/directory with each package having its owndefault.nix
Files:
pkgs/lix-woodpecker/default.nix
flake/dev/**
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Development shell, CI scripts, and formatting utilities should be organized in the
flake/dev/directory
Files:
flake/dev/scripts/default.nixflake/dev/scripts/libflake/dev/treefmt.nix
🧠 Learnings (86)
📓 Common learnings
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/ci/** : CI-specific flake definitions and scripts should be located in the `flake/ci/` directory
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to flake.nix : Use `./flake/ci/detect-affected-outputs.nu nixosConfigurations --json` and `./flake/ci/detect-affected-outputs.nu homeConfigurations --json` to identify which outputs are affected by dirty files in CI
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to {flake.nix,flake.lock} : Run `nix flake check` (with devenv-root override) before submitting changes
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Run `nix fmt <changed-files>` to fix Nix formatting failures in CI checks
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/ci/** : CI-specific flake definitions and scripts should be located in the `flake/ci/` directory
Applied to files:
flake/ci/scripts/setup-attic.nuflake/ci/scripts/discover-packages.nuflake/ci/scripts/libflake/dev/scripts/libflake/ci/scripts/eval.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:16.409Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/security.md:0-0
Timestamp: 2026-03-01T12:27:16.409Z
Learning: Applies to **/*.nix : Never pass secrets via command line arguments (visible in process list); use secretFile, environmentFile, or sops-managed files instead
Applied to files:
flake/ci/scripts/setup-attic.nuflake/ci/scripts/discover-packages.nuflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:16.409Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/security.md:0-0
Timestamp: 2026-03-01T12:27:16.409Z
Learning: Applies to **/*.nix : Never hardcode passwords, API keys, or tokens in plain text; ensure sensitive data is stored in secrets.yaml and referenced through sops declarations
Applied to files:
flake/ci/scripts/setup-attic.nuflake/ci/scripts/discover-packages.nuflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : Include passthru.updateScript in package definitions using nix-update-script with extraArgs for automatic update support
Applied to files:
pkgs/lix-woodpecker/default.nixflake/ci/scripts/discover-packages.nulib/package.nix.woodpecker/update-packages.yamlflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to home/**/*.nix : Test at least one affected home configuration before submitting changes
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yamlflake/ci/scripts/discover-packages.nu.opencode/agent/test.md.woodpecker/ci-hosts.yaml.opencode/agent/ci-failure.md.opencode/skills/testing/SKILL.md.github/workflows/ci.yamlAGENTS.md.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For flake.nix or flake.lock changes, run a full flake check in addition to building representative configs
Applied to files:
.woodpecker/ci-packages.yamlflake/ci/scripts/discover-packages.nu.opencode/agent/test.mdlib/nu-lib/flake.nu.opencode/agent/ci-failure.mdflake/dev/scripts/default.nixflake/ci/scripts/lib.github/workflows/ci.yamlAGENTS.mdflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nix.woodpecker/checks.yamlflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to {flake.nix,flake.lock} : Run `nix flake check` (with devenv-root override) before submitting changes
Applied to files:
.woodpecker/ci-packages.yamlflake/ci/scripts/discover-packages.nu.opencode/agent/test.mdlib/nu-lib/flake.nu.opencode/agent/ci-failure.mdflake/dev/scripts/default.nixflake/ci/scripts/lib.github/workflows/ci.yamlAGENTS.mdflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nix.woodpecker/checks.yamlflake/dev/treefmt.nix.woodpecker/update.yamlflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Run `nix fmt <changed-files>` to fix Nix formatting failures in CI checks
Applied to files:
.woodpecker/ci-packages.yamlflake/ci/scripts/discover-packages.nu.opencode/agent/test.md.woodpecker/ci-hosts.yaml.opencode/agent/ci-failure.md.github/workflows/ci.yamlflake/ci/scripts/detect-affected-outputs.nu.woodpecker/checks.yamlflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to flake.nix : Use `./flake/ci/detect-affected-outputs.nu nixosConfigurations --json` and `./flake/ci/detect-affected-outputs.nu homeConfigurations --json` to identify which outputs are affected by dirty files in CI
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yamlflake/ci/scripts/discover-packages.nu.opencode/agent/test.mdlib/nu-lib/flake.nu.woodpecker/ci-hosts.yaml.opencode/agent/ci-failure.mdflake/dev/scripts/default.nixflake/ci/scripts/lib.opencode/skills/testing/SKILL.md.github/workflows/ci.yamlAGENTS.mdflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel` to test a host configuration
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.opencode/skills/testing/SKILL.md
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting only homes, build at least one affected home configuration using 'nix build .#homeConfigurations.<user>@<host>.activationPackage'
Applied to files:
.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.github/workflows/ci.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For home-specific changes in home/<user>/, build that user's home config on one host; if shared home files changed, test on multiple hosts
Applied to files:
.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.github/workflows/ci.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting both hosts and homes, build one host AND one home configuration to ensure no regressions
Applied to files:
.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting only hosts, build at least one affected host configuration using 'nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel'
Applied to files:
.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yamlflake/dev/scripts/default.nix.opencode/skills/testing/SKILL.md.github/workflows/ci.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Build a Home-Manager activation using `nix build .#homeConfigurations.<user>@<host>.activationPackage`
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For module changes in modules/, identify all configurations using the module and pick one representative host and/or home to build
Applied to files:
.woodpecker/ci-homes.yaml.opencode/agent/test.md.woodpecker/ci-hosts.yaml.opencode/skills/testing/SKILL.md
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Applies to home/*/[!.]*@(hm-config|os-config|secrets).nix : Create host-specific configuration files named `<hostname>.nix` in the user directory (`home/<username>/<hostname>.nix`), containing Home-Manager configuration with user-specific git settings, imports of shared features, and host-specific customizations
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Test user configuration using `nix build .#homeConfigurations.<username>.activationPackage` or `home-manager build --flake .#<username>` before deployment
Applied to files:
.woodpecker/ci-homes.yaml.github/workflows/ci.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix build .#homeConfigurations."<user>@<host>".activationPackage` to test a home configuration
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake.nix : Top-level flake definitions and inputs/outputs configuration should be placed in `flake.nix`
Applied to files:
flake/ci/scripts/discover-packages.nulib/nu-lib/flake.nu.opencode/agent/ci-failure.mdflake/dev/scripts/default.nixflake/ci/scripts/libflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nixflake/dev/treefmt.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix flake show` to display the structure and available outputs in a Nix flake
Applied to files:
flake/ci/scripts/discover-packages.nulib/nu-lib/flake.nuflake/dev/scripts/default.nixflake/ci/scripts/libflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/dev/** : Development shell, CI scripts, and formatting utilities should be organized in the `flake/dev/` directory
Applied to files:
flake/ci/scripts/discover-packages.nuflake/ci/scripts/libflake/dev/scripts/lib
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Use the module-graph script (./flake/dev/scripts/module-graph.nu) to determine which hosts and homes are affected by your changes
Applied to files:
flake/ci/scripts/discover-packages.nu.opencode/agent/test.mdflake/dev/scripts/default.nix.opencode/skills/testing/SKILL.md.github/workflows/ci.yamlAGENTS.md
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Avoid hardcoded paths that should be configurable options
Applied to files:
flake/ci/scripts/discover-packages.nu.woodpecker/ci-hosts.yamllib/package.nix.opencode/agent/ci-failure.mdflake/dev/scripts/default.nixflake/ci/scripts/libflake/ci/scripts/eval.nixflake/dev/treefmt.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Prefer relative imports (e.g., `./modules/foo.nix`) over absolute paths
Applied to files:
flake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Prefer relative imports over absolute imports (e.g., `./modules/foo.nix`)
Applied to files:
flake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Provide the `devenv-root` input override for `nix flake check` with path `file+file://$PWD/.devenv/root`
Applied to files:
flake/ci/scripts/discover-packages.nulib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Commit scope should be the common directory path (e.g., home/racci, hosts/server, modules/nixos, modules/home-manager, pkgs, lib)
Applied to files:
flake/ci/scripts/discover-packages.nu
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root"` to perform a full flake check
Applied to files:
flake/ci/scripts/discover-packages.nu.opencode/agent/test.mdlib/nu-lib/flake.nu.opencode/agent/ci-failure.mdflake/dev/scripts/default.nixflake/ci/scripts/libflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Provide the `devenv-root` input override for `nix develop` with path `file+file://$PWD/.devenv/root`
Applied to files:
flake/ci/scripts/discover-packages.nu
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Avoid inline JSON/YAML strings; use `builtins.toJSON` for structured data
Applied to files:
flake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : For multi-output packages, use a let binding to define multiple outputs and register them with inherit syntax in pkgs/default.nix
Applied to files:
flake/ci/scripts/discover-packages.nulib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Always use `inherit` to bring functions and values into scope instead of manual assignment
Applied to files:
flake/ci/scripts/discover-packages.nu
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Ensure all used functions are properly inherited to avoid circular imports and hidden dependencies
Applied to files:
flake/ci/scripts/discover-packages.nulib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Use `let` bindings with `inherit` for importing functions from libraries (e.g., `inherit (lib) mkIf mkEnableOption`)
Applied to files:
flake/ci/scripts/discover-packages.nulib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : Use stdenv.mkDerivation for standard binary packages with required fields: pname, version, src, and meta (description, license, platforms)
Applied to files:
flake/ci/scripts/discover-packages.nu
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to pkgs/default.nix : Custom packages should export their definitions through `pkgs/default.nix`
Applied to files:
flake/ci/scripts/discover-packages.nu
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Always use `mkIf` guards on config sections that are conditionally applied
Applied to files:
flake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Ensure all required options are defined before use in configuration blocks
Applied to files:
flake/ci/scripts/discover-packages.nu
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to **/*.nix : Run `nix fmt` on changed Nix files after modifying modules
Applied to files:
flake/ci/scripts/discover-packages.nu.opencode/agent/test.mdflake/dev/scripts/default.nixAGENTS.mdflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: Applies to **/*.nix : Always ensure formatting is correct by running 'nix fmt' on changed files
Applied to files:
flake/ci/scripts/discover-packages.nu.opencode/agent/test.md.opencode/agent/ci-failure.mdflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : All affected configurations MUST be tested before completing any task, using the test agent and testing skill to identify affected configurations
Applied to files:
.opencode/agent/test.md.woodpecker/ci-hosts.yaml.opencode/agent/ci-failure.md.opencode/skills/testing/SKILL.mdAGENTS.md
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to **/*.nix : Run `nix fmt` to format code before submitting changes
Applied to files:
.opencode/agent/test.mdlib/package.nixflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Code MUST pass `nix fmt` formatting validation
Applied to files:
.opencode/agent/test.mdlib/package.nixflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Applies to **/*.nix : Verify attribute names, imports, and option paths to resolve 'attribute missing' errors in Nix configurations
Applied to files:
.opencode/agent/test.mdflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Use `nix flake check` to evaluate all configurations and run linters
Applied to files:
.opencode/agent/test.mdlib/nu-lib/flake.nu.opencode/agent/ci-failure.mdflake/ci/scripts/libflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Use `nix eval .#nixosConfigurations.<host>.config.system.build.toplevel --apply 'x: "ok"'` to check if Nix expressions evaluate correctly
Applied to files:
.opencode/agent/test.md.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to hosts/**/*.nix : Test at least one affected host configuration before submitting changes
Applied to files:
.opencode/agent/test.md.woodpecker/ci-hosts.yaml.opencode/skills/testing/SKILL.md.github/workflows/ci.yaml.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: Use the module-graph script to determine which hosts and homes are affected by changes
Applied to files:
.opencode/agent/test.md.opencode/skills/testing/SKILL.md
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected host AND one affected home configuration if the changed files affect both
Applied to files:
.opencode/agent/test.md.opencode/skills/testing/SKILL.md
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected home configuration if the changed files affect homes only
Applied to files:
.opencode/agent/test.md.opencode/skills/testing/SKILL.mdAGENTS.md
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected host configuration if the changed files affect hosts only
Applied to files:
.opencode/agent/test.md.opencode/skills/testing/SKILL.md
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: Report test results in the format: Changed Files, Affected Configurations, Tests Run, Results, Issues Found, and Recommendations
Applied to files:
.opencode/agent/test.md
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: When reporting CI failures, explain the root cause clearly, show the specific location (file and line), provide a concrete code fix with explanation, and suggest verification commands to test locally before pushing
Applied to files:
.opencode/agent/test.md
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to flake.{nix,lock} : Verify `flake.lock` conflicts by checking if inputs were updated and ensuring compatibility between updated inputs
Applied to files:
lib/nu-lib/flake.nu.opencode/agent/ci-failure.mdflake/dev/scripts/default.nixflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix flake check --no-build` to verify flake syntax validity without building
Applied to files:
lib/nu-lib/flake.nuflake/ci/scripts/libflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/nixos/** : NixOS flake modules should be organized in the `flake/nixos/` directory
Applied to files:
lib/nu-lib/flake.nuflake/ci/scripts/libAGENTS.md
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Check for infinite recursion by examining recent changes for circular imports between modules or option definitions that reference themselves
Applied to files:
lib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For host-specific changes in hosts/<type>/<hostname>/, build that specific host; if shared files changed, check other hosts of the same type
Applied to files:
.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to hosts/{desktop,laptop,server}/*/default.nix : Host system configurations should follow the pattern `hosts/<type>/<hostname>/default.nix`
Applied to files:
.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to hosts/{desktop,laptop,server}/** : Per-machine NixOS configurations should be organized in `hosts/<type>/<hostname>/` where type is desktop, laptop, or server
Applied to files:
.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Build a host's NixOS system using `nix build .#nixosConfigurations.<host>.config.system.build.toplevel`
Applied to files:
.woodpecker/ci-hosts.yaml.opencode/skills/testing/SKILL.md
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : Use writeShellApplication for shell script wrappers, specifying name, text (via builtins.readFile), and runtimeInputs
Applied to files:
lib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Follow the standard module structure pattern with `config`, `lib`, `pkgs` destructuring, `let` bindings for module configuration, and `options`/`config` sections
Applied to files:
lib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/libAGENTS.mdflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : Documentation in docs/ MUST be updated simultaneously with code changes to .nix files
Applied to files:
lib/package.nixAGENTS.md
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Follow the standard NixOS module structure pattern with config, lib, pkgs parameters and proper `let`/`in` blocks
Applied to files:
lib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Use intermediate bindings instead of deeply nested attribute access for improved readability
Applied to files:
lib/package.nixflake/dev/scripts/default.nixflake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to overlays/default.nix : Expose custom packages via overlays/default.nix by importing the pkgs directory with inputs, lib, and pkgs parameters
Applied to files:
lib/package.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Remove unused let bindings
Applied to files:
flake/dev/scripts/default.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/home-manager/** : Home-Manager flake modules should be organized in the `flake/home-manager/` directory
Applied to files:
flake/ci/scripts/lib
📚 Learning: 2026-03-01T12:24:45.167Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/docs/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:45.167Z
Learning: Applies to docs/src/**/*.md : Create or update Markdown files in `docs/src` following the documentation workflow: analyze changes, identify impact on documentation files, draft content with underscore filenames, update `docs/src/SUMMARY.md`, and verify Nix code examples are valid
Applied to files:
.opencode/skills/testing/SKILL.mdAGENTS.md
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Pull request title should mirror the commit header following conventional commit format
Applied to files:
.mergify.yml
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Commit type should be one of: feat, fix, chore, refactor, build, ci, or style
Applied to files:
.mergify.yml
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Ensure CI passes before requesting review on a pull request
Applied to files:
.mergify.yml
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Applies to **/*.nix : Use `builtins.trace` to add trace statements for seeing values during Nix evaluation, with `builtins.toJSON` for complex attribute sets
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Use `nix eval .#nixosConfigurations.<host>.config.services --apply 'builtins.attrNames'` to diagnose 'attribute not found' errors by listing available attributes
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : When generating JSON, YAML, or other structured formats, define as Nix attribute sets and convert using builtins functions (e.g., `builtins.toJSON`), rather than using inline string literals
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : When generating JSON/YAML, define as Nix attribute sets and convert using `builtins.toJSON` instead of inline strings
Applied to files:
flake/ci/scripts/eval.nixflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : When assertion failures occur, read the assertion message carefully as it explains what configuration constraint is not being met or what required option is missing
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix eval .#...options --apply 'builtins.attrNames'` to list all available options in a Nix namespace
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : When a new module isn't being found, verify the imports list in the parent module, check that the file path is correct (use kebab-case), and ensure the module is syntactically valid
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Applies to **/*.nix : Use `nix fmt` to format Nix code and check syntax
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Run `nix fmt <paths...>` after making any changes to ensure consistent formatting
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : All code MUST be formatted with nix fmt before completing any task
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to pkgs/** : Custom packages and package sets should be located in the `pkgs/` directory with each package having its own `default.nix`
Applied to files:
flake/ci/scripts/default.nix
a0a3211 to
3ad0cae
Compare
There was a problem hiding this comment.
Actionable comments posted: 17
♻️ Duplicate comments (3)
.woodpecker/ci-packages.yaml (1)
77-89:⚠️ Potential issue | 🔴 Critical
when.pathcannot gate a runtime marker file.
.do-buildis created during the pipeline, butwhen.pathis evaluated from SCM changes at trigger time. On push/PR runs this step never sees the marker; on manual runs it can still pass with an empty change-set. Move the guard intocommandsor gate on step status instead.Minimal fix
- name: build-${package} image: registry.racci.dev/lix-woodpecker pull: true depends_on: ["decide-${PACKAGE}"] - when: - path: .do-build environment: BINARY_CACHE_TOKEN: from_secret: BINARY_CACHE_TOKEN commands: |- + if [ ! -f .do-build ]; then + echo "Skipping build for ${PACKAGE} - not affected by changes" + exit 0 + fi nix run .#setup-attic nix run .#archive-flakes -- "." nix-fast-build --no-nom --no-link --attic-cache raccidev --skip-cached --flake ".#packages.x86_64-linux.${PACKAGE}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/ci-packages.yaml around lines 77 - 89, The step definition for build-${package} uses when.path: .do-build which is evaluated at trigger time and cannot detect the runtime marker; update the build-${package} step to remove the when.path guard and instead check for the presence of the .do-build marker inside the commands block (or gate the step via a depends_on/status check from the step that creates .do-build), e.g. change the logic in the commands for the build-${package} step to test for .do-build at runtime and exit/skip if absent or rely on the producing step's status to control execution.lib/nu-lib/lib.nu (1)
26-29:⚠️ Potential issue | 🟠 MajorDon’t log required variable values, and fix the presence test.
This still prints the environment variable contents and checks
($var != null)instead of($value != null), so debug logs can leak secrets while always reporting the variable as present.Minimal fix
- log debug $"Checking required variable of [($value)] - present: \(($var != null)\)" + log debug $"Checking required variable [($var)] - present: (($value != null))"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/nu-lib/lib.nu` around lines 26 - 29, The debug log is leaking env values and uses the wrong presence test; change the log debug in the block that reads let value = $env | get -o $var to not include $value (only the variable name) and use the correct presence expression ($value != null) instead of ($var != null), and ensure the presence check that appends to $missing_vars still triggers when $value == null (keep the existing append $var logic)..woodpecker/checks.yaml (1)
87-104:⚠️ Potential issue | 🔴 CriticalPlease verify the selector syntax handed to
update-matrix.If
update-matrixforwards these strings tonix eval --apply, the current values on Lines 92 and 104 are invalid:builtins.filterworks on lists,|>is not Nix syntax, and the update-packages selector also uses.#package/update-scriptinstead of.#packages/updateScript. That would leave both package matrix refresh steps empty or failing.Based on learnings: "Include passthru.updateScript in package definitions using nix-update-script with extraArgs for automatic update support."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/checks.yaml around lines 87 - 104, The selector strings passed to update-matrix are invalid Nix: remove the illegal |> and replace the list-based builtins.filter usage with attribute-set helpers (e.g. builtins.filterAttrs + builtins.attrNames) and point at the correct package set names and passthru key; specifically update the first selector to target .#packages.x86_64-linux and use builtins.attrNames over a builtins.filterAttrs predicate that checks p.passthru.discovery, and update the second selector to target .#packages.x86_64-linux and test p.passthru.updateScript (not update-script) so nix eval --apply receives valid Nix expressions; keep these changes localized to the strings passed to update-matrix.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.mergify.yml:
- Line 51: The PR title regex in the .mergify.yml rule ("title ~=
^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\(.+\\))?:")
rejects Conventional Commit breaking-change headers that include `!`; update
that regex so an optional `!` is allowed either after the type or after the
scope (i.e., allow `feat!:` and `feat(scope)!:`) by modifying the pattern to
accept an optional `!` before the colon in the title validation rule.
In @.woodpecker/checks.yaml:
- Around line 36-42: The "Run flake checks" Woodpecker step currently has
failure: ignore which silences nix flake check failures; update the step named
"Run flake checks" to remove or set failure to false so that the commands: nix
flake check will fail the pipeline on errors, and if you still need matrix
refresh to continue create a separate non-blocking step/pipeline (e.g., a
distinct job without failure: false) to run any non-critical tasks.
- Around line 123-128: The check uses git diff --name-only HEAD~1 (assigned to
CHANGED_FILES) which compares against the previous commit and can include prior
changes; update the invocation to compare the working tree against HEAD instead
(use git diff --name-only HEAD) so CHANGED_FILES only reflects current
working-tree changes before creating the branch and committing the matrix files
(refer to CHANGED_FILES and the git diff call in the block that then runs git
checkout -b $BRANCH, git add, git commit).
- Around line 158-161: The environment block in the "Create/Update PR" step uses
a non-existent YAML anchor `<<: *env`, causing BASE_BRANCH and BRANCH to be
undefined; replace the merge key with explicit environment variables: define
BASE_BRANCH and BRANCH (and any other env vars the step expects) directly under
the environment mapping and keep GITHUB_TOKEN: from_secret: GITHUB_TOKEN so the
commands referencing BASE_BRANCH and BRANCH work correctly (locate the
`environment:` block in the step to update).
In @.woodpecker/ci-homes.yaml:
- Line 36: The invocation of the detect-affected-outputs tool in the AFFECTED
assignment is missing the required positional type argument; update the call to
include the output type (e.g., "homeConfigurations") immediately after the "--"
so the command becomes nix run .#detect-affected-outputs -- homeConfigurations
--json --range "$${RANGE}" --outputs ["$${HOME}"] (also adjust the flag name
from --output to --outputs and pass HOME as an array if your script expects
--outputs), leaving the rest of the variables (RANGE, HOME) unchanged and
ensuring the command uses detect-affected-outputs as shown.
- Around line 36-37: The detect-affected-outputs invocation is missing the
required first positional argument and uses the wrong flags and JSON handling;
update the call that sets AFFECTED (the line invoking "nix run
.#detect-affected-outputs") to pass the appropriate first arg
("homeConfigurations"), remove the invalid "--output" flag, change the fallback
from echo "[]" to echo "{}" so the fallback is an object, and change the jq
check on the next line from index($home) to has($home) to test object keys;
apply the analogous change in ci-hosts.yaml by using "nixosConfigurations" as
the first positional argument and the same JSON/fallback/jq fixes for that
file's AFFECTED and jq usage.
In @.woodpecker/ci-hosts.yaml:
- Around line 43-45: The jq test is wrong for the JSON emitted by
detect-affected-outputs (it emits an object keyed by output name), so change the
condition that currently uses "index($host)" to instead use "has($host)" and
ensure AFFECTED falls back to an empty object on errors (e.g., replace the
current capture logic so the command returns "{}" on failure); update the jq
invocation that checks the host to use has($host) against that object
(referencing the AFFECTED variable and the detect-affected-outputs invocation)
so affected hosts are detected correctly.
In @.woodpecker/ci-packages.yaml:
- Around line 60-61: The discover-packages invocation that sets AFFECTED must
include the --json flag so it emits a JSON array for jq to parse; update the
command that runs "nix run .#discover-packages -- \"$${RANGE}\" \"$${PACKAGE}\""
to pass the --json option (e.g. "nix run .#discover-packages -- --json
\"$${RANGE}\" \"$${PACKAGE}\"") so AFFECTED contains JSON and the subsequent jq
index check works correctly for changed-package detection.
In `@flake/ci/scripts/default.nix`:
- Around line 38-41: discover-packages fails at runtime because the Nu script
discover-packages.nu invokes the fd binary but writeNuApplicationWithLibs
currently only injects jq/nix/git/busybox; update the discover-packages
derivation that uses writeNuApplicationWithLibs to include fd in its runtime
inputs (add fd to the packages/lib list passed into writeNuApplicationWithLibs
or to an extraPackages/runtimeInputs argument) so the fd binary is present when
running nix run .#discover-packages.
In `@flake/ci/scripts/eval.nix`:
- Around line 77-81: The position resolution can fail when neither src nor
pkg.meta.position exist; update the logic in the position assignment to
defensively check both sources before calling sanitizePosition/positionFromMeta:
first use a safe check (e.g., builtins.hasAttr "src" pkg and confirm
builtins.unsafeGetAttrPos "src" pkg != null) and if that fails, verify pkg.meta
and pkg.meta.position exist (e.g., builtins.hasAttr "meta" pkg &&
builtins.hasAttr "position" pkg.meta) before calling positionFromMeta, and
provide a safe fallback (null or a default position) if neither is present;
adjust references to position, sanitizePosition, builtins.unsafeGetAttrPos "src"
pkg, and positionFromMeta accordingly.
- Around line 48-54: The current pkg assignment can become null if
tryGetAttrPath(attributePath, packages) and tryGetAttrPath(attributePath, flake)
both fail, causing later accesses (pkg.src, pkg.meta.position) to crash; modify
the logic around packagesResult/tryGetAttrPath to explicitly detect when neither
lookup succeeded and throw a clear error (including attributePath and system) or
return a non-null sentinel before using pkg, e.g. replace the final else branch
with a failure path that raises an informative error when both lookups fail so
subsequent code never observes a null pkg.
In `@flake/ci/scripts/update-matrix.nu`:
- Line 7: Rename the misspelled parameter eval_expresion to eval_expression
throughout the script: update the parameter declaration (where eval_expresion is
defined) and all usages/calls that reference it (e.g., the places later in the
file that currently reference eval_expresion on lines following the
declaration). Make sure function signatures, variable references, and any
documentation/comments use the corrected name eval_expression so the parameter
name is consistent everywhere.
- Line 46: The script uses a non-existent Nushell command `update-in` when
constructing `updated_yaml`; replace the call that pipes `$yaml` into
`update-in` with Nushell's standard `update` using a cell-path (i.e., call
`update` with the path composed of "matrix" and `$matrix_key`) and pass
`$new_matrix` as the new value so the pipeline becomes: pipe `$yaml` into
`update` with the cell-path ["matrix", $matrix_key] and `$new_matrix`, updating
the `updated_yaml` assignment accordingly.
In `@lib/nu-lib/flake.nu`:
- Around line 183-209: Remove unused locals and ensure temp files are cleaned up
in the check_file_changed logic: drop the unused head_commit and the redundant
has_changed variable (they're defined but never used), and when creating temp
files via mktemp (old_file) make sure to delete/unlink them after use (or use a
scoped/temp-file helper) so they don't leak; also simplify the loop over
git_file_diffs to directly compare nix hashes and append to changed_files when
different (refer to symbols git_file_diffs, changed_files, old_file, mktemp,
head_commit, has_changed, and the surrounding loop in check_file_changed).
- Around line 158-165: The variable head_commit defined in the flake.nu snippet
is unused—remove the let head_commit = $split_range | last line (or use it where
intended) and ensure the temporary file created as prev_lock_file is cleaned up
after use: when root_flake_changed is true and after git show writes to
$prev_lock_file and any subsequent processing, delete/unlink $prev_lock_file (or
use a safe temp-file pattern/trap) so the temp file is not left behind;
reference the symbols head_commit, prev_commit, prev_lock_file, and
root_flake_changed when applying the changes.
In `@lib/package.nix`:
- Around line 63-68: The checkPhase is being used to perform installation (mkdir
-p "$out/bin/lib" and copying files via find ${libStore} ... cp -t
"$out/bin/lib"), which violates the convention that checkPhase runs
tests/validation; move this logic into the proper install step (e.g. implement
an installPhase or use postInstallHook to create $out/bin/lib and copy files
from ${libStore}), or if this is inside a writeTextFile derivation use the
buildPhase/installPhase instead; if you intentionally must repurpose checkPhase,
add a clear comment above checkPhase explaining why and set checkPhase to a
no-op (:) when tests are absent to avoid confusion.
---
Duplicate comments:
In @.woodpecker/checks.yaml:
- Around line 87-104: The selector strings passed to update-matrix are invalid
Nix: remove the illegal |> and replace the list-based builtins.filter usage with
attribute-set helpers (e.g. builtins.filterAttrs + builtins.attrNames) and point
at the correct package set names and passthru key; specifically update the first
selector to target .#packages.x86_64-linux and use builtins.attrNames over a
builtins.filterAttrs predicate that checks p.passthru.discovery, and update the
second selector to target .#packages.x86_64-linux and test
p.passthru.updateScript (not update-script) so nix eval --apply receives valid
Nix expressions; keep these changes localized to the strings passed to
update-matrix.
In @.woodpecker/ci-packages.yaml:
- Around line 77-89: The step definition for build-${package} uses when.path:
.do-build which is evaluated at trigger time and cannot detect the runtime
marker; update the build-${package} step to remove the when.path guard and
instead check for the presence of the .do-build marker inside the commands block
(or gate the step via a depends_on/status check from the step that creates
.do-build), e.g. change the logic in the commands for the build-${package} step
to test for .do-build at runtime and exit/skip if absent or rely on the
producing step's status to control execution.
In `@lib/nu-lib/lib.nu`:
- Around line 26-29: The debug log is leaking env values and uses the wrong
presence test; change the log debug in the block that reads let value = $env |
get -o $var to not include $value (only the variable name) and use the correct
presence expression ($value != null) instead of ($var != null), and ensure the
presence check that appends to $missing_vars still triggers when $value == null
(keep the existing append $var logic).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 90c89d94-5c37-4a07-9a63-28698556baf1
📒 Files selected for processing (42)
.github/actions/setup-nix/action.yaml.github/workflows/ci.yaml.github/workflows/docs.yaml.github/workflows/packages.yaml.github/workflows/update-packages.yaml.gitignore.mergify.yml.opencode/agent/ci-failure.md.opencode/agent/test.md.opencode/skills/testing/SKILL.md.woodpecker/check-upstream-todos.yaml.woodpecker/check.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.woodpecker/ci-packages.yaml.woodpecker/flake-checker.yaml.woodpecker/lix.yaml.woodpecker/security.yaml.woodpecker/update-packages.yaml.woodpecker/update.yamlAGENTS.mddocs/search.nixdocs/serve.nixdocs/site.nixflake/ci/scripts/default.nixflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nixflake/ci/scripts/libflake/ci/scripts/setup-attic.nuflake/ci/scripts/update-matrix.nuflake/dev/scripts/default.nixflake/dev/scripts/libflake/dev/treefmt.nixlib/nu-lib/flake.nulib/nu-lib/lib.nulib/package.nixpkgs/drive-stats/default.nixpkgs/helpers/new-host.nixpkgs/list-ephemeral/default.nixpkgs/lix-woodpecker/default.nix
💤 Files with no reviewable changes (8)
- .github/workflows/docs.yaml
- .woodpecker/check-upstream-todos.yaml
- .github/actions/setup-nix/action.yaml
- .woodpecker/flake-checker.yaml
- .woodpecker/check.yaml
- .github/workflows/update-packages.yaml
- .github/workflows/packages.yaml
- .woodpecker/security.yaml
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (2)
.woodpecker/ci-homes.yaml (1)
36-37:⚠️ Potential issue | 🔴 CriticalJSON output format mismatch: script returns object, not array.
Per the
detect-affected-outputs.nuimplementation (context snippet 3), the JSON output is an object with output names as keys, not an array. Two fixes needed:
- Line 36: Fallback should be
echo "{}"notecho "[]"- Line 37: Use
has($home)instead ofindex($home)to check object keys🐛 Proposed fix
- AFFECTED=$(nix run .#detect-affected-outputs -- homeConfigurations --json --range "$${RANGE}" "$${HOME}" 2>/dev/null || echo "[]") - if echo "$${AFFECTED}" | jq -e --arg home "$${HOME}" 'index($home)' > /dev/null 2>&1; then + AFFECTED=$(nix run .#detect-affected-outputs -- homeConfigurations --json --range "$${RANGE}" "$${HOME}" 2>/dev/null || echo "{}") + if echo "$${AFFECTED}" | jq -e --arg home "$${HOME}" 'has($home)' > /dev/null 2>&1; then🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/ci-homes.yaml around lines 36 - 37, The script assigns AFFECTED from the detect-affected-outputs run but treats it as an array; change the fallback from echo "[]" to echo "{}" so AFFECTED is an empty JSON object, and update the jq test that currently uses index($home) to has($home) so it checks object keys correctly (i.e., adjust the AFFECTED assignment and replace the jq expression 'index($home)' with 'has($home)').lib/nu-lib/lib.nu (1)
12-15:⚠️ Potential issue | 🔴 CriticalRemove invalid
log set-levelcommand — use$env.NU_LOG_LEVELenvironment variable instead.The
log set-levelcommand does not exist in Nushell's std/log module. Log levels are controlled by setting the$env.NU_LOG_LEVELenvironment variable. Valid values are DEBUG, INFO, WARN, ERROR, or CRITICAL (or their numeric equivalents: 0, 20, 30, 40, 50).Also, line 14 references
$env.NU_LOG_LEVELbefore it's set, so it will show an undefined or stale value.Suggested fix
export def --env setup_logging [] { - log set-level (if $env.DEBUG? == true { 10 } else { 20 }) - log info $"Logging initialized. Level: ($env.NU_LOG_LEVEL)" + $env.NU_LOG_LEVEL = (if $env.DEBUG? == true { "DEBUG" } else { "INFO" }) + log info $"Logging initialized. Level: ($env.NU_LOG_LEVEL)" $env.NU_LOG_FORMAT = "%ANSI_START%%LEVEL%|%MSG%%ANSI_STOP%" }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/nu-lib/lib.nu` around lines 12 - 15, In setup_logging, remove the invalid call to "log set-level" and instead set the $env.NU_LOG_LEVEL environment variable based on $env.DEBUG? (map true -> "DEBUG" or numeric if you prefer, otherwise "INFO") before calling log info; update the code that references $env.NU_LOG_LEVEL so it reads the value after you assign it, and keep the $env.NU_LOG_FORMAT assignment as-is (or set it after NU_LOG_LEVEL) so logging uses the correct format. Ensure you update the export def --env setup_logging block and the references to $env.DEBUG?, $env.NU_LOG_LEVEL, and the log info call accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.woodpecker/checks.yaml:
- Line 28: The "Build flake checks" pipeline step currently uses the setting
`failure: ignore`, which suppresses failures; update the pipeline step (the
"Build flake checks" entry) to not ignore failures—either remove the `failure:
ignore` line or change it to a failing behavior (e.g., `failure: fail`) so that
flake check failures will fail the build and surface real issues.
- Line 122: The YAML currently creates a new anchor with "branch: &branch"
instead of referencing the existing anchor; change that token to reference the
previously defined anchor by replacing "&branch" with "*branch" so the "branch"
key uses the existing anchor named "branch" (i.e., make "branch: *branch" where
"branch: &branch" currently appears).
In @.woodpecker/ci-packages.yaml:
- Line 77: The step name currently uses the wrong variable case
("build-${package}") which won't be interpolated because the matrix defines
"PACKAGE" (uppercase); change the step name to use the correct variable case
"build-${PACKAGE}" so it matches the matrix key and the substitution works as
intended.
In `@flake/ci/scripts/update-matrix.nu`:
- Line 46: The update call is passing a string as the path
(`$"matrix.($matrix_key)"`) which fails because nushell's update expects a
cell-path; instead construct a cell-path from that string and pass it to update.
Build the path by creating the string $"matrix.($matrix_key)", pipe it through
split row '.' and convert to a cell-path, then call update with $yaml, the
resulting cell-path, and $new_matrix (use the variables updated_yaml, $yaml,
$matrix_key, and $new_matrix to locate and replace the current line).
---
Duplicate comments:
In @.woodpecker/ci-homes.yaml:
- Around line 36-37: The script assigns AFFECTED from the
detect-affected-outputs run but treats it as an array; change the fallback from
echo "[]" to echo "{}" so AFFECTED is an empty JSON object, and update the jq
test that currently uses index($home) to has($home) so it checks object keys
correctly (i.e., adjust the AFFECTED assignment and replace the jq expression
'index($home)' with 'has($home)').
In `@lib/nu-lib/lib.nu`:
- Around line 12-15: In setup_logging, remove the invalid call to "log
set-level" and instead set the $env.NU_LOG_LEVEL environment variable based on
$env.DEBUG? (map true -> "DEBUG" or numeric if you prefer, otherwise "INFO")
before calling log info; update the code that references $env.NU_LOG_LEVEL so it
reads the value after you assign it, and keep the $env.NU_LOG_FORMAT assignment
as-is (or set it after NU_LOG_LEVEL) so logging uses the correct format. Ensure
you update the export def --env setup_logging block and the references to
$env.DEBUG?, $env.NU_LOG_LEVEL, and the log info call accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8891e0c1-d766-4600-88f7-0b83cc9dd038
📒 Files selected for processing (8)
.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-packages.yamlflake/ci/scripts/default.nixflake/ci/scripts/update-matrix.nulib/nu-lib/flake.nulib/nu-lib/lib.nulib/package.nix
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Mergify Merge Protections
- GitHub Check: Summary
🧰 Additional context used
📓 Path-based instructions (2)
flake/ci/**
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
CI-specific flake definitions and scripts should be located in the
flake/ci/directory
Files:
flake/ci/scripts/update-matrix.nuflake/ci/scripts/default.nix
**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/building/SKILL.md)
Use
nix fmtto format Nix code and check syntax
**/*.nix: Runnix fmt <paths...>after making any changes to ensure consistent formatting
Use 2 spaces for indentation in Nix files
Use kebab-case for Nix file and directory names
Use camelCase for Nix attributes (e.g.,myOption,enableFeature)
Use camelCase for Nix option paths (e.g.,services.myService.enable)
Prefer minimal comments; code should be self-explanatory, using comments to explain why, not what
Prefer relative imports over absolute imports (e.g.,./modules/foo.nix)
Group imports at the top of the Nix file and use list format for multiple imports
When generating JSON, YAML, or other structured formats, define as Nix attribute sets and convert using builtins functions (e.g.,builtins.toJSON), rather than using inline string literals
Follow the standard module structure pattern withconfig,lib,pkgsdestructuring,letbindings for module configuration, andoptions/configsections
Useletbindings withinheritfor importing functions from libraries (e.g.,inherit (lib) mkIf mkEnableOption)Run
nix fmtto format code before submitting changes
**/*.nix: Usebuiltins.traceto add trace statements for seeing values during Nix evaluation, withbuiltins.toJSONfor complex attribute sets
Check for circular dependencies in imports or option definitions as the root cause of infinite recursion errors in Nix
Verify attribute names, imports, and option paths to resolve 'attribute missing' errors in Nix configurationsRun
nix fmton changed Nix files after modifying modules
**/*.nix: Declare secrets in Nix usingsops.secretswith the secret path as the key
Specify custom permissions for secrets usingowner,group, andmodeattributes in sops.secrets declarations
Usesops.templatesto combine multiple secrets into configuration files with placeholders
AddrestartUnitsto secret declarations to automatically restart services when secrets change
Use empty `k...
Files:
lib/package.nixflake/ci/scripts/default.nix
🧠 Learnings (64)
📓 Common learnings
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Run `nix fmt <changed-files>` to fix Nix formatting failures in CI checks
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to home/**/*.nix : Test at least one affected home configuration before submitting changes
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to {flake.nix,flake.lock} : Run `nix flake check` (with devenv-root override) before submitting changes
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to **/*.nix : Run `nix fmt` to format code before submitting changes
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to {flake.nix,flake.lock} : Run `nix flake check` (with devenv-root override) before submitting changes
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/ci-packages.yaml.woodpecker/checks.yamllib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to flake.nix : Use `./flake/ci/detect-affected-outputs.nu nixosConfigurations --json` and `./flake/ci/detect-affected-outputs.nu homeConfigurations --json` to identify which outputs are affected by dirty files in CI
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/ci-packages.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yamllib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Use `nix flake check` to evaluate all configurations and run linters
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/checks.yamllib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For flake.nix or flake.lock changes, run a full flake check in addition to building representative configs
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/ci-packages.yaml.woodpecker/checks.yamllib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root"` to perform a full flake check
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/checks.yamllib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Run `nix fmt <changed-files>` to fix Nix formatting failures in CI checks
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/ci-packages.yaml.woodpecker/checks.yamllib/package.nix.woodpecker/ci-homes.yamllib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to flake.{nix,lock} : Verify `flake.lock` conflicts by checking if inputs were updated and ensuring compatibility between updated inputs
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/checks.yamllib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to **/*.nix : Run `nix fmt` on changed Nix files after modifying modules
Applied to files:
flake/ci/scripts/update-matrix.nu
📚 Learning: 2026-03-01T12:24:45.167Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/docs/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:45.167Z
Learning: Applies to docs/src/**/*.md : Create or update Markdown files in `docs/src` following the documentation workflow: analyze changes, identify impact on documentation files, draft content with underscore filenames, update `docs/src/SUMMARY.md`, and verify Nix code examples are valid
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Use `nix eval .#nixosConfigurations.<host>.config.system.build.toplevel --apply 'x: "ok"'` to check if Nix expressions evaluate correctly
Applied to files:
flake/ci/scripts/update-matrix.nu.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to home/**/*.nix : Test at least one affected home configuration before submitting changes
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yamllib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting only homes, build at least one affected home configuration using 'nix build .#homeConfigurations.<user>@<host>.activationPackage'
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : All affected configurations MUST be tested before completing any task, using the test agent and testing skill to identify affected configurations
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/checks.yamllib/package.nix.woodpecker/ci-homes.yamllib/nu-lib/lib.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Avoid hardcoded paths that should be configurable options
Applied to files:
.woodpecker/ci-packages.yamllib/package.nix.woodpecker/ci-homes.yamllib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-18T23:46:49.905Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: .woodpecker/lix.yaml:15-15
Timestamp: 2026-03-18T23:46:49.905Z
Learning: In nix-config repository (.woodpecker/*.yaml), image references intentionally omit explicit tags or digests (e.g., registry.racci.dev/lix-woodpecker without :tag). Do not flag or suggest adding explicit tags or digests to these image references; treat such omissions as intentional and maintain consistency across the CI config.
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Always use `mkIf` guards on config sections that are conditionally applied
Applied to files:
.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Avoid inline JSON/YAML strings; use `builtins.toJSON` for structured data
Applied to files:
.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Code MUST pass `nix fmt` formatting validation
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/checks.yamllib/package.nix.woodpecker/ci-homes.yamllib/nu-lib/lib.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to hosts/**/*.nix : Test at least one affected host configuration before submitting changes
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: Applies to **/*.nix : Always ensure formatting is correct by running 'nix fmt' on changed files
Applied to files:
.woodpecker/ci-packages.yamllib/package.nixlib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : When generating JSON/YAML, define as Nix attribute sets and convert using `builtins.toJSON` instead of inline strings
Applied to files:
.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel` to test a host configuration
Applied to files:
.woodpecker/ci-packages.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/ci/** : CI-specific flake definitions and scripts should be located in the `flake/ci/` directory
Applied to files:
.woodpecker/checks.yamlflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake.nix : Top-level flake definitions and inputs/outputs configuration should be placed in `flake.nix`
Applied to files:
.woodpecker/checks.yamllib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : Include passthru.updateScript in package definitions using nix-update-script with extraArgs for automatic update support
Applied to files:
.woodpecker/checks.yamlflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Ensure all used functions are properly inherited to avoid circular imports and hidden dependencies
Applied to files:
.woodpecker/checks.yamllib/package.nixlib/nu-lib/lib.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix flake check --no-build` to verify flake syntax validity without building
Applied to files:
.woodpecker/checks.yamllib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Use `let` bindings with `inherit` for importing functions from libraries (e.g., `inherit (lib) mkIf mkEnableOption`)
Applied to files:
lib/package.nixlib/nu-lib/lib.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : Use writeShellApplication for shell script wrappers, specifying name, text (via builtins.readFile), and runtimeInputs
Applied to files:
lib/package.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Follow the standard module structure pattern with `config`, `lib`, `pkgs` destructuring, `let` bindings for module configuration, and `options`/`config` sections
Applied to files:
lib/package.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Follow the standard NixOS module structure pattern with config, lib, pkgs parameters and proper `let`/`in` blocks
Applied to files:
lib/package.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Use intermediate bindings instead of deeply nested attribute access for improved readability
Applied to files:
lib/package.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Verify option type definitions match their usage and configuration values
Applied to files:
lib/package.nix.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Applies to **/*.nix : Use `nix fmt` to format Nix code and check syntax
Applied to files:
lib/package.nix
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to **/*.nix : Run `nix fmt` to format code before submitting changes
Applied to files:
lib/package.nixlib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : All code MUST be formatted with nix fmt before completing any task
Applied to files:
lib/package.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to overlays/default.nix : Expose custom packages via overlays/default.nix by importing the pkgs directory with inputs, lib, and pkgs parameters
Applied to files:
lib/package.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : For multi-output packages, use a let binding to define multiple outputs and register them with inherit syntax in pkgs/default.nix
Applied to files:
lib/package.nixflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting both hosts and homes, build one host AND one home configuration to ensure no regressions
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Build a Home-Manager activation using `nix build .#homeConfigurations.<user>@<host>.activationPackage`
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For home-specific changes in home/<user>/, build that user's home config on one host; if shared home files changed, test on multiple hosts
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting only hosts, build at least one affected host configuration using 'nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel'
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Verify type mismatches by checking option type definitions and the value being provided in NixOS options
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected home configuration if the changed files affect homes only
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected host AND one affected home configuration if the changed files affect both
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Test user configuration using `nix build .#homeConfigurations.<username>.activationPackage` or `home-manager build --flake .#<username>` before deployment
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix build .#homeConfigurations."<user>@<host>".activationPackage` to test a home configuration
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Build a host's NixOS system using `nix build .#nixosConfigurations.<host>.config.system.build.toplevel`
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix flake show` to display the structure and available outputs in a Nix flake
Applied to files:
lib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Provide the `devenv-root` input override for `nix flake check` with path `file+file://$PWD/.devenv/root`
Applied to files:
lib/nu-lib/flake.nu
📚 Learning: 2026-03-23T09:37:43.263Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: flake/ci/scripts/setup-attic.nu:20-21
Timestamp: 2026-03-23T09:37:43.263Z
Learning: In `flake/ci/scripts/setup-attic.nu`, the netrc file path (e.g. `/tmp/netrc`) must always be explicitly defined in code on both the write and read sides, so using a predictable location is intentional and unavoidable. Flagging this as a security issue is not applicable in this context.
Applied to files:
lib/nu-lib/flake.nulib/nu-lib/lib.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake.lock : The `flake.lock` file must be committed to version control to maintain reproducible builds
Applied to files:
lib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Remove unused let bindings
Applied to files:
lib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: Use git status and git diff commands to identify changed files before testing
Applied to files:
lib/nu-lib/flake.nu
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Check for infinite recursion by examining recent changes for circular imports between modules or option definitions that reference themselves
Applied to files:
lib/nu-lib/flake.nulib/nu-lib/lib.nu
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/nixos/** : NixOS flake modules should be organized in the `flake/nixos/` directory
Applied to files:
lib/nu-lib/flake.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Avoid using `with` at module level as it pollutes scope and hides dependencies
Applied to files:
lib/nu-lib/lib.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : When a new module isn't being found, verify the imports list in the parent module, check that the file path is correct (use kebab-case), and ensure the module is syntactically valid
Applied to files:
lib/nu-lib/lib.nuflake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Always use `inherit` to bring functions and values into scope instead of manual assignment
Applied to files:
lib/nu-lib/lib.nu
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix log` command to view build logs for failed derivations to diagnose build errors
Applied to files:
lib/nu-lib/lib.nu
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Use `nix log <drv>` to view build logs when troubleshooting failed builds
Applied to files:
lib/nu-lib/lib.nu
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Applies to **/*.nix : Verify attribute names, imports, and option paths to resolve 'attribute missing' errors in Nix configurations
Applied to files:
flake/ci/scripts/default.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Applies to **/*.nix : Check for circular dependencies in imports or option definitions as the root cause of infinite recursion errors in Nix
Applied to files:
flake/ci/scripts/default.nix
🔇 Additional comments (17)
.woodpecker/checks.yaml (3)
39-45:nix flake checkfailures are silently ignored.With
failure: ignoreon the "Run flake checks" step (line 42), a broken flake will result in a green CI. This was previously flagged. Consider removing this once the pipeline is stable.
135-138: YAML anchor*envis now properly defined.The
&envanchor at lines 2-4 definesBASE_BRANCHandBRANCH, so the<<: *envmerge at line 136 will work correctly. This addresses the previous critical issue.
90-95: Experimental pipe operator feature is already enabled in the CI image.The
lix-woodpeckerimage used in.woodpecker/checks.yamlincludespipe-operatorsin itsextra-experimental-featuresconfiguration, so no additional setup is required. The code at lines 95 and 107 will evaluate correctly.> Likely an incorrect or invalid review comment.flake/ci/scripts/update-matrix.nu (1)
1-51: LGTM with the fixes from previous reviews.The script correctly implements matrix updating logic:
- Parameter typo fixed (
eval_expression)- Uses standard
updateinstead of non-existentupdate-in- Proper validation for workflow file existence and YAML structure
- Handles deduplication and sorting of matrix entries
lib/package.nix (2)
64-70: Clarifying comment addresses the checkPhase usage concern.The comment at line 64 explains that
checkPhaseis repurposed becausewriteTextFiledoesn't supportbuildPhase. This is an acceptable workaround given the constraints of the derivation builder being used.
24-36: Good refactor to support shared library sources.The new
libSourceparameter and computedlibStore/sourceStorepaths enable cleaner sharing of Nu library code across CI and dev scripts. The fallback tosourceStore + "/lib"whenlibSourceis null maintains backwards compatibility.lib/nu-lib/lib.nu (1)
19-40: Security and correctness fixes from previous reviews applied.The
check_required_varsfunction now:
- Logs only variable presence, not values (line 26) — addresses token leakage concern
- Exits with code 1 when required vars are missing (line 36) — ensures CI fails correctly
lib/nu-lib/flake.nu (3)
141-152:get_flake_inputnow correctly uses theinput_nameparameter.The jq invocation properly passes
--arg input_name $input_nameand uses$input_namethroughout the query instead of hardcodingnixpkgs. This addresses the previous review concern.
154-177: Temp file cleanup and unused variable removal applied.
- Unused
head_commitvariable removedrm -f $prev_lock_fileadded at line 166 for proper cleanup
179-212:check_file_changedimprovements applied.
- Unused
head_commitandhas_changedvariables removed- Temp file cleanup via
rm -f $old_fileat line 203flake/ci/scripts/default.nix (3)
33-36: Missingnameparameter now provided.The
detect-affected-outputsdefinition now correctly includesname = "detect-affected-outputs", addressing the previous critical issue.
38-44:fdruntime dependency now included.The
discover-packagesoutput now correctly specifiesruntimeInputs = [ pkgs.fd ]to support thefd --type finvocation in the Nushell script.
8-9: Good refactoring with sharedlibSourceandsourceRoot.Centralising these bindings and using
inheritacross all script definitions reduces duplication and ensures consistency..woodpecker/ci-packages.yaml (2)
60-60:--jsonflag now included fordiscover-packages.This addresses the previous critical issue where jq parsing would fail without JSON output.
84-88: Correct approach: file-based gating in commands instead ofwhen.path.The
.do-buildmarker check is correctly placed in thecommandssection rather than usingwhen.path, which only evaluates git changesets at trigger time..woodpecker/ci-homes.yaml (2)
61-64: Correct approach: file-based gating in commands.The
.do-buildcheck is correctly implemented in the commands section rather than usingwhen.path, which wouldn't detect runtime-created files.
66-68: LGTM: Build steps use correct flake output path.The build commands correctly invoke
setup-attic,archive-flakes, and build the home configuration using the proper flake output path.#homeConfigurations.${HOME}.activationPackage.
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (2)
.woodpecker/ci-hosts.yaml (1)
40-48:⚠️ Potential issue | 🔴 CriticalMissing required
nixosConfigurationsargument and incorrect flag name.The
detect-affected-outputsscript requires a positionaltypeargument as the first parameter (seeflake/ci/scripts/detect-affected-outputs.nuline 8:type: string). Additionally:
- Uses
--output(singular) but the script expects--outputs(plural)jq 'index($host)'expects an array but the script returns an object keyed by output name🐛 Proposed fix
RANGE="$${CI_PREV_COMMIT_SHA}..$${CI_COMMIT_SHA}" - AFFECTED=$(nix run .#detect-affected-outputs -- --json --range "$${RANGE}" --output "$${HOST}" 2>/dev/null || echo "[]") - if echo "$${AFFECTED}" | jq -e --arg host "$${HOST}" 'index($host)' > /dev/null 2>&1; then + AFFECTED=$(nix run .#detect-affected-outputs -- nixosConfigurations --json --range "$${RANGE}" --outputs "$${HOST}" 2>/dev/null || echo "{}") + if echo "$${AFFECTED}" | jq -e --arg host "$${HOST}" 'has($host)' > /dev/null 2>&1; then🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/ci-hosts.yaml around lines 40 - 48, The detect-affected-outputs invocation is missing its required positional "type" argument and uses the wrong flag/JSON test: pass the required type as the first argument to the script invocation, replace the singular --output with --outputs, and change the jq test that currently uses index($host) to test for object keys (e.g. has($host)) so it works with the object keyed by output name; update the call that sets AFFECTED and the conditional that checks it (references: detect-affected-outputs script, variables RANGE, HOST, AFFECTED, and SHOULD_BUILD)..woodpecker/ci-homes.yaml (1)
42-50:⚠️ Potential issue | 🔴 CriticalJSON output mismatch:
detect-affected-outputsreturns an object, not an array.From
flake/ci/scripts/detect-affected-outputs.nulines 209-228, the--jsonoutput is an object keyed by output name (e.g.,{"racci": ["file1.nix", ...]}), not an array. Thejq 'index($home)'function only works on arrays.Additionally,
$${HOME}is passed as a positional argument which becomes a file path filter, not an output filter. Use--outputsto filter specific outputs.🐛 Proposed fix
RANGE="$${CI_PREV_COMMIT_SHA}..$${CI_COMMIT_SHA}" - AFFECTED=$(nix run .#detect-affected-outputs -- homeConfigurations --json --range "$${RANGE}" "$${HOME}" 2>/dev/null || echo "[]") - if echo "$${AFFECTED}" | jq -e --arg home "$${HOME}" 'index($home)' > /dev/null 2>&1; then + AFFECTED=$(nix run .#detect-affected-outputs -- homeConfigurations --json --range "$${RANGE}" --outputs "$${HOME}" 2>/dev/null || echo "{}") + if echo "$${AFFECTED}" | jq -e --arg home "$${HOME}" 'has($home)' > /dev/null 2>&1; then🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/ci-homes.yaml around lines 42 - 50, The script assumes detect-affected-outputs --json returns an array; instead treat it as an object: call the tool with --outputs "$HOME" (not as a positional arg) so it filters by output name, set AFFECTED to "{}" on failure, and change the jq test to check for an object key (e.g., use jq -e --arg home "$HOME" 'has($home)') to decide whether to set SHOULD_BUILD; update references to RANGE, AFFECTED, HOME, detect-affected-outputs, and SHOULD_BUILD accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.woodpecker/checks.yaml:
- Around line 134-139: The echo uses an undefined ${PACKAGE} in the commands
block (the git rev-parse HEAD ... grep check), causing an empty/invalid
substitution; fix by either exporting/setting PACKAGE earlier in the pipeline or
by removing/rewriting the variable from the message (e.g., change the echo to a
generic message like "No changes detected, skipping PR creation.") and ensure
any chosen name matches the environment variable you actually set (reference the
commands block and the PACKAGE symbol when making the change).
- Around line 86-101: The current Nix expressions call builtins.filter on
.#packages.x86_64-linux (an attrset), causing a type error; replace the pattern
with builtins.filterAttrs and then extract names with builtins.attrNames. For
example, change uses of builtins.filter (...) |> builtins.attrNames to
builtins.attrNames (builtins.filterAttrs .#packages.x86_64-linux (name: pkg:
<predicate using pkg>)), and apply this to both occurrences (the discovery
predicate and the p.passthru ? update-script predicate) so you filter the
attrset correctly before converting to a list of package names.
In `@flake/ci/scripts/eval.nix`:
- Around line 67-75: The pattern match in positionFromMeta can return null
causing builtins.elemAt to fail; update positionFromMeta to check whether parts
is null before indexing: after computing parts = builtins.match "(.*):([0-9]+)"
pkg.meta.position, set file to a safe fallback (e.g., pkg.meta.position or "" )
when parts == null and set line to null or a safe default when parts == null,
and only call builtins.elemAt/builtins.fromJSON when parts is non-null;
reference positionFromMeta, pkg.meta.position, and the parts binding when
applying this guard.
In `@flake/dev/treefmt.nix`:
- Line 22: prettier.enable = true currently enables Prettier broadly and
conflicts with Biome and markdown formatters; update the Prettier block to set
explicit includes so it only formats YAML (e.g., add an includes = ["*.yaml"]
entry), leaving Biome (refer to biome.includes) to handle CSS/JS/JSON and
mdformat/mdsh to handle markdown; locate the prettier configuration in the same
Nix attribute that contains prettier.enable and add the includes array limited
to the YAML pattern to avoid overlap.
---
Duplicate comments:
In @.woodpecker/ci-homes.yaml:
- Around line 42-50: The script assumes detect-affected-outputs --json returns
an array; instead treat it as an object: call the tool with --outputs "$HOME"
(not as a positional arg) so it filters by output name, set AFFECTED to "{}" on
failure, and change the jq test to check for an object key (e.g., use jq -e
--arg home "$HOME" 'has($home)') to decide whether to set SHOULD_BUILD; update
references to RANGE, AFFECTED, HOME, detect-affected-outputs, and SHOULD_BUILD
accordingly.
In @.woodpecker/ci-hosts.yaml:
- Around line 40-48: The detect-affected-outputs invocation is missing its
required positional "type" argument and uses the wrong flag/JSON test: pass the
required type as the first argument to the script invocation, replace the
singular --output with --outputs, and change the jq test that currently uses
index($host) to test for object keys (e.g. has($host)) so it works with the
object keyed by output name; update the call that sets AFFECTED and the
conditional that checks it (references: detect-affected-outputs script,
variables RANGE, HOST, AFFECTED, and SHOULD_BUILD).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 294e2d84-4765-4204-b338-147c2aeada33
📒 Files selected for processing (15)
.github/actions/setup-nix/action.yaml.github/workflows/ci.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.woodpecker/ci-packages.yamlAGENTS.mddocs/src/SUMMARY.mddocs/src/components/io_guardian.mddocs/src/components/server_monitoring.mddocs/src/development/declarative_gnome_dconf.mddocs/src/modules/flake/allocations.mddocs/src/modules/nixos/services.mdflake/ci/scripts/eval.nixflake/dev/treefmt.nix
💤 Files with no reviewable changes (2)
- .github/actions/setup-nix/action.yaml
- .github/workflows/ci.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Mergify Merge Protections
- GitHub Check: Summary
🧰 Additional context used
📓 Path-based instructions (6)
docs/src/**/*.md
📄 CodeRabbit inference engine (.opencode/skills/docs/SKILL.md)
docs/src/**/*.md: Create or update Markdown files indocs/srcfollowing the documentation workflow: analyze changes, identify impact on documentation files, draft content with underscore filenames, updatedocs/src/SUMMARY.md, and verify Nix code examples are valid
Keep documentation explanations concise and focus on why something is configured a certain way rather than just what the code does
Files:
docs/src/development/declarative_gnome_dconf.mddocs/src/modules/nixos/services.mddocs/src/modules/flake/allocations.mddocs/src/SUMMARY.mddocs/src/components/io_guardian.mddocs/src/components/server_monitoring.md
docs/**
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Project documentation should be maintained in the
docs/directory
Files:
docs/src/development/declarative_gnome_dconf.mddocs/src/modules/nixos/services.mddocs/src/modules/flake/allocations.mddocs/src/SUMMARY.mddocs/src/components/io_guardian.mddocs/src/components/server_monitoring.md
docs/src/SUMMARY.md
📄 CodeRabbit inference engine (.opencode/skills/docs/SKILL.md)
Ensure new documentation files are registered in
docs/src/SUMMARY.mdto maintain the book structure
Files:
docs/src/SUMMARY.md
**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/building/SKILL.md)
Use
nix fmtto format Nix code and check syntax
**/*.nix: Runnix fmt <paths...>after making any changes to ensure consistent formatting
Use 2 spaces for indentation in Nix files
Use kebab-case for Nix file and directory names
Use camelCase for Nix attributes (e.g.,myOption,enableFeature)
Use camelCase for Nix option paths (e.g.,services.myService.enable)
Prefer minimal comments; code should be self-explanatory, using comments to explain why, not what
Prefer relative imports over absolute imports (e.g.,./modules/foo.nix)
Group imports at the top of the Nix file and use list format for multiple imports
When generating JSON, YAML, or other structured formats, define as Nix attribute sets and convert using builtins functions (e.g.,builtins.toJSON), rather than using inline string literals
Follow the standard module structure pattern withconfig,lib,pkgsdestructuring,letbindings for module configuration, andoptions/configsections
Useletbindings withinheritfor importing functions from libraries (e.g.,inherit (lib) mkIf mkEnableOption)Run
nix fmtto format code before submitting changes
**/*.nix: Usebuiltins.traceto add trace statements for seeing values during Nix evaluation, withbuiltins.toJSONfor complex attribute sets
Check for circular dependencies in imports or option definitions as the root cause of infinite recursion errors in Nix
Verify attribute names, imports, and option paths to resolve 'attribute missing' errors in Nix configurationsRun
nix fmton changed Nix files after modifying modules
**/*.nix: Declare secrets in Nix usingsops.secretswith the secret path as the key
Specify custom permissions for secrets usingowner,group, andmodeattributes in sops.secrets declarations
Usesops.templatesto combine multiple secrets into configuration files with placeholders
AddrestartUnitsto secret declarations to automatically restart services when secrets change
Use empty `k...
Files:
flake/dev/treefmt.nixflake/ci/scripts/eval.nix
flake/dev/**
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Development shell, CI scripts, and formatting utilities should be organized in the
flake/dev/directory
Files:
flake/dev/treefmt.nix
flake/ci/**
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
CI-specific flake definitions and scripts should be located in the
flake/ci/directory
Files:
flake/ci/scripts/eval.nix
🧠 Learnings (101)
📓 Common learnings
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Run `nix fmt <changed-files>` to fix Nix formatting failures in CI checks
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to home/*/hm-config.nix : User-specific Home-Manager configurations should be placed in `home/<username>/` with `hm-config.nix` as the entry point
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to home/*/*.nix : Machine-specific user configuration overrides should be placed in `home/<username>/<hostname>.nix`
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to home/shared/desktop/** : Shared desktop environment configurations should be in `home/shared/desktop/`
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Applies to home/*/[!.]*@(hm-config|os-config|secrets).nix : Create host-specific configuration files named `<hostname>.nix` in the user directory (`home/<username>/<hostname>.nix`), containing Home-Manager configuration with user-specific git settings, imports of shared features, and host-specific customizations
Applied to files:
docs/src/development/declarative_gnome_dconf.mddocs/src/components/server_monitoring.md.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Applies to home/*/os-config.nix : Create `os-config.nix` in `home/<username>/` for optional NixOS settings that should apply to all hosts where the user exists, using NixOS config syntax rather than Home-Manager
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to home/*/os-config.nix : User OS configuration applied to all machines should be defined in `home/<username>/os-config.nix`
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Applies to home/*/**.nix : Create `home/<username>/<hostname>.nix` files to assign users to hosts, which enables auto-detection and inclusion of the user's home-manager configuration
Applied to files:
docs/src/development/declarative_gnome_dconf.md.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Applies to home/*/hm-config.nix : Create `hm-config.nix` in `home/<username>/` as the main Home-Manager entry point containing shared configuration across all hosts for that user
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to modules/home-manager/**/*.nix : Use `user.<name>` namespace for user-specific options in Home-Manager modules
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Applies to home/*/features/**/*.nix : User's feature modules should be organized in a `features/` directory within the user directory (`home/<username>/features/`)
Applied to files:
docs/src/development/declarative_gnome_dconf.md
📚 Learning: 2026-03-01T12:24:45.167Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/docs/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:45.167Z
Learning: Applies to docs/src/**/*.md : Create or update Markdown files in `docs/src` following the documentation workflow: analyze changes, identify impact on documentation files, draft content with underscore filenames, update `docs/src/SUMMARY.md`, and verify Nix code examples are valid
Applied to files:
docs/src/modules/nixos/services.mdAGENTS.md.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : Documentation in docs/ MUST be updated simultaneously with code changes to .nix files
Applied to files:
docs/src/modules/nixos/services.md
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : All affected configurations MUST be tested before completing any task, using the test agent and testing skill to identify affected configurations
Applied to files:
AGENTS.md.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to flake.nix : Use `./flake/ci/detect-affected-outputs.nu nixosConfigurations --json` and `./flake/ci/detect-affected-outputs.nu homeConfigurations --json` to identify which outputs are affected by dirty files in CI
Applied to files:
AGENTS.mddocs/src/modules/flake/allocations.mdflake/dev/treefmt.nixflake/ci/scripts/eval.nix.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting only hosts, build at least one affected host configuration using 'nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel'
Applied to files:
AGENTS.md.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Use the module-graph script (./flake/dev/scripts/module-graph.nu) to determine which hosts and homes are affected by your changes
Applied to files:
AGENTS.md.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For flake.nix or flake.lock changes, run a full flake check in addition to building representative configs
Applied to files:
AGENTS.md.woodpecker/checks.yaml.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Run `nix fmt <changed-files>` to fix Nix formatting failures in CI checks
Applied to files:
AGENTS.mdflake/dev/treefmt.nix.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to **/*.nix : Run `nix fmt` on changed Nix files after modifying modules
Applied to files:
AGENTS.mdflake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake.nix : Top-level flake definitions and inputs/outputs configuration should be placed in `flake.nix`
Applied to files:
AGENTS.mddocs/src/modules/flake/allocations.mdflake/dev/treefmt.nixflake/ci/scripts/eval.nix.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to home/**/*.nix : Test at least one affected home configuration before submitting changes
Applied to files:
AGENTS.md.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Build a host's NixOS system using `nix build .#nixosConfigurations.<host>.config.system.build.toplevel`
Applied to files:
AGENTS.md.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel` to test a host configuration
Applied to files:
AGENTS.md.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root"` to perform a full flake check
Applied to files:
AGENTS.mdflake/ci/scripts/eval.nix.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Test user configuration using `nix build .#homeConfigurations.<username>.activationPackage` or `home-manager build --flake .#<username>` before deployment
Applied to files:
AGENTS.md.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Build a Home-Manager activation using `nix build .#homeConfigurations.<user>@<host>.activationPackage`
Applied to files:
AGENTS.md.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Run `nix build .#homeConfigurations."<user>@<host>".activationPackage` to test a home configuration
Applied to files:
AGENTS.md.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Use `nix eval .#nixosConfigurations.<host>.config.system.build.toplevel --apply 'x: "ok"'` to check if Nix expressions evaluate correctly
Applied to files:
AGENTS.mdflake/ci/scripts/eval.nix.woodpecker/checks.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to {flake.nix,flake.lock} : Run `nix flake check` (with devenv-root override) before submitting changes
Applied to files:
AGENTS.mdflake/dev/treefmt.nixflake/ci/scripts/eval.nix.woodpecker/checks.yaml.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix build -L` for verbose build output and `nix develop` to enter build environments for debugging
Applied to files:
AGENTS.md
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected home configuration if the changed files affect homes only
Applied to files:
AGENTS.md.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/nixos/** : NixOS flake modules should be organized in the `flake/nixos/` directory
Applied to files:
AGENTS.mddocs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Follow the standard module structure pattern with `config`, `lib`, `pkgs` destructuring, `let` bindings for module configuration, and `options`/`config` sections
Applied to files:
AGENTS.mddocs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:24:45.167Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/docs/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:45.167Z
Learning: Applies to docs/src/SUMMARY.md : Ensure new documentation files are registered in `docs/src/SUMMARY.md` to maintain the book structure
Applied to files:
docs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to modules/nixos/**/*.nix : Create NixOS modules at `modules/nixos/<category>/<name>.nix` with standard pattern including options definition, lib imports (mkEnableOption, mkOption, mkIf, types), config variable binding, and conditional config application using mkIf
Applied to files:
docs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to modules/nixos/** : Reusable NixOS module fragments should be placed in `modules/nixos/` directory
Applied to files:
docs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to lib/builders/** : Custom system and home builders should be implemented in `lib/builders/` directory with `mkSystem.nix` and `mkHome.nix` as entry points
Applied to files:
docs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Follow the standard NixOS module structure pattern with config, lib, pkgs parameters and proper `let`/`in` blocks
Applied to files:
docs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Avoid hardcoded paths that should be configurable options
Applied to files:
docs/src/modules/flake/allocations.mdflake/dev/treefmt.nixflake/ci/scripts/eval.nix.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to modules/home-manager/default.nix : Home-Manager modules should be exported through `modules/home-manager/default.nix`
Applied to files:
docs/src/modules/flake/allocations.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to home/*/secrets.yaml : User-specific secrets should be placed in `home/<user>/secrets.yaml`
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:25.327Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/secrets/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:25.327Z
Learning: Applies to home/*/secrets.yaml : Store user-specific secrets in `home/<username>/secrets.yaml` for single users
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Applies to hosts/{server,desktop,laptop}/*/secrets.yaml : Each host requires a `secrets.yaml` file containing SOPS-encrypted secrets (SSH key, passwords)
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:25.327Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/secrets/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:25.327Z
Learning: Applies to **/secrets.yaml : Store secrets in YAML format with optional hierarchical nesting for organized key access
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:25.327Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/secrets/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:25.327Z
Learning: Applies to hosts/secrets.yaml : Store global secrets in `hosts/secrets.yaml` that all hosts need to access
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Applies to home/*/secrets.yaml : Create `secrets.yaml` in `home/<username>/` for user-specific secrets in YAML format and update `.sops.yaml` to include the user's age key for their secrets path
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:25.327Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/secrets/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:25.327Z
Learning: Applies to hosts/server/secrets.yaml : Store server-scoped secrets in `hosts/server/secrets.yaml` for all server hosts
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to hosts/{desktop,laptop,server}/*/secrets.yaml : Host-specific secrets should be placed in `hosts/<type>/<hostname>/secrets.yaml`
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to modules/nixos/host/**/*.nix : Use `host.<name>` namespace for host-specific options in NixOS modules
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to hosts/{desktop,laptop,server}/** : Per-machine NixOS configurations should be organized in `hosts/<type>/<hostname>/` where type is desktop, laptop, or server
Applied to files:
docs/src/components/server_monitoring.md.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to modules/nixos/server/**/*.nix : Use `server.<name>` namespace for server cluster options in NixOS modules
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Applies to hosts/{server,desktop,laptop}/*/default.nix : Each host requires a `default.nix` file as the main configuration entry point
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to hosts/{desktop,laptop,server}/*/default.nix : Host system configurations should follow the pattern `hosts/<type>/<hostname>/default.nix`
Applied to files:
docs/src/components/server_monitoring.md.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Host auto-discovery scans `hosts/` for subdirectories, filters out `shared/` and `secrets.yaml`, and automatically registers each as a nixosConfiguration
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Applies to hosts/{server,desktop,laptop}/*/default.nix : Host `default.nix` files must import `${modulesPath}/virtualisation/proxmox-lxc.nix` for LXC containers or `./hardware.nix` for physical machines
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Applies to hosts/server/*/default.nix : Server hosts must set `host.device.isHeadless = true` in their configuration
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:25:06.603Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/modules/SKILL.md:0-0
Timestamp: 2026-03-01T12:25:06.603Z
Learning: Applies to modules/nixos/services/**/*.nix : Use `services.<name>` namespace for system services in NixOS modules
Applied to files:
docs/src/components/server_monitoring.md
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to **/*.nix : Run `nix fmt` to format code before submitting changes
Applied to files:
flake/dev/treefmt.nix.woodpecker/checks.yaml.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: Applies to **/*.nix : Always ensure formatting is correct by running 'nix fmt' on changed files
Applied to files:
flake/dev/treefmt.nix.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Applies to **/*.nix : Use `nix fmt` to format Nix code and check syntax
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : Run `nix fmt <paths...>` after making any changes to ensure consistent formatting
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Code MUST pass `nix fmt` formatting validation
Applied to files:
flake/dev/treefmt.nix.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:16.409Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/security.md:0-0
Timestamp: 2026-03-01T12:27:16.409Z
Learning: Applies to **/*.nix : Never pass secrets via command line arguments (visible in process list); use secretFile, environmentFile, or sops-managed files instead
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:16.409Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/security.md:0-0
Timestamp: 2026-03-01T12:27:16.409Z
Learning: Applies to **/*.nix : Never hardcode passwords, API keys, or tokens in plain text; ensure sensitive data is stored in secrets.yaml and referenced through sops declarations
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:29.965Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-01T12:27:29.965Z
Learning: Applies to **/*.nix : All code MUST be formatted with nix fmt before completing any task
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:27:16.409Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/security.md:0-0
Timestamp: 2026-03-01T12:27:16.409Z
Learning: Applies to **/*.nix : Store secrets using sops-nix with age encryption in secrets.yaml files at appropriate scopes (global at hosts/secrets.yaml, server-level at hosts/server/secrets.yaml, host-specific at hosts/<type>/<hostname>/secrets.yaml, and user-specific at home/<username>/secrets.yaml)
Applied to files:
flake/dev/treefmt.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix eval` command to test expressions without building, including checking option evaluation and tracing output
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:15.388Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/building/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:15.388Z
Learning: Use `nix flake check` to evaluate all configurations and run linters
Applied to files:
flake/ci/scripts/eval.nix.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Applies to **/*.nix : Use `builtins.trace` to add trace statements for seeing values during Nix evaluation, with `builtins.toJSON` for complex attribute sets
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: Use 'nix eval .#... --apply "x: \"ok\""' for quick evaluation checks without building
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Applies to **/*.nix : Verify attribute names, imports, and option paths to resolve 'attribute missing' errors in Nix configurations
Applied to files:
flake/ci/scripts/eval.nix.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Use intermediate bindings instead of deeply nested attribute access for improved readability
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Use `nix eval .#nixosConfigurations.<host>.config.services --apply 'builtins.attrNames'` to diagnose 'attribute not found' errors by listing available attributes
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:22.881Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/code-style/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:22.881Z
Learning: Applies to **/*.nix : When generating JSON, YAML, or other structured formats, define as Nix attribute sets and convert using builtins functions (e.g., `builtins.toJSON`), rather than using inline string literals
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Avoid inline JSON/YAML strings; use `builtins.toJSON` for structured data
Applied to files:
flake/ci/scripts/eval.nix.woodpecker/ci-packages.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : When generating JSON/YAML, define as Nix attribute sets and convert using `builtins.toJSON` instead of inline strings
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Always use `mkIf` guards on config sections that are conditionally applied
Applied to files:
flake/ci/scripts/eval.nix.woodpecker/ci-packages.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : When assertion failures occur, read the assertion message carefully as it explains what configuration constraint is not being met or what required option is missing
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix eval .#...options --apply 'builtins.attrNames'` to list all available options in a Nix namespace
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : When a new module isn't being found, verify the imports list in the parent module, check that the file path is correct (use kebab-case), and ensure the module is syntactically valid
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Applies to **/*.nix : Check for circular dependencies in imports or option definitions as the root cause of infinite recursion errors in Nix
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Ensure all used functions are properly inherited to avoid circular imports and hidden dependencies
Applied to files:
flake/ci/scripts/eval.nix.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Prefer relative imports (e.g., `./modules/foo.nix`) over absolute paths
Applied to files:
flake/ci/scripts/eval.nix
📚 Learning: 2026-03-01T12:24:29.910Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/contributing/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:29.910Z
Learning: Applies to hosts/**/*.nix : Test at least one affected host configuration before submitting changes
Applied to files:
.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:14.740Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/project-structure/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:14.740Z
Learning: Applies to flake/ci/** : CI-specific flake definitions and scripts should be located in the `flake/ci/` directory
Applied to files:
.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to flake.{nix,lock} : Verify `flake.lock` conflicts by checking if inputs were updated and ensuring compatibility between updated inputs
Applied to files:
.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:26:01.611Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/packages/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:01.611Z
Learning: Applies to pkgs/*/default.nix : Include passthru.updateScript in package definitions using nix-update-script with extraArgs for automatic update support
Applied to files:
.woodpecker/checks.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected host AND one affected home configuration if the changed files affect both
Applied to files:
.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:38.213Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/debugging/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:38.213Z
Learning: Use `nix flake check --no-build` to verify flake syntax validity without building
Applied to files:
.woodpecker/checks.yaml
📚 Learning: 2026-03-18T23:46:49.905Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: .woodpecker/lix.yaml:15-15
Timestamp: 2026-03-18T23:46:49.905Z
Learning: In nix-config repository (.woodpecker/*.yaml), image references intentionally omit explicit tags or digests (e.g., registry.racci.dev/lix-woodpecker without :tag). Do not flag or suggest adding explicit tags or digests to these image references; treat such omissions as intentional and maintain consistency across the CI config.
Applied to files:
.woodpecker/checks.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting only homes, build at least one affected home configuration using 'nix build .#homeConfigurations.<user>@<host>.activationPackage'
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:02.914Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/nix-review.md:0-0
Timestamp: 2026-03-01T12:27:02.914Z
Learning: Applies to **/*.nix : Verify option type definitions match their usage and configuration values
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:51.425Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/ci-failure.md:0-0
Timestamp: 2026-03-01T12:26:51.425Z
Learning: Applies to **/*.nix : Verify type mismatches by checking option type definitions and the value being provided in NixOS options
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For home-specific changes in home/<user>/, build that user's home config on one host; if shared home files changed, test on multiple hosts
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:26:41.504Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/users/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:41.504Z
Learning: Applies to home/*/ : User directory structure must follow the pattern `home/<username>/` with required files: `hm-config.nix` (main Home-Manager entry point) and `id_ed25519.pub` (SSH public key), plus optional files: `os-config.nix`, `secrets.yaml`, host-specific `<hostname>.nix`, and `features/` directory
Applied to files:
.woodpecker/ci-homes.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For host-specific changes in hosts/<type>/<hostname>/, build that specific host; if shared files changed, check other hosts of the same type
Applied to files:
.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:27:25.837Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/agent/test.md:0-0
Timestamp: 2026-03-01T12:27:25.837Z
Learning: For changes affecting both hosts and homes, build one host AND one home configuration to ensure no regressions
Applied to files:
.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Applies to hosts/{desktop,laptop}/*/hardware.nix : Physical host machines (desktops/laptops) must include a `hardware.nix` file with hardware-specific configuration
Applied to files:
.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:24:57.319Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/hosts/SKILL.md:0-0
Timestamp: 2026-03-01T12:24:57.319Z
Learning: Use the `new-host.sh` helper script to create new hosts rather than manual creation, which automates directory creation, SSH key generation, default.nix setup, and secrets configuration
Applied to files:
.woodpecker/ci-hosts.yaml
📚 Learning: 2026-03-01T12:26:31.937Z
Learnt from: CR
Repo: DaRacci/nix-config PR: 0
File: .opencode/skills/testing/SKILL.md:0-0
Timestamp: 2026-03-01T12:26:31.937Z
Learning: Based on module-graph output, test at least one affected host configuration if the changed files affect hosts only
Applied to files:
.woodpecker/ci-hosts.yaml
d1b33a0 to
cceb2bd
Compare
43299aa to
1d9ffb0
Compare
There was a problem hiding this comment.
Actionable comments posted: 13
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
docs/site.nix (2)
12-12:⚠️ Potential issue | 🟡 MinorTypo:
builtInputsshould bebuildInputs.This typo means
mdbookwon't be available as a build input. The derivation likely works becausemdbookis accessed via${lib.getExe pkgs.mdbook}directly, but the intended declaration is broken.🐛 Proposed fix
- builtInputs = [ pkgs.mdbook ]; + buildInputs = [ pkgs.mdbook ];🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/site.nix` at line 12, Change the misspelled attribute builtInputs to buildInputs in the Nix derivation so mdbook is correctly declared as a build-time dependency; locate the derivation that currently uses builtInputs = [ pkgs.mdbook ] and replace it with buildInputs = [ pkgs.mdbook ] (ensure any references to lib.getExe pkgs.mdbook remain unchanged).
35-35:⚠️ Potential issue | 🟡 MinorOrphaned command with no effect.
The
${pkgs.fd}/bin/fdline executesfdwithout arguments or capturing output, producing no visible effect. This appears to be leftover or incomplete code.🗑️ Proposed fix — remove or complete the command
- ${pkgs.fd}/bin/fd substituteInPlace ./src/index.md \🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/site.nix` at line 35, The line containing ${pkgs.fd}/bin/fd in docs/site.nix is an orphaned invocation with no effect; either remove that line entirely or replace it with a meaningful usage (for example add fd to buildInputs, reference its path in a command that uses its output, or document its path as a tool requirement). Locate the literal string "${pkgs.fd}/bin/fd" and either delete it or modify surrounding Nix code so fd is properly consumed (e.g., included in buildInputs or invoked with arguments/redirected output)..woodpecker/update.yaml (1)
52-57: 🧹 Nitpick | 🔵 TrivialConsider adding
--labelsand--reviewersfor consistency with other workflows.The
create-prinvocation correctly passes the required--branchand--basearguments. However, comparing with.woodpecker/checks.yaml(lines 142-145), that workflow also passes--labels "automated,merge-queue"and--reviewers "DaRacci". Consider adding these for consistent PR metadata across automated workflows.♻️ Suggested enhancement
nix run .#create-pr -- \ --title "chore(deps): Update flake inputs" \ --body "This PR updates the flake inputs to their latest versions, see individual commits for changes." \ --branch "update/flake-inputs-all" \ - --base "master" + --base "master" \ + --labels "automated,merge-queue" \ + --reviewers "DaRacci"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/update.yaml around lines 52 - 57, Update the `nix run .#create-pr --` invocation to include the same PR metadata flags used in other workflows by adding `--labels "automated,merge-queue"` and `--reviewers "DaRacci"` to the command so the created PRs have consistent labels and reviewers with the `.woodpecker/checks.yaml` behavior.
♻️ Duplicate comments (4)
.woodpecker/ci-homes.yaml (1)
42-45:⚠️ Potential issue | 🔴 CriticalThis gate currently skips affected homes on incremental runs.
detect-affected-outputs --jsonreturns an object keyed by output name, not an array. Withecho "[]"andjq 'index($home)', Lines 44-45 will never recognise an affected home, and detector failures are silently downgraded to "unaffected". Use{}+has($home), and fail closed or build conservatively on detector errors..woodpecker/checks.yaml (1)
97-101:⚠️ Potential issue | 🔴 CriticalThe update-package matrix filter is checking the wrong attribute and can blow up on packages without
passthru.Repo packages expose
passthru.updateScript, but Line 101 checksupdate-scriptand dereferencespassthrubefore the existence test. As written, this can either exclude every valid updateable package or fail evaluation on packages without apassthruattrset.Minimal fix
- "pkgs: builtins.attrNames pkgs |> builtins.filter (name: (pkgs.${name}.passthru ? update-script))" + "pkgs: builtins.attrNames pkgs |> builtins.filter (name: ((pkgs.${name}.passthru or {}) ? updateScript))"Based on learnings: Applies to
pkgs/*/default.nix: Includepassthru.updateScriptin package definitions using nix-update-script with extraArgs for automatic update support.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/checks.yaml around lines 97 - 101, The nix filter is checking the wrong attribute and dereferencing passthru, causing failures for packages without it; update the filter expression used in the matrix command to test for the passtru attribute existence without dereferencing and use the correct camelCase name (updateScript) — e.g. replace the current filter (pkgs.${name}.passthru ? update-script) with a safe existence check like (pkgs.${name}.passthru ? updateScript) inside the builtins.filter lambda so packages without passthru don't cause evaluation errors and valid updateable packages are included.flake/ci/scripts/update-matrix.nu (1)
46-46:⚠️ Potential issue | 🔴 CriticalConvert the dynamic matrix path into a cell-path before calling
update.Line 46 passes a string (
$"matrix.($matrix_key)") toupdate, not a cell-path. That means the rewrite path is wrong as soon as a matrix entry actually needs updating.Minimal fix
- let updated_yaml = $yaml | update $"matrix.($matrix_key)" $new_matrix + let matrix_path = ["matrix", $matrix_key] | into cell-path + let updated_yaml = $yaml | update $matrix_path $new_matrix🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@flake/ci/scripts/update-matrix.nu` at line 46, The update call currently passes a string $"matrix.($matrix_key)" instead of a cell-path; create a cell-path value from that dynamic path and pass the cell-path to update. Concretely, compute a variable (e.g., matrix_path) from the dynamic expression combining "matrix" and $matrix_key, convert that string into a cell-path value, then call update with $yaml, the cell-path variable, and $new_matrix (replacing the current update $"matrix.($matrix_key)" usage). Ensure the symbols referenced are updated_yaml, $yaml, $matrix_key, $new_matrix and the update invocation so the rewrite path is a proper cell-path..woodpecker/ci-hosts.yaml (1)
42-43:⚠️ Potential issue | 🔴 CriticalReplace the jq filter with
has()to check for output existence in the object.The
detect-affected-outputsscript outputs a JSON object keyed by output name (e.g.,{"hostA": [...], "hostB": [...]}), not an array. The current filter'index($host)'searches for an array element and will never match. Use'has($host)'instead to check if the output key exists in the returned object.Current code
AFFECTED=$(nix run .#detect-affected-outputs -- nixosConfigurations --json --range "$${RANGE}" --outputs "$${HOST}" 2>/dev/null || echo "[]") if echo "$${AFFECTED}" | jq -e --arg host "$${HOST}" 'index($host)' > /dev/null 2>&1; thenThe fallback
echo "[]"also doesn't match the actual output structure and should be changed to an empty objectecho "{}".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.woodpecker/ci-hosts.yaml around lines 42 - 43, The AFFECTED capture and jq check are using the wrong JSON shape: change the fallback from echo "[]" to echo "{}" when running detect-affected-outputs, and replace the jq filter 'index($host)' with 'has($host)' so the existence check matches an object keyed by output name; update the invocation that sets AFFECTED (the nix run .#detect-affected-outputs call) and the subsequent if that pipes AFFECTED into jq --arg host to use has($host) instead of index($host).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.gitignore:
- Line 1: The .gitignore entry "result*" is too broad and may ignore files
anywhere; update the ignore rule in .gitignore to scope it to the repo root by
replacing the pattern "result*" with "/result*" so only top-level result
artifacts (e.g., Nix build symlinks) are ignored; locate the "result*" pattern
in .gitignore and change it to "/result*".
In @.woodpecker/checks.yaml:
- Around line 41-46: The run-flake-checks job currently runs plain `nix flake
check`; update the job (identified as run-flake-checks) to invoke the repo's
standard override by replacing the command with `nix flake check
--override-input devenv-root "file+file://$PWD/.devenv/root"` so CI uses the
same devenv-root override as local full-checks and prevents mismatches between
local and CI validation.
- Around line 103-123: Add a pre-push gate job that detects whether the matrix
generation actually produced changes and make push-matrix-updates depend on it;
specifically, create a short step (e.g., "matrix-changes-check") that runs in
the same repo context and exits non-zero unless there are local commits or a
dirty working tree (use git status --porcelain or compare HEAD to the base
branch via git rev-parse/origin/BASE_BRANCH or git diff --quiet), then change
push-matrix-updates to depend_on "matrix-changes-check" (or require its success)
so the appleboy/drone-git-push step only runs when the check proves a
commit/diff exists, preventing force-push when nothing changed.
- Around line 60-67: The GitGuardian job "run-gitguardian" uses
CI_PREV_COMMIT_SHA in the command `ggshield secret scan commit-range` but manual
pipelines set CI_PREV_COMMIT_SHA empty, producing an invalid range; update the
job to either limit execution (change `when: *when_ci`) to only
push/pull_request events, or add a runtime fallback: detect if
CI_PREV_COMMIT_SHA is empty and then run a safe alternative (e.g., `ggshield
secret scan repo` or `ggshield secret scan commit-range HEAD` / full-repo scan)
instead of `ggshield secret scan commit-range $${CI_PREV_COMMIT_SHA}..` so the
step succeeds for manual runs.
In @.woodpecker/ci-packages.yaml:
- Around line 58-66: The current snippet masks discover-packages failures by
piping errors to /dev/null and defaulting AFFECTED to "[]", making eval errors
appear as "not affected"; change the logic so that the discover-packages
invocation (symbol: discover-packages) is not silenced and non-zero exits are
handled explicitly: run nix run .#discover-packages to set AFFECTED and if it
fails (check its exit status) either abort the step (exit with non-zero) or set
SHOULD_BUILD=true and log the error; ensure you keep references to RANGE and
PACKAGE and only fall back to "[]" when you have a valid successful JSON parse,
never on command failure.
In @.woodpecker/lix.yaml:
- Around line 71-73: The publish step's when: evaluate condition references
BUILD_PUBLISH but the earlier step writes SHOULD_PUBLISH to the env file, so the
publish step will never run; fix by making the variable name consistent—either
change the when: evaluate expression to 'SHOULD_PUBLISH == "true"' or update the
earlier "Check for input changes" writes to set BUILD_PUBLISH instead of
SHOULD_PUBLISH (ensure all occurrences of SHOULD_PUBLISH/BUILD_PUBLISH in the
.woodpecker/lix.yaml are updated so they match).
In @.woodpecker/update-packages.yaml:
- Around line 44-52: The "Push to Branch" step is running even when nix-update
made no commit; gate this step so it only runs when an update commit exists by
checking HEAD != BASE_BRANCH (or a marker set by the update step). Modify the
pipeline so the job "Push to Branch" (image appleboy/drone-git-push, branch:
*branch) either has a conditional that checks an env var like UPDATED_COMMIT or
runs a lightweight pre-check (compare git rev-parse HEAD vs git rev-parse
origin/${BASE_BRANCH}) and exits/skips if they are equal; alternatively have the
update step write a marker file/ENV (e.g. UPDATED=true) and require that marker
before executing the push/PR path. Ensure the push only executes when that check
indicates an actual update commit.
In `@flake/ci/scripts/eval.nix`:
- Line 21: The binding flakeOrImportPath redundantly aliases importPath; to
simplify, remove the flakeOrImportPath binding and replace its usages with
importPath (or, if you prefer to keep the alias for future flake URL handling,
add a clarifying comment above flakeOrImportPath explaining its intent); locate
the symbol flakeOrImportPath in the file and either eliminate it and update
references to importPath, or add the explanatory comment next to the
flakeOrImportPath declaration.
In `@flake/ci/scripts/setup-attic.nu`:
- Around line 24-26: The --watch code path invokes bash via the line bash -c
"attic watch-store raccidev:global & disown" but bash isn't in the package
runtime closure; add pkgs.bash to the package's runtimeInputs (the runtimeInputs
attribute in flake/ci/scripts/default.nix for the setup-attic package) so bash
is available at runtime, or alternatively change the nu script's
background-launch to use a shell already provided (e.g., use nohup/sh with &
instead of disown) if you prefer not to add pkgs.bash.
In `@flake/ci/scripts/update-matrix.nu`:
- Around line 47-49: The script incorrectly references Nushell variables without
the `$` prefix; change the lines using updated_yaml and yaml_string to use
`$updated_yaml` and `$yaml_string` so the pipe operations work (e.g., use
`$updated_yaml | to yaml` and `$yaml_string | save --force $workflow_file`),
ensuring variable lookups for the `to yaml` and `save` operations succeed and
match the rest of the file's `$` usage.
In `@flake/dev/treefmt.nix`:
- Line 42: The prettier.includes glob currently uses a redundant brace expansion
("prettier.includes = [ \"*.{yaml}\" ]"); update the pattern to either the
simplified single-extension form "*.yaml" or, if you want to cover both YAML
extensions, change it to a multi-extension brace form "*.{yaml,yml}" so .yaml
(and optionally .yml) files are matched; modify the prettier.includes entry
accordingly (search for the prettier.includes setting in treefmt.nix).
In `@lib/nu-lib/lib.nu`:
- Around line 10-20: Update the mismatched docs to reflect the actual behavior:
in the comment for the module and the setup_logging function replace references
to VERBOSE with DEBUG (or vice-versa if you prefer to change the code instead)
and update the --exit flag comment on export def check_required_vars to state it
exits with code 1; specifically, adjust the doc strings surrounding the export
def setup_logging and the comment on the --exit flag in check_required_vars so
they match the implementation that reads $env.DEBUG and returns exit code 1.
In `@lib/package.nix`:
- Line 21: The parameter libSource is advertised optional but the code
unconditionally computes libStore and runs find ${libStore}, making libSource
effectively required; update the logic around libSource/libStore so the find
invocation is only executed when a lib source was actually provided or exists:
conditionalize the creation/use of libStore (and the find ${libStore} call)
behind a check for libSource != null or a filesystem existence test of
${sourceRoot}/lib, ensuring callers who omit libSource keep the previous
fallback behavior without failing.
---
Outside diff comments:
In @.woodpecker/update.yaml:
- Around line 52-57: Update the `nix run .#create-pr --` invocation to include
the same PR metadata flags used in other workflows by adding `--labels
"automated,merge-queue"` and `--reviewers "DaRacci"` to the command so the
created PRs have consistent labels and reviewers with the
`.woodpecker/checks.yaml` behavior.
In `@docs/site.nix`:
- Line 12: Change the misspelled attribute builtInputs to buildInputs in the Nix
derivation so mdbook is correctly declared as a build-time dependency; locate
the derivation that currently uses builtInputs = [ pkgs.mdbook ] and replace it
with buildInputs = [ pkgs.mdbook ] (ensure any references to lib.getExe
pkgs.mdbook remain unchanged).
- Line 35: The line containing ${pkgs.fd}/bin/fd in docs/site.nix is an orphaned
invocation with no effect; either remove that line entirely or replace it with a
meaningful usage (for example add fd to buildInputs, reference its path in a
command that uses its output, or document its path as a tool requirement).
Locate the literal string "${pkgs.fd}/bin/fd" and either delete it or modify
surrounding Nix code so fd is properly consumed (e.g., included in buildInputs
or invoked with arguments/redirected output).
---
Duplicate comments:
In @.woodpecker/checks.yaml:
- Around line 97-101: The nix filter is checking the wrong attribute and
dereferencing passthru, causing failures for packages without it; update the
filter expression used in the matrix command to test for the passtru attribute
existence without dereferencing and use the correct camelCase name
(updateScript) — e.g. replace the current filter (pkgs.${name}.passthru ?
update-script) with a safe existence check like (pkgs.${name}.passthru ?
updateScript) inside the builtins.filter lambda so packages without passthru
don't cause evaluation errors and valid updateable packages are included.
In @.woodpecker/ci-hosts.yaml:
- Around line 42-43: The AFFECTED capture and jq check are using the wrong JSON
shape: change the fallback from echo "[]" to echo "{}" when running
detect-affected-outputs, and replace the jq filter 'index($host)' with
'has($host)' so the existence check matches an object keyed by output name;
update the invocation that sets AFFECTED (the nix run .#detect-affected-outputs
call) and the subsequent if that pipes AFFECTED into jq --arg host to use
has($host) instead of index($host).
In `@flake/ci/scripts/update-matrix.nu`:
- Line 46: The update call currently passes a string $"matrix.($matrix_key)"
instead of a cell-path; create a cell-path value from that dynamic path and pass
the cell-path to update. Concretely, compute a variable (e.g., matrix_path) from
the dynamic expression combining "matrix" and $matrix_key, convert that string
into a cell-path value, then call update with $yaml, the cell-path variable, and
$new_matrix (replacing the current update $"matrix.($matrix_key)" usage). Ensure
the symbols referenced are updated_yaml, $yaml, $matrix_key, $new_matrix and the
update invocation so the rewrite path is a proper cell-path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e37f4a9d-1651-48c2-b1f6-801dd024f153
📒 Files selected for processing (48)
.github/actions/setup-nix/action.yaml.github/workflows/ci.yaml.github/workflows/docs.yaml.github/workflows/packages.yaml.github/workflows/update-packages.yaml.gitignore.mergify.yml.opencode/skills/testing/SKILL.md.woodpecker/check-upstream-todos.yaml.woodpecker/check.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.woodpecker/ci-packages.yaml.woodpecker/flake-checker.yaml.woodpecker/lix.yaml.woodpecker/security.yaml.woodpecker/update-packages.yaml.woodpecker/update.yamlAGENTS.mddocs/search.nixdocs/serve.nixdocs/site.nixdocs/src/SUMMARY.mddocs/src/components/io_guardian.mddocs/src/components/server_monitoring.mddocs/src/development/declarative_gnome_dconf.mddocs/src/hosts/overview.mddocs/src/modules/flake/allocations.mddocs/src/modules/home-manager/diy.mddocs/src/modules/nixos/services.mdflake/ci/scripts/default.nixflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nixflake/ci/scripts/libflake/ci/scripts/setup-attic.nuflake/ci/scripts/update-matrix.nuflake/dev/scripts/default.nixflake/dev/scripts/libflake/dev/treefmt.nixlib/nu-lib/flake.nulib/nu-lib/lib.nulib/package.nixpkgs/drive-stats/default.nixpkgs/helpers/new-host.nixpkgs/list-ephemeral/default.nixpkgs/lix-woodpecker/default.nix
💤 Files with no reviewable changes (9)
- .github/workflows/docs.yaml
- .woodpecker/security.yaml
- .woodpecker/flake-checker.yaml
- .woodpecker/check.yaml
- .woodpecker/check-upstream-todos.yaml
- .github/workflows/update-packages.yaml
- .github/actions/setup-nix/action.yaml
- .github/workflows/packages.yaml
- .github/workflows/ci.yaml
1d9ffb0 to
be35d0d
Compare
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
1 similar comment
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
✅ Created PR with unit tests: #564 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
✅ Unit tests committed locally. Commit: |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
|
@coderabbitai configuration |
|
Configuration used: Organization UI CodeRabbit configurationlanguage: en-AU
tone_instructions: ''
early_access: true
enable_free_tier: true
inheritance: false
reviews:
profile: assertive
request_changes_workflow: true
high_level_summary: true
high_level_summary_instructions: ''
high_level_summary_placeholder: '@coderabbitai summary'
high_level_summary_in_walkthrough: true
auto_title_placeholder: '@coderabbitai'
auto_title_instructions: ''
review_status: true
review_details: true
commit_status: true
fail_commit_status: false
collapse_walkthrough: true
changed_files_summary: true
sequence_diagrams: true
estimate_code_review_effort: true
assess_linked_issues: true
related_issues: true
related_prs: true
suggested_labels: true
labeling_instructions: []
auto_apply_labels: true
suggested_reviewers: true
auto_assign_reviewers: true
in_progress_fortune: true
poem: true
enable_prompt_for_ai_agents: true
path_filters:
- '!openspec/**'
path_instructions: []
abort_on_close: true
disable_cache: false
slop_detection:
enabled: true
auto_review:
enabled: true
description_keyword: ''
auto_incremental_review: true
auto_pause_after_reviewed_commits: 5
ignore_title_keywords:
- 'chore(deps): Update flake inputs'
labels:
- '!automated'
- '!dependencies'
drafts: false
base_branches: []
ignore_usernames: []
finishing_touches:
docstrings:
enabled: true
unit_tests:
enabled: true
simplify:
enabled: false
custom: []
pre_merge_checks:
override_requested_reviewers_only: false
docstrings:
mode: warning
threshold: 80
title:
mode: warning
requirements: ''
description:
mode: warning
issue_assessment:
mode: warning
custom_checks: []
tools:
ast-grep:
rule_dirs: []
util_dirs: []
essential_rules: true
packages: []
shellcheck:
enabled: true
ruff:
enabled: true
markdownlint:
enabled: true
github-checks:
enabled: true
timeout_ms: 90000
languagetool:
enabled: true
enabled_rules: []
disabled_rules: []
enabled_categories: []
disabled_categories: []
enabled_only: false
level: default
biome:
enabled: true
hadolint:
enabled: false
swiftlint:
enabled: false
phpstan:
enabled: false
level: default
phpmd:
enabled: false
phpcs:
enabled: false
golangci-lint:
enabled: false
yamllint:
enabled: true
gitleaks:
enabled: true
trufflehog:
enabled: true
checkov:
enabled: true
tflint:
enabled: true
detekt:
enabled: false
eslint:
enabled: false
flake8:
enabled: true
fortitudeLint:
enabled: false
rubocop:
enabled: false
buf:
enabled: false
regal:
enabled: false
actionlint:
enabled: true
pmd:
enabled: false
clang:
enabled: false
cppcheck:
enabled: false
opengrep:
enabled: true
semgrep:
enabled: true
circleci:
enabled: false
clippy:
enabled: true
sqlfluff:
enabled: false
trivy:
enabled: true
prismaLint:
enabled: false
pylint:
enabled: true
oxc:
enabled: false
shopifyThemeCheck:
enabled: false
luacheck:
enabled: false
brakeman:
enabled: false
dotenvLint:
enabled: true
htmlhint:
enabled: false
stylelint:
enabled: false
checkmake:
enabled: false
osvScanner:
enabled: true
blinter:
enabled: true
smartyLint:
enabled: true
emberTemplateLint:
enabled: true
psscriptanalyzer:
enabled: true
chat:
art: true
allow_non_org_members: true
auto_reply: true
integrations:
jira:
usage: disabled
linear:
usage: disabled
knowledge_base:
opt_out: false
web_search:
enabled: true
code_guidelines:
enabled: true
filePatterns:
- .opencode/skills/**
- .opencode/agent/**
learnings:
scope: auto
issues:
scope: auto
jira:
usage: disabled
project_keys: []
linear:
usage: disabled
team_keys: []
pull_requests:
scope: auto
mcp:
usage: auto
disabled_servers: []
linked_repositories: []
code_generation:
docstrings:
language: en-AU
path_instructions: []
unit_tests:
path_instructions: []
issue_enrichment:
auto_enrich:
enabled: true
planning:
enabled: true
auto_planning:
enabled: true
labels: []
labeling:
labeling_instructions: []
auto_apply_labels: true
|
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 📃 Configuration Change RequirementsWonderful, this rule succeeded.Mergify configuration change
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Do not merge outdated PRsWonderful, this rule succeeded.Make sure PRs are almost up to date before merging
|
There was a problem hiding this comment.
Actionable comments posted: 14
♻️ Duplicate comments (2)
.woodpecker/lix.yaml (1)
78-78: 🧹 Nitpick | 🔵 TrivialUse an explicit relative path when sourcing
envvarIn
.woodpecker/lix.yaml, the workflow writesenvvarvia>> envvarand later sources it with. envvar; switching to. ./envvarmakes it explicit that the file should be read from the current working directory (this isn’t aPATH-lookup issue).Suggested fix
- . envvar + . ./envvar🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.woodpecker/lix.yaml at line 78, The workflow currently writes to and later sources the file using the ambiguous source command `. envvar`; change the sourcing to an explicit relative path by replacing `. envvar` with `. ./envvar` so the shell reads the envvar file from the current working directory (the writer that uses `>> envvar` remains unchanged).modules/nixos/services/woodpecker-nix.nix (1)
598-599:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winGuard
gc.maxFreedwith explicit boolean checks beforeoptional*calls.
cfg.isolatedStore.gc.maxFreedisnullOr str, butoptionalandoptionalStringrequire booleans. This can fail evaluation on the GC path.💡 Proposed fix
- ++ (optional cfg.isolatedStore.gc.maxFreed "GC_MAX_FREED=${cfg.isolatedStore.gc.maxFreed}"); + ++ lib.optionals (cfg.isolatedStore.gc.maxFreed != null) [ + "GC_MAX_FREED=${cfg.isolatedStore.gc.maxFreed}" + ]; @@ - ${optionalString cfg.isolatedStore.gc.maxFreed ''--max-freed "${cfg.isolatedStore.gc.maxFreed}"''} + ${optionalString (cfg.isolatedStore.gc.maxFreed != null) ''--max-freed "${cfg.isolatedStore.gc.maxFreed}"''}#!/bin/bash set -euo pipefail # Verify no nullable value is passed directly as the condition. rg -n 'optional cfg\.isolatedStore\.gc\.maxFreed|optionalString cfg\.isolatedStore\.gc\.maxFreed' modules/nixos/services/woodpecker-nix.nix # Evaluate the GC environment list; this should not throw bool/null type errors. nix eval .#nixosConfigurations.nixdev.config.systemd.services.woodpecker-nix-gc.serviceConfig.Environment --show-trace >/dev/nullAlso applies to: 667-667
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@modules/nixos/services/woodpecker-nix.nix` around lines 598 - 599, The code passes a nullable value directly as the condition to optional/optionalString (cfg.isolatedStore.gc.maxFreed), causing bool/null type errors; change the calls to use an explicit boolean guard like (cfg.isolatedStore.gc.maxFreed != null) (or builtins.isString cfg.isolatedStore.gc.maxFreed) so the Environment entry "GC_MAX_FREED=${cfg.isolatedStore.gc.maxFreed}" is only added when the value is non-null; update every optional/optionalString usage that references cfg.isolatedStore.gc.maxFreed accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.opencode/skills/testing/SKILL.md:
- Around line 14-28: The example text for the module-graph usage is
inconsistent: it shows JSON output but includes the --report flag which causes
summary-table output; update the example in SKILL.md so the invocation and
sample output match — either remove --report from the example invocation (so the
shown JSON is accurate) or keep --report and replace the JSON sample with the
summary-table/report output; ensure the command line shown (including
SILENT=true, nix run .#module-graph, and flags like --since and --refine)
matches the chosen sample.
In @.woodpecker/checks.yaml:
- Around line 86-101: The eval_apply Nix lambda strings are quoted with double
quotes so the shell can expand ${name}; change both lambda arguments currently
written as "pkgs: builtins.attrNames pkgs |> builtins.filter (name:
(pkgs.${name}.passthru.discovery or true))" and "pkgs: builtins.attrNames pkgs
|> builtins.filter (name: (pkgs.${name}.passthru ? updateScript))" to use single
quotes (') so ${name} reaches Nix unchanged, and update the passthru accesses to
use the safe-existence test operator (e.g. (pkgs.${name}.passthru ? discovery or
true) and (pkgs.${name}.passthru ? updateScript)) so packages without passthru
are handled safely.
In @.woodpecker/update-packages.yaml:
- Around line 1-3: The shared workflow's variables anchor currently defines
BRANCH but is missing BASE_BRANCH which is later referenced (e.g., in the
fetch/diff/base-branch steps), so add a BASE_BRANCH entry to the variables
anchor alongside BRANCH (for example: BASE_BRANCH: &base_branch main or
BASE_BRANCH: main) so the referenced symbol BASE_BRANCH resolves; update any
uses expecting the anchor (if BRANCH uses the PACKAGE anchor pattern, consider
adding BASE_BRANCH: &base_branch ${SOME_DEFAULT} or a similar branch-template)
to ensure lines that reference BASE_BRANCH (the fetch/diff/base-branch steps) no
longer fail.
In `@docs/src/modules/nixos/services/woodpecker_nix.md`:
- Around line 251-253: Update the documentation text to match module behavior:
state that WOODPECKER_ENVIRONMENT is serialized as comma-separated KEY:VALUE
pairs (e.g., PATH:/usr/bin), not KEY=VALUE, and correct the gc.maxFreed default
to "null" (no default size like "2GB"); update any occurrences referencing the
old formats (mentions of WOODPECKER_ENVIRONMENT and the gc.maxFreed default) so
the docs reflect the actual serialization and option default.
In `@flake/ci/scripts/default.nix`:
- Around line 38-44: The discover-packages wrapper (created via
writeNuApplicationWithLibs and named discover-packages) only lists pkgs.fd in
its runtimeInputs, but the script discover-packages.nu requires jq; update the
runtimeInputs for discover-packages to include pkgs.jq so jq is available at
runtime (i.e., add pkgs.jq to the runtimeInputs array alongside pkgs.fd).
In `@flake/ci/scripts/eval.nix`:
- Around line 24-35: The fold in tryGetAttrPath fails when an intermediate value
is not an attrset because the code uses acc.value ? ${attr} without checking
type; change the conditional inside the foldl' (the lambda in tryGetAttrPath) to
first check that acc.value is an attrset using builtins.isAttrs (or
builtins.isAttrSet), e.g. replace "acc.success && acc.value ? ${attr}" with
"acc.success && builtins.isAttrs acc.value && acc.value ? ${attr}", and ensure
the else branch returns { success = false; value = null; } (or the existing
not-found shape) so traversal halts safely when a non-attrset is encountered.
This fixes tryGetAttrPath's traversal guard without changing the overall return
shape.
In `@flake/dev/scripts/module-graph.nu`:
- Around line 284-291: The attr-path interpolation in module-graph.nu builds
attr_path (variable name attr_path) with unquoted dynamic segments ($target and
$option_path) which breaks nix eval for segments containing non-identifier
chars; update the construction of attr_path to wrap dynamic segments in
double-quoted attribute components (i.e. emit
".#(...).(\"<target>\").config.(\"<option_path>\").enable" style components) so
nix eval receives quoted attr-path parts, and also update the
option-detection/refinement regex used elsewhere (the code that recognizes
enable option constructors, e.g. the logic that currently matches
mkEnableOption) to accept the qualified constructor form (e.g.
lib.mkEnableOption) in addition to the unqualified name so refinement/option
detection remains correct.
- Around line 255-261: The regexes in detect_enable_options within
flake/dev/scripts/module-graph.nu only match mkEnableOption and mkOption without
a lib. prefix; update both parse --regex patterns (the one matching
"options.(?<path>...) ... enable = ..." and the earlier multi-line parse) to
accept an optional "lib." prefix by changing (?:mkEnableOption|mkOption) to
(?:lib\.)?(?:mkEnableOption|mkOption) so occurrences like "lib.mkEnableOption"
and "lib.mkOption" are detected.
In `@flake/dev/treefmt.nix`:
- Around line 27-39: The repo is configuring both prettier and yamlfmt to target
YAML which causes formatter conflicts; keep yamlfmt as the sole YAML formatter
by removing YAML globs from Prettier’s include list (i.e. delete or amend the
"*.{yaml,yml}" entry in prettier.includes) or explicitly exclude YAML from
Prettier, while leaving prettier.enable = true and yamlfmt.enable = true (and
its settings/formatter block) unchanged so yamlfmt alone formats *.yaml/*.yml.
In `@hosts/server/nixdev/woodpecker.nix`:
- Line 97: Replace the hardcoded host path in the extraVolumes entry with the
configured woodpeckerNix stateDir so it follows changes to
services.woodpeckerNix.stateDir; e.g. build the mount using the module value
(config.services.woodpeckerNix.stateDir) instead of "/var/lib/woodpecker-nix" so
the line that currently sets extraVolumes = [
"/var/lib/woodpecker-nix/vulnix-cache:/root/.cache/vulnix" ]; becomes a path
concatenation that uses config.services.woodpeckerNix.stateDir (and keep the
"/vulnix-cache:/root/.cache/vulnix" suffix).
In `@lib/nu-lib/flake.nu`:
- Around line 205-211: Summary: When a path was deleted in the diff, the code
unconditionally runs `nix hash file $file` which fails; modify the logic in the
`check_file_changed` flow to detect deleted paths and treat them as changed.
Fix: after creating `old_file` and computing `old_hash` from `prev_blob`, test
whether the current `$file` exists (e.g., `[ -e $file ]` or `test -f $file`)
before calling `nix hash file $file`; if the file does not exist, set a sentinel
`cur_hash` value (or a boolean like `cur_missing=true`) that guarantees the
function reports the file as changed, otherwise compute `cur_hash` as before;
ensure you still `rm -f $old_file` in all cases. Reference symbols: update the
block that creates `old_file`, computes `old_hash` and `cur_hash` (variables
`old_file`, `old_hash`, `cur_hash`, and the surrounding `check_file_changed`
logic using `prev_blob` and `file`) so deleted file paths are handled
gracefully.
In `@modules/nixos/services/woodpecker-nix.nix`:
- Around line 463-473: The overlay init can fail because the script deletes
"${stateDir}/nix/store" and then mounts onto that path without recreating or
ensuring it's not already a mount; update the logic around the non-empty-store
branch and before the mount call (the mv/rm -rf block and the mount -t overlay
... "${stateDir}/nix/store" line) to: if "${stateDir}/nix/store" is a mount,
unmount it (e.g. mountpoint -q and umount -l "${stateDir}/nix/store" || true),
then remove and recreate the directory with mkdir -p "${stateDir}/nix/store" (or
ensure it exists after rm -rf), and only then perform the mount; this makes
initialization idempotent and guarantees the mountpoint exists.
- Around line 399-409: mkIf is returning an attrset ({}) when false which breaks
the list concatenation using ++; replace the problematic mkIf usage (mkIf
overlayEnabled [ pkgs.util-linux ]) with a list-safe conditional such as
lib.optional overlayEnabled pkgs.util-linux (or lib.optionals for multiple
items) so the expression yields [] when disabled and a list when enabled; leave
the other mkIf that merges attrsets (the block setting "${storeRealDir}".d,
"${upperDir}".d, "${workDir}".d) unchanged.
---
Duplicate comments:
In @.woodpecker/lix.yaml:
- Line 78: The workflow currently writes to and later sources the file using the
ambiguous source command `. envvar`; change the sourcing to an explicit relative
path by replacing `. envvar` with `. ./envvar` so the shell reads the envvar
file from the current working directory (the writer that uses `>> envvar`
remains unchanged).
In `@modules/nixos/services/woodpecker-nix.nix`:
- Around line 598-599: The code passes a nullable value directly as the
condition to optional/optionalString (cfg.isolatedStore.gc.maxFreed), causing
bool/null type errors; change the calls to use an explicit boolean guard like
(cfg.isolatedStore.gc.maxFreed != null) (or builtins.isString
cfg.isolatedStore.gc.maxFreed) so the Environment entry
"GC_MAX_FREED=${cfg.isolatedStore.gc.maxFreed}" is only added when the value is
non-null; update every optional/optionalString usage that references
cfg.isolatedStore.gc.maxFreed accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: d2438556-0a76-408a-98ec-41c74014971c
📒 Files selected for processing (48)
.github/actions/setup-nix/action.yaml.github/workflows/ci.yaml.github/workflows/docs.yaml.github/workflows/packages.yaml.github/workflows/update-packages.yaml.gitignore.mergify.yml.opencode/skills/testing/SKILL.md.woodpecker/check-upstream-todos.yaml.woodpecker/check.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.woodpecker/ci-packages.yaml.woodpecker/flake-checker.yaml.woodpecker/lix.yaml.woodpecker/security.yaml.woodpecker/update-packages.yaml.woodpecker/update.yamlAGENTS.mddocs/src/SUMMARY.mddocs/src/modules/nixos/services/woodpecker_nix.mddocs/src/modules/overview.mdflake/ci/scripts/default.nixflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nixflake/ci/scripts/libflake/ci/scripts/setup-attic.nuflake/ci/scripts/update-matrix.nuflake/dev/devenv.nixflake/dev/scripts/default.nixflake/dev/scripts/libflake/dev/scripts/module-graph.nuflake/dev/treefmt.nixflake/packages.nixhosts/server/nixdev/default.nixhosts/server/nixdev/woodpecker.nixlib/nu-lib/flake.nulib/nu-lib/lib.nulib/package.nixlib/strings.nixmodules/home-manager/purpose/development/editors/ai/skills/jujutsu/SKILL.mdmodules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nixpkgs/lix-woodpecker/default.nixpkgs/lix-woodpecker/v2.nixresult.json
💤 Files with no reviewable changes (10)
- .github/workflows/docs.yaml
- .woodpecker/check-upstream-todos.yaml
- .github/workflows/update-packages.yaml
- .github/workflows/ci.yaml
- .woodpecker/check.yaml
- .woodpecker/security.yaml
- result.json
- .github/actions/setup-nix/action.yaml
- .woodpecker/flake-checker.yaml
- .github/workflows/packages.yaml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (18)
**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/code-style-nix)
**/*.nix: Follow Nix code style conventions and best practices
Use consistent indentation and formatting in Nix configuration files
Follow established patterns for module organization in home-manager configurations
**/*.nix: Format code and check syntax usingnix fmt
Evaluate Nix expressions without building usingnix evalwith the target configuration path
Format specific Nix files or directories usingnix fmtfollowed by the file or directory path
Use--show-traceflag withnix buildornix evalcommands to diagnose evaluation errors
For infinite recursion errors in Nix builds, check for circular imports or conflicting option definitions
**/*.nix: Usebuiltins.traceto add trace statements and inspect values during Nix evaluation (format:builtins.trace "message: ${toString var}" var)
Usebuiltins.toJSONto convert complex Nix attribute sets to JSON for easier inspection during evaluation
Check for circular imports between modules and option definitions that depend on themselves to resolve infinite recursion errors
Verify attribute names are correct and imports are complete when debugging 'attribute not found' errors in Nix
Check option type definitions and ensure provided values match the expected type to resolve type mismatch errors
Read assertion messages and provide required configuration values when assertion failures occur in NixOS modulesRun
nix fmton all changed Nix files after modification
**/*.nix: Store sensitive data insecrets.yamlencrypted with sops instead of hardcoding passwords, API keys, or tokens in plain text
Declare sops secrets with properowner,group, andmodeattributes; use restrictive modes like0400for secrets files
SetrestartUnitsorreloadUnitsfor sops secrets declarations so services that depend on secrets are restarted when secrets change
Useconfig.sops.placeholderin sops templates instead of directly interpolating secret paths in multi-secret templates
Do not pass secrets as e...
Files:
flake/dev/devenv.nixmodules/nixos/services/default.nixflake/packages.nixlib/package.nixhosts/server/nixdev/default.nixlib/strings.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixflake/ci/scripts/eval.nixflake/dev/scripts/default.nixhosts/server/nixdev/woodpecker.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
flake/dev/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Dev shell, CI scripts, and formatting tools should be organized in
flake/dev/
Files:
flake/dev/devenv.nixflake/dev/treefmt.nixflake/dev/scripts/default.nix
modules/nixos/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
modules/nixos/**/*.nix: NixOS module structure must follow standard pattern: define config, lib, pkgs as parameters; create cfg variable from config; define options with mkEnableOption, mkOption, mkIf; define config section with mkIf conditional
Create NixOS modules at file pathmodules/nixos/<category>/<name>.nixReusable NixOS module fragments should be placed in
modules/nixos/
Files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
modules/nixos/**/default.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
Register NixOS modules in parent
default.nixusing imports list pattern
Files:
modules/nixos/services/default.nix
modules/nixos/services/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
Use namespace
services.<name>for NixOS system service modules
Files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
modules/**/**/default.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
Use import list pattern in subdirectory
default.nixfiles: define imports array with list of .nix files (e.g.,imports = [ ./service-a.nix ./service-b.nix ])
Files:
modules/nixos/services/default.nix
modules/{nixos,home-manager}/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/testing/SKILL.md)
Add --refine flag to module-graph when narrowing results for files under modules/nixos/ and modules/home-manager/ that expose options..enable
Files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
docs/**/*
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Project documentation should be placed in the
docs/directory
Files:
docs/src/modules/overview.mddocs/src/modules/nixos/services/woodpecker_nix.mddocs/src/SUMMARY.md
docs/src/**/*.md
📄 CodeRabbit inference engine (.opencode/skills/docs/SKILL.md)
docs/src/**/*.md: Use underscore filenames (e.g.,my_new_feature.md) instead of hyphens for documentation files
Keep documentation prose focused on behavior, architecture, usage examples, and operational notes; let generated fragments provide exhaustive option reference
Files:
docs/src/modules/overview.mddocs/src/modules/nixos/services/woodpecker_nix.mddocs/src/SUMMARY.md
docs/src/modules/**/*.md
📄 CodeRabbit inference engine (.opencode/skills/docs/SKILL.md)
For documented modules, prefer build-time generated option fragments via
{{#include}}fromdocs/src/generated/*.mdinstead of hand-maintained option tables
Files:
docs/src/modules/overview.mddocs/src/modules/nixos/services/woodpecker_nix.md
.opencode/skills/**
⚙️ CodeRabbit configuration file
../../modules/home-manager/purpose/development/editors/ai/skills/code-style-nix
../../modules/home-manager/purpose/development/editors/ai/skills/conventional-commits
../../modules/home-manager/purpose/development/editors/ai/skills/jujutsu
../../modules/home-manager/purpose/development/editors/ai/skills/nushell
../../modules/home-manager/purpose/development/editors/ai/skills/systemd-hardening
../../modules/home-manager/purpose/development/editors/ai/skills/tmux
../../modules/home-manager/purpose/development/editors/ai/skills/vhs
Files:
.opencode/skills/testing/SKILL.md
.opencode/skills/testing/**
⚙️ CodeRabbit configuration file
.opencode/skills/testing/**: ---
name: testing
description: Test changes using module-graph and build commandsTesting
Critical Requirement
After making changes you must always evaluate and test them.
Finding Affected Configurations
Use module-graph script to find which hosts and homes are affected by changed files:
./flake/dev/scripts/module-graph.nuThis outputs JSON showing which configs use each file:
{ "file": "modules/nixos/services/tailscale.nix", "hosts": ["nixdev", "nixmi", "nixcloud"], "homes": [] }Minimum Test Requirements
Based on module-graph output, test at least one of each affected type:
Changed File Affects Minimum Test Hosts only Build one affected host Homes only Build one affected home Both hosts and homes Build one host and one home Test Commands
Test host configuration
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevelTest home configuration
nix build .#homeConfigurations."<user>@<host>".activationPackageRun full flake check
nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root"Testing Workflow Example
Make changes to
modules/nixos/services/tailscale.nixRun module-graph to find affected configs:
./flake/dev/scripts/module-graph.nu | jq '.[] | select(.file | contains("tailscale"))'Pick one affected host and build it:
nix build .#nixosConfigurations.nixdev.config.system.build.toplevelIf change also affects homes, build one:
nix build .#homeConfigurations."racci@nixmi".activationPackage
Files:
.opencode/skills/testing/SKILL.md
hosts/*/*/default.nix
📄 CodeRabbit inference engine (.opencode/skills/hosts/SKILL.md)
Each host must have a
default.nixfile inhosts/<type>/<hostname>/as the main config entry pointPer-machine NixOS configurations should be placed in
hosts/<type>/<hostname>/default.nix
Files:
hosts/server/nixdev/default.nix
hosts/server/*/default.nix
📄 CodeRabbit inference engine (.opencode/skills/hosts/SKILL.md)
Server hosts in
default.nixshould sethost.device.isHeadless = trueto indicate they are headless systems
Files:
hosts/server/nixdev/default.nix
hosts/server/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Server machine-specific NixOS configs should be placed in
hosts/server/<machine>/
Files:
hosts/server/nixdev/default.nixhosts/server/nixdev/woodpecker.nix
pkgs/*/default.nix
📄 CodeRabbit inference engine (.opencode/skills/packages/SKILL.md)
pkgs/*/default.nix: Each package must be defined in its own directory underpkgs/with adefault.nixfile containing the package definition
Usestdenv.mkDerivationwith required fields:pname,version,src, andmeta(including description, license, and platforms)
UsewriteShellApplicationbuilder for shell script packages, providingname,text(from readFile), andruntimeInputs
UseautoPatchelfHookinnativeBuildInputsfor binary packages and include aninstallPhaseto place binaries in$out/bin/
For Python applications, usepython3Packages.buildPythonApplicationwithpyproject = true,build-system, anddependenciesfields
Multi-output packages must be defined as a set of derivations in a singledefault.nixand registered by inheriting individual outputs inpkgs/default.nix
Includepassthru.updateScriptin package definitions usingnix-update-scriptwith--flakeflag to support automatic version updates
Files:
pkgs/lix-woodpecker/default.nix
pkgs/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Custom packages and package sets should be organized in
pkgs/
Files:
pkgs/lix-woodpecker/default.nixpkgs/lix-woodpecker/v2.nix
flake/ci/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
CI-specific flake configurations and scripts should be placed in
flake/ci/
Files:
flake/ci/scripts/eval.nixflake/ci/scripts/default.nix
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:50.491Z
Learning: After making changes you must always evaluate and test them before committing
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:50.491Z
Learning: Use module-graph script with --since flag to find affected hosts and homes from changed files since a specified commit or ref
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:50.491Z
Learning: Set SILENT=true environment variable with module-graph to reduce logging verbosity when sending output to LLMs or remote analysis tools
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:50.491Z
Learning: Test at least one affected host configuration when changes affect only hosts
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:50.491Z
Learning: Test at least one affected home-manager configuration when changes affect only homes
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:50.491Z
Learning: Test at least one affected host and one affected home configuration when changes affect both hosts and homes
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:54.675Z
Learning: All affected configurations MUST be tested before submitting changes
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-13T05:40:54.675Z
Learning: Use `--since <COMMIT_HASH> --refine --report` flags with module-graph tool to identify affected configurations before testing
📚 Learning: 2026-03-23T09:37:43.262Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: flake/ci/scripts/setup-attic.nu:20-21
Timestamp: 2026-03-23T09:37:43.262Z
Learning: In flake/ci/scripts/setup-attic.nu, when invoking `attic login`, pass the auth token as a command-line argument. Do not refactor to supply the token via stdin or pipes, since the attic CLI itself does not support token intake through stdin/piped input; treating stdin usage as a security issue in this case should be avoided.
Applied to files:
.gitignore.mergify.yml
📚 Learning: 2026-03-18T23:46:49.905Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: .woodpecker/lix.yaml:15-15
Timestamp: 2026-03-18T23:46:49.905Z
Learning: In nix-config repository (.woodpecker/*.yaml), image references intentionally omit explicit tags or digests (e.g., registry.racci.dev/lix-woodpecker without :tag). Do not flag or suggest adding explicit tags or digests to these image references; treat such omissions as intentional and maintain consistency across the CI config.
Applied to files:
.woodpecker/lix.yaml.woodpecker/update.yaml.woodpecker/ci-homes.yaml.woodpecker/update-packages.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-hosts.yaml.woodpecker/checks.yaml
📚 Learning: 2026-04-13T14:02:32.760Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: hosts/server/nixdev/default.nix:18-18
Timestamp: 2026-04-13T14:02:32.760Z
Learning: When configuring NixOS Docker via `virtualisation.docker.daemon.settings`, it is valid to set `storage-driver = "overlayfs"` (do not flag it as an invalid Docker storage-driver). Use `overlayfs` specifically for Docker Engine 29+ and/or when the containerd snapshotter integration is enabled (`virtualisation.docker.features.containerd-snapshotter = true`). Treat this as the containerd snapshotter name for OverlayFS, distinct from the legacy `overlay2` classic Docker storage driver.
Applied to files:
flake/dev/devenv.nixmodules/nixos/services/default.nixflake/packages.nixlib/package.nixhosts/server/nixdev/default.nixlib/strings.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixflake/ci/scripts/eval.nixflake/dev/scripts/default.nixhosts/server/nixdev/woodpecker.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T10:02:55.261Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/sops.nix:49-53
Timestamp: 2026-05-01T10:02:55.261Z
Learning: In this nix-config repo, when declaring `sops.secrets` in Nix files, avoid explicitly setting `owner = "root"` and/or `group = "root"` if the intended ownership is root. `sops-nix` defaults `sops.secrets` to `root:root`, so adding these fields explicitly is redundant boilerplate.
Applied to files:
flake/dev/devenv.nixmodules/nixos/services/default.nixflake/packages.nixlib/package.nixhosts/server/nixdev/default.nixlib/strings.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixflake/ci/scripts/eval.nixflake/dev/scripts/default.nixhosts/server/nixdev/woodpecker.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T14:14:49.691Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/gaming.nix:119-119
Timestamp: 2026-05-01T14:14:49.691Z
Learning: When configuring the NixOS `wivrn` module option `services.wivrn.config.json.application`, pass the raw package/derivation (e.g., `pkgs.wayvr`) rather than converting it to a string executable path (e.g., `lib.getExe pkgs.wayvr`). The upstream module expects a list of derivations/packages (it internally `toList`s the value, asserts the first element is a derivation, and then resolves the executable internally). Code review should not recommend changing `pkgs.wayvr` to `lib.getExe pkgs.wayvr` for this option.
Applied to files:
flake/dev/devenv.nixmodules/nixos/services/default.nixflake/packages.nixlib/package.nixhosts/server/nixdev/default.nixlib/strings.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixflake/ci/scripts/eval.nixflake/dev/scripts/default.nixhosts/server/nixdev/woodpecker.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-20T13:12:46.610Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: docs/site.nix:127-127
Timestamp: 2026-05-20T13:12:46.610Z
Learning: In DaRacci/nix-config, treating `passthru.discovery = false` as a known repo-wide convention to exclude a derivation from automated flake discovery/package CI. Do not require or flag an inline explanatory comment specifically for the absence of a comment when `passthru.discovery = false` is set.
Applied to files:
flake/dev/devenv.nixmodules/nixos/services/default.nixflake/packages.nixlib/package.nixhosts/server/nixdev/default.nixlib/strings.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixflake/ci/scripts/eval.nixflake/dev/scripts/default.nixhosts/server/nixdev/woodpecker.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T09:11:22.009Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/gaming.nix:65-65
Timestamp: 2026-05-01T09:11:22.009Z
Learning: In Nix code, do not flag shell-variable literals like "$XDG_RUNTIME_DIR" used inside Steam’s `extraEnv` (e.g., `pkgs.steam.override { extraEnv = { ... }; }`, including `modules/nixos/core/gaming.nix`). The Steam wrapper script expands these shell variables at runtime, so they should be treated as intended unexpanded literals rather than an interpolation/quoting mistake.
Applied to files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T14:35:32.037Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/remote.nix:153-179
Timestamp: 2026-05-01T14:35:32.037Z
Learning: In this repo’s NixOS module code (e.g., shell scripts produced via `writeShellApplication` inside `modules/nixos/**`), do not treat missing `XDG_STATE_HOME` fallbacks (like `${XDG_STATE_HOME:-$HOME/.local/state}`) as an error in the embedded shell script. On NixOS user sessions, `XDG_STATE_HOME` is reliably set via PAM/systemd, so flagging its absence as potentially unset is overly defensive for these generated scripts.
Applied to files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T09:57:09.578Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/services/ai-agent.nix:15-15
Timestamp: 2026-05-01T09:57:09.578Z
Learning: In this repo’s Nix modules, `inputs.services-zeroclaw` is a flake input that resolves to an attrset containing a `_file` attribute, and Nix coerces that attrset to a file path via `_file`. When importing/using it as a path in `imports` (e.g., `modules/nixos/services/ai-agent.nix`), use the string interpolation form "${inputs.services-zeroclaw}". Do not change it to `inputs.services-zeroclaw` (raw attrset form) in `imports`, because it will not work correctly.
Applied to files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-04-14T11:31:11.950Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: pkgs/lix-woodpecker/v2.nix:408-409
Timestamp: 2026-04-14T11:31:11.950Z
Learning: In the nix-config repository, pkgs/lix-woodpecker/v2.nix is intentionally copied from the upstream Lix/Woodpecker project with only local modifications. During code review, do not treat or require fixes for issues that are clearly pre-existing from upstream (e.g., path-related problems such as the hydra-build-products issue after gzip) unless the problem is caused by the local changes. Review should focus on verifying and maintaining correctness of the local modifications only, not patching upstream bugs in this tracked file.
Applied to files:
pkgs/lix-woodpecker/default.nixpkgs/lix-woodpecker/v2.nix
🪛 LanguageTool
modules/home-manager/purpose/development/editors/ai/skills/jujutsu/SKILL.md
[typographical] ~88-~88: Two consecutive dots
Context: ... y inclusive | jj log -r main::@ | | x..y | x to y exclusive | `jj log -r main....
(DOUBLE_PUNCTUATION)
[typographical] ~88-~88: Two consecutive dots
Context: ...in::@ | |x..y| x to y exclusive |jj log -r main..@ | |x|y| Union (or) |jj ...
(DOUBLE_PUNCTUATION)
docs/src/modules/nixos/services/woodpecker_nix.md
[uncategorized] ~95-~95: The hyphen in statically-linked is redundant.
Context: ...ecker` image includes a layer with a statically-linked BusyBox binary ...
(ADVERB_LY_HYPHEN_FIX)
[uncategorized] ~121-~121: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...en the bootstrap hash changes), so even manually-deleted symlinks are repaired automatically....
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[uncategorized] ~122-~122: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...omatically. A GC root is also registered so the runtime environment survives gar...
(COMMA_COMPOUND_SENTENCE_2)
[misspelling] ~127-~127: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...re bootstrap The init service computes a SHA-256 hash of the store paths of the ...
(EN_A_VS_AN)
[uncategorized] ~129-~129: Possible missing comma found.
Context: ...Dir>/.bootstrap-hash`. On every service start it compares the recorded hash against t...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~291-~291: Consider an alternative verb to strengthen your wording.
Context: ...nd XDG_DATA_HOME there. If you still see this error after deploy, verify generat...
(IF_YOU_HAVE_THIS_PROBLEM)
[uncategorized] ~291-~291: Possible missing article found.
Context: ...ill see this error after deploy, verify generated unit contains those environment variabl...
(AI_HYDRA_LEO_MISSING_THE)
🪛 markdownlint-cli2 (0.22.1)
docs/src/SUMMARY.md
[warning] 1-1: First line in a file should be a top-level heading
(MD041, first-line-heading, first-line-h1)
🔇 Additional comments (25)
.gitignore (1)
1-1: LGTM!.mergify.yml (1)
50-50: LGTM!flake/packages.nix (1)
16-46: LGTM!pkgs/lix-woodpecker/v2.nix (1)
139-141: Parenthesise the fallback before++.
acc.${v.group} or [ ] ++ [ v.user ]still has the operator-precedence bug that prevents later users from being appended to an existing group list.pkgs/lix-woodpecker/default.nix (1)
10-10: LGTM!Also applies to: 17-35
lib/nu-lib/lib.nu (1)
30-33: Treat blank required env values as missing.Line 32 only checks
null, so a present-but-empty value (for exampleBINARY_CACHE_TOKEN="") still passes validation and--exitwon’t fail fast.flake/ci/scripts/detect-affected-outputs.nu (1)
22-33: Use the mutable localoutputsconsistently in fallback logic.Line 22 declares
mut outputs, but Lines 23, 25, 26, 30, and 33 still use$outputs. This reintroduces the earlier fallback defect.Suggested fix
mut outputs = $outputs - if ($outputs | is-empty) { + if ($outputs | is-empty) { log info "No specific outputs provided, checking all outputs for type ($type)..." - $outputs = get_outputs $type - if ($outputs | is-empty) { + $outputs = get_outputs $type + if ($outputs | is-empty) { log error $"No outputs found for identifier ($type) in flake." exit 1 } - log info $"Found outputs: ($outputs | str join ', ')" + log info $"Found outputs: ($outputs | str join ', ')" } - let output_imports: record = compute_graphs $type $outputs $cache_key $cache_dir $flake_info.source_path + let output_imports: record = compute_graphs $type $outputs $cache_key $cache_dir $flake_info.source_path#!/bin/bash # Verify mixed use of mutable local and parameter symbol. rg -n 'mut outputs = \$outputs|if \(\$outputs \| is-empty\)|\$outputs = get_outputs|compute_graphs \$type \$outputs' flake/ci/scripts/detect-affected-outputs.nulib/package.nix (1)
12-13: LGTM!Also applies to: 50-51, 60-92
lib/strings.nix (1)
6-10: LGTM!Also applies to: 22-35, 50-54, 81-94
flake/ci/scripts/lib (1)
1-1: LGTM!flake/ci/scripts/discover-packages.nu (1)
7-12: LGTM!Also applies to: 14-30, 32-63, 65-113
flake/ci/scripts/setup-attic.nu (1)
1-28: LGTM!flake/ci/scripts/update-matrix.nu (1)
1-51: LGTM!.woodpecker/ci-homes.yaml (1)
1-85: LGTM!.woodpecker/ci-hosts.yaml (1)
1-104: LGTM!.woodpecker/ci-packages.yaml (1)
1-98: LGTM!.woodpecker/lix.yaml (1)
15-16: LGTM!Also applies to: 71-72
.woodpecker/update.yaml (1)
18-19: LGTM!Also applies to: 52-53
modules/nixos/services/default.nix (1)
8-8: LGTM!hosts/server/nixdev/default.nix (1)
18-18: LGTM!docs/src/SUMMARY.md (1)
33-33: LGTM!Also applies to: 86-86
docs/src/modules/overview.md (1)
28-28: LGTM!AGENTS.md (1)
52-57: LGTM!Also applies to: 69-76
.opencode/skills/testing/SKILL.md (1)
72-75: LGTM!modules/home-manager/purpose/development/editors/ai/skills/jujutsu/SKILL.md (1)
19-33: LGTM!Also applies to: 81-97
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 📃 Configuration Change RequirementsWonderful, this rule succeeded.Mergify configuration change
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 Do not merge outdated PRsWonderful, this rule succeeded.Make sure PRs are almost up to date before merging
|
- Add ci.yaml for flake checks and affected output builds - Add packages.yaml for package building with static matrix - Add update-packages.yaml for automated package updates - Complete docker.yaml for lix-woodpecker image publishing
Kind of breaks stuff aparantly only one forge can be provisioned via envs style: nix fmt
feat(scripts/module-graph): refine affected hosts by enable options feat(scripts/module-graph): add summary report flag
docs(ai): recommend SILENT=true to reduce LLM token usage for module-graph
… + directory structure
fix(ci): package and host affected detection
makes it so the push trigger only happens for the master branch
…le unprivileged containers
3bab452 to
1a89def
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (2)
modules/nixos/services/woodpecker-nix.nix (1)
367-371:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMake the profiles bind mount read-only again.
Line [370] mounts
/nix/var/nix/profileswritable, allowing pipeline containers to mutate profile symlinks. Keep this mount:roto preserve the intended boundary.Suggested patch
extraVolumes = [ "${stateDir}/nix:/nix" "${stateDir}/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket" - "${stateDir}/nix/var/nix/profiles:/nix/var/nix/profiles" + "${stateDir}/nix/var/nix/profiles:/nix/var/nix/profiles:ro" ];🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@modules/nixos/services/woodpecker-nix.nix` around lines 367 - 371, The profiles volume mount in the extraVolumes list at line 370 is currently mounted as writable, which allows pipeline containers to mutate profile symlinks. Add the :ro suffix to the end of the /nix/var/nix/profiles mount path in the extraVolumes array to make it read-only and preserve the intended boundary..woodpecker/checks.yaml (1)
67-67:⚠️ Potential issue | 🟠 Major | ⚡ Quick winManual/first-run GitGuardian path can become an effective no-op.
When
CI_PREV_COMMIT_SHAis missing, the command falls back toHEAD..(empty range), so this step can pass without scanning any commit content. Use an explicit fallback scan mode for that branch (for example, repo scan).💡 Proposed fix
- commands: ggshield secret scan commit-range $${CI_PREV_COMMIT_SHA:-HEAD}.. + commands: | + if [ -n "$${CI_PREV_COMMIT_SHA:-}" ]; then + ggshield secret scan commit-range "$${CI_PREV_COMMIT_SHA}..$${CI_COMMIT_SHA}" + else + ggshield secret scan repo . + fi#!/bin/bash set -euo pipefail RANGE="${CI_PREV_COMMIT_SHA:-HEAD}.." echo "Computed range: $RANGE" git rev-list --count "$RANGE" # Expected when CI_PREV_COMMIT_SHA is unset: 0 (empty range).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.woodpecker/checks.yaml at line 67, Modify the ggshield secret scan commit-range command to handle the missing CI_PREV_COMMIT_SHA case more robustly. Instead of allowing the fallback to create an empty commit-range (HEAD..), add conditional logic to use an alternative scan mode like ggshield secret scan repo when CI_PREV_COMMIT_SHA is unavailable. This ensures the security check actually scans content on first-run or manual executions instead of becoming a no-op.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.opencode/skills/testing/SKILL.md:
- Around line 20-24: The fenced code block in the SKILL.md file at the specified
location is empty and lacks a language tag, which causes markdownlint warnings
and provides no useful documentation. Add a language tag (such as `text`) to the
fenced code block and populate it with an actual example of the report output
that would be generated by the command, or remove the empty block entirely if an
example is not needed.
In @.woodpecker/ci-hosts.yaml:
- Around line 49-60: The bash script uses `set -euo pipefail` which causes the
entire step to fail hard if the `nix run .#detect-affected-outputs` command
fails transiently (with stderr suppressed). Modify the logic around the
`detect-affected-outputs` invocation to handle failures explicitly with a
fail-open approach: if the detection command fails, set SHOULD_BUILD to true to
build defensively rather than letting the error propagate and fail the host
step. Mirror the same error handling pattern that is already implemented in
`.woodpecker/ci-homes.yaml` to maintain consistency across the CI configuration.
In `@docs/src/modules/nixos/services/woodpecker_nix.md`:
- Around line 175-178: The fenced code block containing the error message about
the woodpecker-ci-runtime path is missing a language identifier, which violates
the markdown linting rule MD040. Add the language identifier `text` immediately
after the opening backticks of the fenced code block (change the opening ``` to
```text) to properly specify that this is a text/error output block.
- Around line 67-70: The description for the `woodpecker-nix-propagate` service
entry in the table is inaccurate in stating it "Runs continuously." Update the
service description to clarify that it performs a single audit scan of the
overlayfs upper layer and then exits, with the periodic execution being
triggered by the `woodpecker-nix-propagate.timer` unit (not the service itself
running continuously). Keep the rest of the service description intact (auditing
the overlayfs upper layer, logging to journal, updating cache, etc.).
In `@flake/ci/scripts/detect-affected-outputs.nu`:
- Around line 12-13: The parameter declaration for --outputs in the
detect-affected-outputs.nu script specifies list<string> type on line 12, but
the Woodpecker configuration files are passing single scalar string values
instead of explicit list syntax. Nushell does not coerce scalars to lists
automatically, causing a type mismatch. Choose one approach to fix this: either
update all --outputs invocations in the Woodpecker YAML files to use explicit
list syntax with square brackets around the scalar values, or change the
--outputs parameter type to string and add internal conversion logic using into
list if multiple outputs need to be supported.
---
Duplicate comments:
In @.woodpecker/checks.yaml:
- Line 67: Modify the ggshield secret scan commit-range command to handle the
missing CI_PREV_COMMIT_SHA case more robustly. Instead of allowing the fallback
to create an empty commit-range (HEAD..), add conditional logic to use an
alternative scan mode like ggshield secret scan repo when CI_PREV_COMMIT_SHA is
unavailable. This ensures the security check actually scans content on first-run
or manual executions instead of becoming a no-op.
In `@modules/nixos/services/woodpecker-nix.nix`:
- Around line 367-371: The profiles volume mount in the extraVolumes list at
line 370 is currently mounted as writable, which allows pipeline containers to
mutate profile symlinks. Add the :ro suffix to the end of the
/nix/var/nix/profiles mount path in the extraVolumes array to make it read-only
and preserve the intended boundary.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7b806e38-3013-496d-a933-8adbb8590a6c
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (50)
.github/actions/setup-nix/action.yaml.github/workflows/ci.yaml.github/workflows/docs.yaml.github/workflows/packages.yaml.github/workflows/update-packages.yaml.gitignore.mergify.yml.opencode/skills/testing/SKILL.md.woodpecker/check-upstream-todos.yaml.woodpecker/check.yaml.woodpecker/checks.yaml.woodpecker/ci-homes.yaml.woodpecker/ci-hosts.yaml.woodpecker/ci-packages.yaml.woodpecker/flake-checker.yaml.woodpecker/lix.yaml.woodpecker/security.yaml.woodpecker/update-packages.yaml.woodpecker/update.yamlAGENTS.mddocs/src/SUMMARY.mddocs/src/modules/home-manager/hyprland.mddocs/src/modules/nixos/services/woodpecker_nix.mddocs/src/modules/overview.mdflake/ci/scripts/default.nixflake/ci/scripts/detect-affected-outputs.nuflake/ci/scripts/discover-packages.nuflake/ci/scripts/eval.nixflake/ci/scripts/libflake/ci/scripts/setup-attic.nuflake/ci/scripts/update-matrix.nuflake/dev/devenv.nixflake/dev/scripts/default.nixflake/dev/scripts/libflake/dev/scripts/lib/flake.nuflake/dev/scripts/module-graph.nuflake/dev/treefmt.nixflake/packages.nixhosts/server/nixdev/default.nixhosts/server/nixdev/woodpecker.nixlib/nu-lib/flake.nulib/nu-lib/lib.nulib/package.nixlib/strings.nixmodules/home-manager/purpose/development/editors/ai/skills/jujutsu/SKILL.mdmodules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nixpkgs/lix-woodpecker/default.nixpkgs/lix-woodpecker/v2.nixresult.json
💤 Files with no reviewable changes (11)
- .woodpecker/check-upstream-todos.yaml
- .github/workflows/docs.yaml
- result.json
- .github/workflows/update-packages.yaml
- .woodpecker/check.yaml
- .github/workflows/ci.yaml
- flake/dev/scripts/lib/flake.nu
- .woodpecker/security.yaml
- .github/workflows/packages.yaml
- .github/actions/setup-nix/action.yaml
- .woodpecker/flake-checker.yaml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (19)
**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/code-style-nix)
**/*.nix: Follow Nix code style conventions and best practices
Use consistent indentation and formatting in Nix configuration files
Follow established patterns for module organization in home-manager configurations
**/*.nix: Format code and check syntax usingnix fmt
Evaluate Nix expressions without building usingnix evalwith the target configuration path
Format specific Nix files or directories usingnix fmtfollowed by the file or directory path
Use--show-traceflag withnix buildornix evalcommands to diagnose evaluation errors
For infinite recursion errors in Nix builds, check for circular imports or conflicting option definitions
**/*.nix: Usebuiltins.traceto add trace statements and inspect values during Nix evaluation (format:builtins.trace "message: ${toString var}" var)
Usebuiltins.toJSONto convert complex Nix attribute sets to JSON for easier inspection during evaluation
Check for circular imports between modules and option definitions that depend on themselves to resolve infinite recursion errors
Verify attribute names are correct and imports are complete when debugging 'attribute not found' errors in Nix
Check option type definitions and ensure provided values match the expected type to resolve type mismatch errors
Read assertion messages and provide required configuration values when assertion failures occur in NixOS modulesRun
nix fmton all changed Nix files after modification
**/*.nix: Store sensitive data insecrets.yamlencrypted with sops instead of hardcoding passwords, API keys, or tokens in plain text
Declare sops secrets with properowner,group, andmodeattributes; use restrictive modes like0400for secrets files
SetrestartUnitsorreloadUnitsfor sops secrets declarations so services that depend on secrets are restarted when secrets change
Useconfig.sops.placeholderin sops templates instead of directly interpolating secret paths in multi-secret templates
Do not pass secrets as e...
Files:
hosts/server/nixdev/default.nixmodules/nixos/services/default.nixflake/dev/devenv.nixflake/packages.nixhosts/server/nixdev/woodpecker.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixlib/package.nixlib/strings.nixflake/dev/scripts/default.nixflake/ci/scripts/eval.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
hosts/*/*/default.nix
📄 CodeRabbit inference engine (.opencode/skills/hosts/SKILL.md)
Each host must have a
default.nixfile inhosts/<type>/<hostname>/as the main config entry pointPer-machine NixOS configurations should be placed in
hosts/<type>/<hostname>/default.nix
Files:
hosts/server/nixdev/default.nix
hosts/server/*/default.nix
📄 CodeRabbit inference engine (.opencode/skills/hosts/SKILL.md)
Server hosts in
default.nixshould sethost.device.isHeadless = trueto indicate they are headless systems
Files:
hosts/server/nixdev/default.nix
hosts/server/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Server machine-specific NixOS configs should be placed in
hosts/server/<machine>/
Files:
hosts/server/nixdev/default.nixhosts/server/nixdev/woodpecker.nix
docs/**/*
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Project documentation should be placed in the
docs/directory
Files:
docs/src/modules/overview.mddocs/src/SUMMARY.mddocs/src/modules/home-manager/hyprland.mddocs/src/modules/nixos/services/woodpecker_nix.md
docs/src/**/*.md
📄 CodeRabbit inference engine (.opencode/skills/docs/SKILL.md)
docs/src/**/*.md: Use underscore filenames (e.g.,my_new_feature.md) instead of hyphens for documentation files
Keep documentation prose focused on behavior, architecture, usage examples, and operational notes; let generated fragments provide exhaustive option reference
Files:
docs/src/modules/overview.mddocs/src/SUMMARY.mddocs/src/modules/home-manager/hyprland.mddocs/src/modules/nixos/services/woodpecker_nix.md
docs/src/modules/**/*.md
📄 CodeRabbit inference engine (.opencode/skills/docs/SKILL.md)
For documented modules, prefer build-time generated option fragments via
{{#include}}fromdocs/src/generated/*.mdinstead of hand-maintained option tables
Files:
docs/src/modules/overview.mddocs/src/modules/home-manager/hyprland.mddocs/src/modules/nixos/services/woodpecker_nix.md
modules/nixos/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
modules/nixos/**/*.nix: NixOS module structure must follow standard pattern: define config, lib, pkgs as parameters; create cfg variable from config; define options with mkEnableOption, mkOption, mkIf; define config section with mkIf conditional
Create NixOS modules at file pathmodules/nixos/<category>/<name>.nixReusable NixOS module fragments should be placed in
modules/nixos/
Files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
modules/nixos/**/default.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
Register NixOS modules in parent
default.nixusing imports list pattern
Files:
modules/nixos/services/default.nix
modules/nixos/services/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
Use namespace
services.<name>for NixOS system service modules
Files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
modules/**/**/default.nix
📄 CodeRabbit inference engine (.opencode/skills/modules/SKILL.md)
Use import list pattern in subdirectory
default.nixfiles: define imports array with list of .nix files (e.g.,imports = [ ./service-a.nix ./service-b.nix ])
Files:
modules/nixos/services/default.nix
{modules/nixos/**/*.nix,modules/home-manager/**/*.nix,flake.nix}
📄 CodeRabbit inference engine (.opencode/skills/testing/SKILL.md)
{modules/nixos/**/*.nix,modules/home-manager/**/*.nix,flake.nix}: Use module-graph script with--sinceto find affected hosts and homes when testing changes in NixOS/Home Manager configurations
Test both at least one affected host and one affected home when changes affect both, using: nix build .#nixosConfigurations..config.system.build.toplevel and nix build .#homeConfigurations."@".activationPackage
Files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
{modules/nixos/**/*.nix,flake.nix}
📄 CodeRabbit inference engine (.opencode/skills/testing/SKILL.md)
Test at least one affected host when changes affect hosts only, by running: nix build .#nixosConfigurations..config.system.build.toplevel
Files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
flake/dev/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Dev shell, CI scripts, and formatting tools should be organized in
flake/dev/
Files:
flake/dev/devenv.nixflake/dev/treefmt.nixflake/dev/scripts/default.nix
.opencode/skills/**
⚙️ CodeRabbit configuration file
../../modules/home-manager/purpose/development/editors/ai/skills/code-style-nix
../../modules/home-manager/purpose/development/editors/ai/skills/conventional-commits
../../modules/home-manager/purpose/development/editors/ai/skills/jujutsu
../../modules/home-manager/purpose/development/editors/ai/skills/nushell
../../modules/home-manager/purpose/development/editors/ai/skills/systemd-hardening
../../modules/home-manager/purpose/development/editors/ai/skills/tmux
../../modules/home-manager/purpose/development/editors/ai/skills/vhs
Files:
.opencode/skills/testing/SKILL.md
.opencode/skills/testing/**
⚙️ CodeRabbit configuration file
.opencode/skills/testing/**: ---
name: testing
description: Test changes using module-graph and build commandsTesting
Critical Requirement
After making changes you must always evaluate and test them.
Finding Affected Configurations
Use module-graph script to find which hosts and homes are affected by changed files:
./flake/dev/scripts/module-graph.nuThis outputs JSON showing which configs use each file:
{ "file": "modules/nixos/services/tailscale.nix", "hosts": ["nixdev", "nixmi", "nixcloud"], "homes": [] }Minimum Test Requirements
Based on module-graph output, test at least one of each affected type:
Changed File Affects Minimum Test Hosts only Build one affected host Homes only Build one affected home Both hosts and homes Build one host and one home Test Commands
Test host configuration
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevelTest home configuration
nix build .#homeConfigurations."<user>@<host>".activationPackageRun full flake check
nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root"Testing Workflow Example
Make changes to
modules/nixos/services/tailscale.nixRun module-graph to find affected configs:
./flake/dev/scripts/module-graph.nu | jq '.[] | select(.file | contains("tailscale"))'Pick one affected host and build it:
nix build .#nixosConfigurations.nixdev.config.system.build.toplevelIf change also affects homes, build one:
nix build .#homeConfigurations."racci@nixmi".activationPackage
Files:
.opencode/skills/testing/SKILL.md
pkgs/*/default.nix
📄 CodeRabbit inference engine (.opencode/skills/packages/SKILL.md)
pkgs/*/default.nix: Each package must be defined in its own directory underpkgs/with adefault.nixfile containing the package definition
Usestdenv.mkDerivationwith required fields:pname,version,src, andmeta(including description, license, and platforms)
UsewriteShellApplicationbuilder for shell script packages, providingname,text(from readFile), andruntimeInputs
UseautoPatchelfHookinnativeBuildInputsfor binary packages and include aninstallPhaseto place binaries in$out/bin/
For Python applications, usepython3Packages.buildPythonApplicationwithpyproject = true,build-system, anddependenciesfields
Multi-output packages must be defined as a set of derivations in a singledefault.nixand registered by inheriting individual outputs inpkgs/default.nix
Includepassthru.updateScriptin package definitions usingnix-update-scriptwith--flakeflag to support automatic version updates
Files:
pkgs/lix-woodpecker/default.nix
pkgs/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
Custom packages and package sets should be organized in
pkgs/
Files:
pkgs/lix-woodpecker/default.nixpkgs/lix-woodpecker/v2.nix
flake/ci/**/*.nix
📄 CodeRabbit inference engine (.opencode/skills/project-structure/SKILL.md)
CI-specific flake configurations and scripts should be placed in
flake/ci/
Files:
flake/ci/scripts/eval.nixflake/ci/scripts/default.nix
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-14T13:49:42.228Z
Learning: After making changes you must always evaluate and test them
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-14T13:49:47.831Z
Learning: Use DevEnv override '--override-input devenv-root "file+file://$PWD/.devenv/root"' when running nix flake check and nix develop commands.
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-14T13:49:47.831Z
Learning: Use the module-graph tool with '--since' flag to identify affected configurations, preferring output limited to files changed in the specified range.
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-14T13:49:47.831Z
Learning: Use the module-graph tool with '--refine' flag to narrow host or home lists for files under modules/nixos/ and modules/home-manager/ when modules expose options.<path>.enable.
Learnt from: CR
Repo: DaRacci/nix-config
Timestamp: 2026-06-14T13:49:47.831Z
Learning: Set 'SILENT=true' environment variable when sending module-graph output to LLMs or remote analysis tools to reduce logging verbosity and token usage.
📚 Learning: 2026-04-13T14:02:32.760Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: hosts/server/nixdev/default.nix:18-18
Timestamp: 2026-04-13T14:02:32.760Z
Learning: When configuring NixOS Docker via `virtualisation.docker.daemon.settings`, it is valid to set `storage-driver = "overlayfs"` (do not flag it as an invalid Docker storage-driver). Use `overlayfs` specifically for Docker Engine 29+ and/or when the containerd snapshotter integration is enabled (`virtualisation.docker.features.containerd-snapshotter = true`). Treat this as the containerd snapshotter name for OverlayFS, distinct from the legacy `overlay2` classic Docker storage driver.
Applied to files:
hosts/server/nixdev/default.nixmodules/nixos/services/default.nixflake/dev/devenv.nixflake/packages.nixhosts/server/nixdev/woodpecker.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixlib/package.nixlib/strings.nixflake/dev/scripts/default.nixflake/ci/scripts/eval.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T10:02:55.261Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/sops.nix:49-53
Timestamp: 2026-05-01T10:02:55.261Z
Learning: In this nix-config repo, when declaring `sops.secrets` in Nix files, avoid explicitly setting `owner = "root"` and/or `group = "root"` if the intended ownership is root. `sops-nix` defaults `sops.secrets` to `root:root`, so adding these fields explicitly is redundant boilerplate.
Applied to files:
hosts/server/nixdev/default.nixmodules/nixos/services/default.nixflake/dev/devenv.nixflake/packages.nixhosts/server/nixdev/woodpecker.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixlib/package.nixlib/strings.nixflake/dev/scripts/default.nixflake/ci/scripts/eval.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T14:14:49.691Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/gaming.nix:119-119
Timestamp: 2026-05-01T14:14:49.691Z
Learning: When configuring the NixOS `wivrn` module option `services.wivrn.config.json.application`, pass the raw package/derivation (e.g., `pkgs.wayvr`) rather than converting it to a string executable path (e.g., `lib.getExe pkgs.wayvr`). The upstream module expects a list of derivations/packages (it internally `toList`s the value, asserts the first element is a derivation, and then resolves the executable internally). Code review should not recommend changing `pkgs.wayvr` to `lib.getExe pkgs.wayvr` for this option.
Applied to files:
hosts/server/nixdev/default.nixmodules/nixos/services/default.nixflake/dev/devenv.nixflake/packages.nixhosts/server/nixdev/woodpecker.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixlib/package.nixlib/strings.nixflake/dev/scripts/default.nixflake/ci/scripts/eval.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-20T13:12:46.610Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: docs/site.nix:127-127
Timestamp: 2026-05-20T13:12:46.610Z
Learning: In DaRacci/nix-config, treating `passthru.discovery = false` as a known repo-wide convention to exclude a derivation from automated flake discovery/package CI. Do not require or flag an inline explanatory comment specifically for the absence of a comment when `passthru.discovery = false` is set.
Applied to files:
hosts/server/nixdev/default.nixmodules/nixos/services/default.nixflake/dev/devenv.nixflake/packages.nixhosts/server/nixdev/woodpecker.nixflake/dev/treefmt.nixpkgs/lix-woodpecker/default.nixlib/package.nixlib/strings.nixflake/dev/scripts/default.nixflake/ci/scripts/eval.nixpkgs/lix-woodpecker/v2.nixflake/ci/scripts/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-03-23T09:37:43.262Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: flake/ci/scripts/setup-attic.nu:20-21
Timestamp: 2026-03-23T09:37:43.262Z
Learning: In flake/ci/scripts/setup-attic.nu, when invoking `attic login`, pass the auth token as a command-line argument. Do not refactor to supply the token via stdin or pipes, since the attic CLI itself does not support token intake through stdin/piped input; treating stdin usage as a security issue in this case should be avoided.
Applied to files:
.gitignore.mergify.yml
📚 Learning: 2026-05-01T09:11:22.009Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/gaming.nix:65-65
Timestamp: 2026-05-01T09:11:22.009Z
Learning: In Nix code, do not flag shell-variable literals like "$XDG_RUNTIME_DIR" used inside Steam’s `extraEnv` (e.g., `pkgs.steam.override { extraEnv = { ... }; }`, including `modules/nixos/core/gaming.nix`). The Steam wrapper script expands these shell variables at runtime, so they should be treated as intended unexpanded literals rather than an interpolation/quoting mistake.
Applied to files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T14:35:32.037Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/core/remote.nix:153-179
Timestamp: 2026-05-01T14:35:32.037Z
Learning: In this repo’s NixOS module code (e.g., shell scripts produced via `writeShellApplication` inside `modules/nixos/**`), do not treat missing `XDG_STATE_HOME` fallbacks (like `${XDG_STATE_HOME:-$HOME/.local/state}`) as an error in the embedded shell script. On NixOS user sessions, `XDG_STATE_HOME` is reliably set via PAM/systemd, so flagging its absence as potentially unset is overly defensive for these generated scripts.
Applied to files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-05-01T09:57:09.578Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 544
File: modules/nixos/services/ai-agent.nix:15-15
Timestamp: 2026-05-01T09:57:09.578Z
Learning: In this repo’s Nix modules, `inputs.services-zeroclaw` is a flake input that resolves to an attrset containing a `_file` attribute, and Nix coerces that attrset to a file path via `_file`. When importing/using it as a path in `imports` (e.g., `modules/nixos/services/ai-agent.nix`), use the string interpolation form "${inputs.services-zeroclaw}". Do not change it to `inputs.services-zeroclaw` (raw attrset form) in `imports`, because it will not work correctly.
Applied to files:
modules/nixos/services/default.nixmodules/nixos/services/woodpecker-nix.nix
📚 Learning: 2026-03-18T23:46:49.905Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: .woodpecker/lix.yaml:15-15
Timestamp: 2026-03-18T23:46:49.905Z
Learning: In nix-config repository (.woodpecker/*.yaml), image references intentionally omit explicit tags or digests (e.g., registry.racci.dev/lix-woodpecker without :tag). Do not flag or suggest adding explicit tags or digests to these image references; treat such omissions as intentional and maintain consistency across the CI config.
Applied to files:
.woodpecker/update.yaml.woodpecker/lix.yaml.woodpecker/ci-packages.yaml.woodpecker/ci-homes.yaml.woodpecker/update-packages.yaml.woodpecker/ci-hosts.yaml.woodpecker/checks.yaml
📚 Learning: 2026-04-14T11:31:11.950Z
Learnt from: DaRacci
Repo: DaRacci/nix-config PR: 546
File: pkgs/lix-woodpecker/v2.nix:408-409
Timestamp: 2026-04-14T11:31:11.950Z
Learning: In the nix-config repository, pkgs/lix-woodpecker/v2.nix is intentionally copied from the upstream Lix/Woodpecker project with only local modifications. During code review, do not treat or require fixes for issues that are clearly pre-existing from upstream (e.g., path-related problems such as the hydra-build-products issue after gzip) unless the problem is caused by the local changes. Review should focus on verifying and maintaining correctness of the local modifications only, not patching upstream bugs in this tracked file.
Applied to files:
pkgs/lix-woodpecker/default.nixpkgs/lix-woodpecker/v2.nix
🪛 LanguageTool
docs/src/modules/nixos/services/woodpecker_nix.md
[grammar] ~66-~66: It appears that a pronoun is missing.
Context: ...h the overlayfs-backed store at /nix. Depends on woodpecker-nix-mount.service. Poll...
(SENT_START_DEPENDS)
[uncategorized] ~101-~101: The hyphen in statically-linked is redundant.
Context: ...ecker` image includes a layer with a statically-linked BusyBox binary ...
(ADVERB_LY_HYPHEN_FIX)
[uncategorized] ~127-~127: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...en the bootstrap hash changes), so even manually-deleted symlinks are repaired automatically....
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[uncategorized] ~128-~128: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...omatically. A GC root is also registered so the runtime environment survives gar...
(COMMA_COMPOUND_SENTENCE_2)
[misspelling] ~133-~133: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...re bootstrap The init service computes a SHA-256 hash of the store paths of the ...
(EN_A_VS_AN)
[uncategorized] ~135-~135: Possible missing comma found.
Context: ...Dir>/.bootstrap-hash`. On every service start it compares the recorded hash against t...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~333-~333: Possible missing article found.
Context: ...h is read-only inside service sandbox. Module now points HOME, XDG_CACHE_HOME, `X...
(AI_HYDRA_LEO_MISSING_THE)
[style] ~336-~336: Consider an alternative verb to strengthen your wording.
Context: ...the parent ${stateDir}. If you still see this error after deploy, verify generat...
(IF_YOU_HAVE_THIS_PROBLEM)
[uncategorized] ~336-~336: Possible missing article found.
Context: ...ill see this error after deploy, verify generated unit contains those environment variabl...
(AI_HYDRA_LEO_MISSING_THE)
🪛 markdownlint-cli2 (0.22.1)
.opencode/skills/testing/SKILL.md
[warning] 22-22: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
docs/src/modules/nixos/services/woodpecker_nix.md
[warning] 175-175: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (21)
.gitignore (1)
1-1: LGTM!.mergify.yml (1)
50-50: LGTM!flake/packages.nix (1)
16-46: LGTM!modules/home-manager/purpose/development/editors/ai/skills/jujutsu/SKILL.md (1)
93-97: LGTM!docs/src/modules/home-manager/hyprland.md (1)
25-25: LGTM!Also applies to: 149-149, 192-192
pkgs/lix-woodpecker/v2.nix (1)
293-301: The static-shell documentation drift is still unresolved.This branch now installs static Bash/Coreutils at
/bin/shand/usr/bin/env, butdocs/src/modules/nixos/services/woodpecker_nix.md:100-104still documents BusyBox there. Please either switch the payload back or update the docs in the same PR so operators validate the right image contents.As per coding guidelines, documentation in
docs/must be updated simultaneously with.nixchanges.Source: Coding guidelines
lib/nu-lib/lib.nu (1)
1-75: LGTM!lib/nu-lib/flake.nu (1)
1-228: LGTM!lib/package.nix (1)
12-12: LGTM!Also applies to: 50-50, 60-93
lib/strings.nix (1)
6-10: LGTM!Also applies to: 22-35, 50-54, 81-94
flake/ci/scripts/default.nix (1)
8-10: LGTM!Also applies to: 33-45, 47-54, 65-73
flake/ci/scripts/discover-packages.nu (1)
1-114: LGTM!flake/ci/scripts/eval.nix (1)
1-100: LGTM!flake/ci/scripts/lib (1)
1-1: LGTM!flake/ci/scripts/setup-attic.nu (1)
1-28: LGTM!flake/ci/scripts/update-matrix.nu (1)
1-51: LGTM!flake/dev/scripts/default.nix (1)
8-46: LGTM!flake/dev/scripts/lib (1)
1-1: LGTM!flake/dev/scripts/module-graph.nu (1)
5-56: LGTM!Also applies to: 75-85, 87-111, 114-115, 132-133, 168-342
flake/dev/devenv.nix (1)
38-39: LGTM!flake/dev/treefmt.nix (1)
27-27: LGTM!Also applies to: 44-57
| This will output a report similar to the following, showing which hosts and homes are affected by the changes: | ||
|
|
||
| ``` | ||
|
|
||
| ```json | ||
| { | ||
| "file": "modules/nixos/services/tailscale.nix", | ||
| "hosts": ["nixdev", "nixmi", "nixcloud"], | ||
| "homes": [] | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Replace the empty report example.
The fenced block is blank and has no language tag, so the doc shows no sample output and markdownlint will complain. Use a labelled fence with an actual --report example, or drop the block altogether.
♻️ Proposed fix
-This will output a report similar to the following, showing which hosts and homes are affected by the changes:
-
-```
-
-```
+This will output a report similar to the following, showing which hosts and homes are affected by the changes:
+
+```text
+<report output>
+```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This will output a report similar to the following, showing which hosts and homes are affected by the changes: | |
| ``` | |
| ```json | |
| { | |
| "file": "modules/nixos/services/tailscale.nix", | |
| "hosts": ["nixdev", "nixmi", "nixcloud"], | |
| "homes": [] | |
| } | |
| ``` | |
| This will output a report similar to the following, showing which hosts and homes are affected by the changes: | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 22-22: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.opencode/skills/testing/SKILL.md around lines 20 - 24, The fenced code
block in the SKILL.md file at the specified location is empty and lacks a
language tag, which causes markdownlint warnings and provides no useful
documentation. Add a language tag (such as `text`) to the fenced code block and
populate it with an actual example of the report output that would be generated
by the command, or remove the empty block entirely if an example is not needed.
Source: Linters/SAST tools
| set -euo pipefail | ||
|
|
||
| SHOULD_BUILD=false | ||
| if [ "$${CI_PREV_PIPELINE_STATUS}" = "error" ]; then | ||
| echo "Previous pipeline failed for $${HOST}, Building to check if it was a transient issue." | ||
| SHOULD_BUILD=true | ||
| else | ||
| echo "Previous pipeline state was $${CI_PREV_PIPELINE_STATUS} for $${HOST}, checking if it is affected by changes." | ||
| if [ -n "$${CI_PREV_COMMIT_SHA:-}" ]; then | ||
| RANGE="$${CI_PREV_COMMIT_SHA}..$${CI_COMMIT_SHA}" | ||
| AFFECTED=$(nix run .#detect-affected-outputs -- nixosConfigurations --json --range "$${RANGE}" --outputs "$${HOST}" 2>/dev/null) | ||
| if echo "$${AFFECTED}" | jq -e --arg host "$${HOST}" 'has($host)' > /dev/null 2>&1; then |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C3 'detect-affected-outputs|SHOULD_BUILD=true|set -euo pipefail' .woodpecker/ci-hosts.yaml .woodpecker/ci-homes.yaml
# Verify ci-hosts currently lacks guarded failure handling while ci-homes has it.Repository: DaRacci/nix-config
Length of output: 4005
Handle affected-output detection failures explicitly instead of hard-failing the host step.
With set -euo pipefail, a transient failure in detect-affected-outputs exits the step immediately (and stderr is suppressed), turning detection issues into full host CI failures. Mirror the fail-open handling already used in .woodpecker/ci-homes.yaml so detection failure builds defensively.
💡 Proposed fix
- AFFECTED=$(nix run .#detect-affected-outputs -- nixosConfigurations --json --range "$${RANGE}" --outputs "$${HOST}" 2>/dev/null)
- if echo "$${AFFECTED}" | jq -e --arg host "$${HOST}" 'has($host)' > /dev/null 2>&1; then
+ if ! AFFECTED=$(nix run .#detect-affected-outputs -- nixosConfigurations --json --range "$${RANGE}" --outputs "$${HOST}" 2>/dev/null); then
+ echo "Failed to detect affected outputs; building $${HOST} to be safe."
+ SHOULD_BUILD=true
+ elif echo "$${AFFECTED}" | jq -e --arg host "$${HOST}" 'has($host)' > /dev/null 2>&1; then
echo "Host $${HOST} is affected by changes, proceeding with build"
SHOULD_BUILD=true
else🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.woodpecker/ci-hosts.yaml around lines 49 - 60, The bash script uses `set
-euo pipefail` which causes the entire step to fail hard if the `nix run
.#detect-affected-outputs` command fails transiently (with stderr suppressed).
Modify the logic around the `detect-affected-outputs` invocation to handle
failures explicitly with a fail-open approach: if the detection command fails,
set SHOULD_BUILD to true to build defensively rather than letting the error
propagate and fail the host step. Mirror the same error handling pattern that is
already implemented in `.woodpecker/ci-homes.yaml` to maintain consistency
across the CI configuration.
| | `woodpecker-nix-propagate` | Audits the overlayfs upper layer for new store paths, logs them to a journal, and updates the store size cache. Runs continuously. | Yes – sandboxed, runs as `woodpecker-nix` | | ||
| | `woodpecker-nix-propagate.timer` | Triggers the propagation audit on a configurable schedule (default: every 15 minutes). | N/A | | ||
| | `woodpecker-nix-gc` | Garbage-collects the CI store. Only runs when store size exceeds `gc.sizeThreshold` AND more than `gc.minInterval` has elapsed since the last GC. Respects `--max-freed` budget. | Yes – sandboxed, runs as `woodpecker-nix` | | ||
| | `woodpecker-nix-gc.timer` | Periodic trigger for the GC service (default: weekly). | N/A | |
There was a problem hiding this comment.
Propagation service lifecycle description is inaccurate.
Line [67] says the service runs continuously, but this unit performs a scan and exits; periodic runs come from woodpecker-nix-propagate.timer.
Suggested patch
-| `woodpecker-nix-propagate` | Audits the overlayfs upper layer for new store paths, logs them to a journal, and updates the store size cache. Runs continuously. | Yes – sandboxed, runs as `woodpecker-nix` |
+| `woodpecker-nix-propagate` | Audits the overlayfs upper layer for new store paths, logs them to a journal, and updates the store size cache. Runs on demand and via `woodpecker-nix-propagate.timer`. | Yes – sandboxed, runs as `woodpecker-nix` |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/src/modules/nixos/services/woodpecker_nix.md` around lines 67 - 70, The
description for the `woodpecker-nix-propagate` service entry in the table is
inaccurate in stating it "Runs continuously." Update the service description to
clarify that it performs a single audit scan of the overlayfs upper layer and
then exits, with the periodic execution being triggered by the
`woodpecker-nix-propagate.timer` unit (not the service itself running
continuously). Keep the rest of the service description intact (auditing the
overlayfs upper layer, logging to journal, updating cache, etc.).
| ``` | ||
| error: cannot add path '/nix/store/...-woodpecker-ci-runtime' because | ||
| it lacks a signature by a trusted key | ||
| ``` |
There was a problem hiding this comment.
Add a language identifier to the fenced error block.
The fenced block at Line [175] is missing a language token (MD040).
Suggested patch
-```
+```text
error: cannot add path '/nix/store/...-woodpecker-ci-runtime' because
it lacks a signature by a trusted key</details>
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>
[warning] 175-175: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @docs/src/modules/nixos/services/woodpecker_nix.md around lines 175 - 178,
The fenced code block containing the error message about the
woodpecker-ci-runtime path is missing a language identifier, which violates the
markdown linting rule MD040. Add the language identifier text immediately
after the opening backticks of the fenced code block (change the opening ``` to
Source: Linters/SAST tools
| --outputs: list<string> # Specific outputs to check | ||
| ...files: string # Specific files to check |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In Nushell custom commands, when a flag is declared as --outputs: list, is passing --outputs "host1"valid, or must the caller pass an explicit list like--outputs [host1]?
💡 Result:
In Nushell, when a custom command flag is defined as list, you must pass an explicit list using the bracket syntax—e.g., --outputs [host1]. Passing a single string directly as --outputs "host1" is not valid for a parameter explicitly typed as a list [1][2][3]. In Nushell's type system, flags with type annotations expect an argument that matches that specific type [1]. When you define a flag as list, Nushell parses the value provided to that flag as a list. Providing a single scalar string does not satisfy the requirements of the list type, resulting in a type mismatch error [4]. To pass a single item to a list parameter, it must still be wrapped in brackets to form a valid list [3]. If you frequently need to support both a single string and a list of strings, a common pattern in Nushell is to accept the argument as any or string, and then normalize the input within the command body using the into list command. Alternatively, if the behavior allows it, defining the parameter as a list and consistently using the list syntax ensures type safety and avoids parsing ambiguities [1][2].
Citations:
- 1: https://www.nushell.sh/lang-guide/chapters/types/type_signatures.html
- 2: https://www.nushell.sh/book/custom_commands.html
- 3: https://github.com/hustcer/nushell-pro/blob/HEAD/references/data-and-types.md
- 4: https://www.nushell.sh/commands/docs/def.html
🏁 Script executed:
# Find and examine the detect-affected-outputs.nu file
find . -name "detect-affected-outputs.nu" -type fRepository: DaRacci/nix-config
Length of output: 108
🏁 Script executed:
# Search for Woodpecker configuration files that might call this script
fd -e yaml -e yml | head -20Repository: DaRacci/nix-config
Length of output: 467
🏁 Script executed:
# Search for references to detect-affected-outputs in the codebase
rg "detect-affected-outputs" -A 3 -B 3Repository: DaRacci/nix-config
Length of output: 527
🏁 Script executed:
# Examine the detect-affected-outputs.nu file, particularly around lines 12-13
cat -n ./flake/ci/scripts/detect-affected-outputs.nu | head -40Repository: DaRacci/nix-config
Length of output: 1679
🏁 Script executed:
# Search for Woodpecker CI configuration files
fd -e woodpecker -o -name ".woodpecker*" | head -20Repository: DaRacci/nix-config
Length of output: 293
🏁 Script executed:
# Search for invocations of detect-affected-outputs with --outputs flag
rg "\-\-outputs" -A 2 -B 2Repository: DaRacci/nix-config
Length of output: 459
🏁 Script executed:
# Search for Woodpecker CI configuration files with different patterns
fd -type f | rg -i "woodpecker|\.woodpecker"Repository: DaRacci/nix-config
Length of output: 233
🏁 Script executed:
# Search for how detect-affected-outputs is invoked in the codebase
rg "detect-affected-outputs" -A 5 -B 2 --type yamlRepository: DaRacci/nix-config
Length of output: 44
🏁 Script executed:
# Broader search for invocations of the script
rg "detect-affected-outputs" -A 5 -B 2Repository: DaRacci/nix-config
Length of output: 620
🏁 Script executed:
# Search for .woodpecker files specifically
find . -name ".woodpecker*" -type fRepository: DaRacci/nix-config
Length of output: 44
🏁 Script executed:
# Search for any files that might contain the script invocation with --outputs
rg "detect-affected-outputs.*--outputs" -A 3 -B 3Repository: DaRacci/nix-config
Length of output: 44
🏁 Script executed:
# Look for all references to outputs flag usage in scripts
rg "\$HOST|\-\-outputs\s" -A 2 -B 2 | head -50Repository: DaRacci/nix-config
Length of output: 44
🏁 Script executed:
# Look for all files that might invoke this script
rg "detect-affected-outputs" --type-list | head -20Repository: DaRacci/nix-config
Length of output: 452
🏁 Script executed:
# Search more broadly for files containing HOST variable
rg '\$HOST' -A 2 -B 2Repository: DaRacci/nix-config
Length of output: 1617
🏁 Script executed:
# Find all .yml and .yaml files and search within them
find . -name "*.yml" -o -name "*.yaml" | xargs rg "detect-affected-outputs" -A 5 -B 2Repository: DaRacci/nix-config
Length of output: 1646
Fix the type mismatch: --outputs expects explicit list syntax.
The Woodpecker invocations in ./.woodpecker/ci-homes.yaml and ./.woodpecker/ci-hosts.yaml pass --outputs "$${HOME}" and --outputs "$${HOST}" respectively as single scalars. However, the function parameter on line 12 is declared as --outputs: list<string>, which requires explicit list syntax like --outputs ["$${HOST}"]. Nushell's type system does not coerce scalar strings to lists; this will cause a type mismatch error at runtime.
Either:
- Change the call-sites to pass
--outputs ["$${HOST}"]and--outputs ["$${HOME}"], or - Change the parameter to
--outputs: stringand wrap it internally withinto listif multiple outputs are needed
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@flake/ci/scripts/detect-affected-outputs.nu` around lines 12 - 13, The
parameter declaration for --outputs in the detect-affected-outputs.nu script
specifies list<string> type on line 12, but the Woodpecker configuration files
are passing single scalar string values instead of explicit list syntax. Nushell
does not coerce scalars to lists automatically, causing a type mismatch. Choose
one approach to fix this: either update all --outputs invocations in the
Woodpecker YAML files to use explicit list syntax with square brackets around
the scalar values, or change the --outputs parameter type to string and add
internal conversion logic using into list if multiple outputs need to be
supported.
Uh oh!
There was an error while loading. Please reload this page.