diff options
| author | Martin Fischer <martin@push-f.com> | 2026-10-15 07:31:36 +0200 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2026-10-15 07:38:55 +0200 |
| commit | d9ca24398ad71aca208c94a6399f13c46228b103 (patch) | |
| tree | adad427caa5824bc3656378f45dfa7255396bde1 /nixos/rebuild | |
| parent | 1c10d56a396518562bf466fb7a7ffd8a4d054655 (diff) | |
Diffstat (limited to 'nixos/rebuild')
| -rwxr-xr-x | nixos/rebuild | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/rebuild b/nixos/rebuild index bb44fe8..d714977 100755 --- a/nixos/rebuild +++ b/nixos/rebuild @@ -25,6 +25,13 @@ if [ ! -f "$configPath" ]; then exit 1 fi +# Make the configuration repository's commit available to the NixOS module. +export NIXOS_CONFIG_REVISION +NIXOS_CONFIG_REVISION=$(git -C "$top" rev-parse --verify HEAD) +if [[ -n $(git -C "$top" status --porcelain) ]]; then + NIXOS_CONFIG_REVISION+="-dirty" +fi + nixpkgsPath=$( cd "$top" && nix-instantiate --eval --raw \ |
