summaryrefslogtreecommitdiffstats
path: root/nix-script-channel-list-generations.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nix-script-channel-list-generations.sh')
-rwxr-xr-xnix-script-channel-list-generations.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/nix-script-channel-list-generations.sh b/nix-script-channel-list-generations.sh
new file mode 100755
index 0000000..3b4cc87
--- /dev/null
+++ b/nix-script-channel-list-generations.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+source $(dirname ${BASH_SOURCE[0]})/nix-utils.sh
+
+Color_Off='\e[0m'
+Red='\e[0;31m'
+
+usage() {
+ cat <<EOS >&2
+ $(help_synopsis "channel" "list-generations [-h]")
+
+ -h | Show this help and exit
+
+$(help_end)
+EOS
+}
+
+while getopts "h" OPTION
+do
+ case $OPTION in
+ h)
+ usage
+ exit 0
+ ;;
+ *)
+ ;;
+ esac
+done
+
+stdout "Done with argument parsing"
+
+explain sudo nix-env -p /nix/var/nix/profiles/per-user/root/channels --list-generations