summaryrefslogtreecommitdiffstats
path: root/nix-utils.sh
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-09-08 11:33:43 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-09-08 11:33:43 +0200
commit45746cd685d15ff1270b297c1cf9ef2a2730d98f (patch)
tree1bba8eea2ae01f8ab1d0206d5d68710cb92bd3df /nix-utils.sh
parente9fd4bba0d8bf404a1f2d24e1d36bd68cbbfdbaa (diff)
Add helper func to get current channel generation
Diffstat (limited to 'nix-utils.sh')
-rw-r--r--nix-utils.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/nix-utils.sh b/nix-utils.sh
index 382763f..4028004 100644
--- a/nix-utils.sh
+++ b/nix-utils.sh
@@ -95,6 +95,13 @@ current_user_generation() {
}
#
+# get the current channel generation
+#
+current_channel_generation() {
+ grep_generation "sudo nix-env -p /nix/var/nix/profiles/per-user/root/channels --list-generations"
+}
+
+#
# Ask the user whether to continue or not
#
continue_question() {