about summary refs log tree commit diff stats
path: root/sys/git_revision/default.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-02-23 18:20:02 +0100
committerSoispha <soispha@vhack.eu>2024-02-23 18:20:02 +0100
commit1fd3abb79f7e2f523b6c1714a03025dea912a12f (patch)
tree2b54b7303d5bc770178c6b0e6cf86eb5d4ecf05c /sys/git_revision/default.nix
parentchore(version): v1.30.0 (diff)
downloadnixos-config-1fd3abb79f7e2f523b6c1714a03025dea912a12f.tar.gz
nixos-config-1fd3abb79f7e2f523b6c1714a03025dea912a12f.zip
feat(sys/nixos_git_rev): Add a file with the current git reverence
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");
+  };
+}