summaryrefslogtreecommitdiff
path: root/modules/examples
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2023-07-02 01:11:16 +1000
committerMichael Hoang <enzime@users.noreply.github.com>2023-07-14 23:06:46 +1000
commit0dafe2170deb6a691255cecc212af4b1cdf8297b (patch)
tree82dff0eb5c2a2fe8c030ffdee47c19aaa063d8c8 /modules/examples
parentc806a73609e77f0c446fdad5d3ea6ca3b7ae6e5f (diff)
Add `darwin-version` command
Diffstat (limited to 'modules/examples')
-rw-r--r--modules/examples/flake/flake.nix3
-rw-r--r--modules/examples/lnl.nix2
2 files changed, 4 insertions, 1 deletions
diff --git a/modules/examples/flake/flake.nix b/modules/examples/flake/flake.nix
index 02b445c..8650562 100644
--- a/modules/examples/flake/flake.nix
+++ b/modules/examples/flake/flake.nix
@@ -27,6 +27,9 @@
programs.zsh.enable = true; # default shell on catalina
# programs.fish.enable = true;
+ # Set Git commit hash for darwin-version.
+ system.configurationRevision = self.rev or self.dirtyRev or null;
+
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix
index 5184b98..264bd1a 100644
--- a/modules/examples/lnl.nix
+++ b/modules/examples/lnl.nix
@@ -125,7 +125,7 @@
set -g pane-border-style fg=black
set -g status-bg black
set -g status-fg white
- set -g status-right '#[fg=white]#(id -un)@#(hostname) #(cat /run/current-system/darwin-version)'
+ set -g status-right '#[fg=white]#(id -un)@#(hostname) #(jq --raw-output '.darwinLabel' /run/current-system/darwin-version.json)'
'';
environment.etc."nix/user-sandbox.sb".text = ''