natsukium/Nix Diff Action
Compare Nix derivations between base and PR branches using dix
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| mode | Operation mode: "full" for simple single-job workflow, "diff-only" for parallel execution, "comment-only" for aggregating results | no | full |
| attributes | Nix attributes to compare in YAML array format. Each item requires: - displayName: Name shown in PR comment headers (e.g., "myhost" appears as "### myhost") - attribute: Nix attribute path (without '#' prefix) Example: - displayName: myapp attribute: packages.x86_64-linux.default - displayName: nixos-config attribute: nixosConfigurations.myhost.config.system.build.toplevel Note: Do not include '#' or '.#' prefix - the reference is constructed automatically. | no | — |
| build | Build outputs before comparing. Enables closure size comparison but increases workflow time. Requires running on a platform matching the output (e.g., x86_64-linux outputs need Linux runners). | no | false |
| directory | Directory containing the Nix expression to evaluate. Defaults to repository root. | no | . |
| github-token | GitHub token for commenting on PRs. Required for full and comment-only modes. | no | ${{ github.token }} |
| skip-no-change | Skip posting comment when there are no differences. | no | true |
| comment-strategy | 'create' to always create new comment, 'update' to update existing comment instead of creating new one. | no | create |
Outputs
| name | description |
|---|---|
| diff | JSON array of diff results. Each item has `displayName` and `diff` keys. |