about summary refs log tree commit diff stats
path: root/sys/git_revision
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sys/git_revision/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/git_revision/default.nix b/sys/git_revision/default.nix
new file mode 100644
index 00000000..d9388bfa
--- /dev/null
+++ b/sys/git_revision/default.nix
@@ -0,0 +1,8 @@
+{self, ...}: {
+  environment.etc.nixos_git_rev = {
+    text = builtins.toString (self.shortRev
+      or self.dirtyShortRev
+      or self.lastModified
+      or "unknown");
+  };
+}