Skip to content

flake: add rev to /etc/os-release - #22

Closed
mehbark wants to merge 1 commit into
mainfrom
build-info
Closed

mehbark wants to merge 1 commit into
mainfrom
build-info

Conversation

@mehbark

@mehbark mehbark commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

VARIANT will be the git SHA thing, suffixed by -dirty if it's dirty. This lets us (non-securely) identify what a host is actually running and whether it was built from a dirty commit (bad). VARIANT is the easiest os-release variable to stuff crap into without redoing the whole file.

This actually uses a flake thing! Go flakes!

Tested on celestia mehbark/homelab@3d8dfaa

`VARIANT` will be the git SHA thing, suffixed by `-dirty` if it's dirty.
This lets us (non-securely) identify what a host is actually running and
whether it was built from a dirty commit (bad). `VARIANT` is the easiest
`os-release` variable to stuff crap into without redoing the whole file.
@mehbark

mehbark commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

FWIW, comin largely obviates the need for this

@kurisufriend

Copy link
Copy Markdown
Member

should i fold this into the current PR

@mehbark

mehbark commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator Author

don't do this. use system.configurationRevision, which can be checked with nixos-version --configuration-revision. see mehbark/homelab@46ae425

@mehbark
mehbark marked this pull request as draft September 15, 2026 17:09
@mehbark

mehbark commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

actually i'm just going to do a new PR

@mehbark mehbark closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants