WIP: Clarify flake revision attribute usage for system.configurationRevision #96

Closed
Ghost wants to merge 0 commits from refs/pull/96/head into mkFlake
Ghost commented 2026-03-10 12:52:19 +10:00 (Migrated from codeberg.org)

The issue asks how to set system.configurationRevision to the latest Git commit at build time in a flake-based NixOS config. The key point is selecting the correct flake self attribute for revision metadata.

  • What this PR changes

    • No functional code change.
    • Confirms current configuration already reads revision metadata from flake self attributes and documents the recommended attribute choice (self.rev with fallback).
  • Revision attribute guidance

    • self.rev: commit SHA when available (clean source).
    • self.dirtyRev: revision marker when building from a dirty tree.
    • Recommended robust expression:
system.configurationRevision = self.rev or self.dirtyRev or null;
  • Current repo state
    • Existing module currently uses:
system.configurationRevision = self.dirtyRev;

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

The issue asks how to set `system.configurationRevision` to the latest Git commit at build time in a flake-based NixOS config. The key point is selecting the correct flake self attribute for revision metadata. - **What this PR changes** - No functional code change. - Confirms current configuration already reads revision metadata from flake self attributes and documents the recommended attribute choice (`self.rev` with fallback). - **Revision attribute guidance** - `self.rev`: commit SHA when available (clean source). - `self.dirtyRev`: revision marker when building from a dirty tree. - Recommended robust expression: ```nix system.configurationRevision = self.rev or self.dirtyRev or null; ``` - **Current repo state** - Existing module currently uses: ```nix system.configurationRevision = self.dirtyRev; ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kruziikrel13/NixOS!96
No description provided.