summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-09-25 13:01:55 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-10-04 14:08:58 +0200
commitfea47bf2169f155449ad869ef7dd3d2318308e62 (patch)
treea3cbfa8264abd14f8e8d9bab55506f18d05db211
parent80bcb12e3691cd7a5e3b3c4ff45d1e61aa018598 (diff)
Better overview over the help text
-rwxr-xr-xnix-script-switch.sh25
1 files changed, 20 insertions, 5 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index 158ff52..1944c69 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -9,17 +9,31 @@ COMMAND="switch"
usage() {
cat <<EOS
- $(help_synopsis "${BASH_SOURCE[0]}" "[-h] [-q] [-c <command>] [-w <working directory>]")
+ $(help_synopsis "${BASH_SOURCE[0]}" \
+ "[-h] [-q] [-c <command>] [-w <working directory>]")
+
+ -c <command> Command for nixos-rebuild.
+ See 'man nixos-rebuild' (default: switch)
+
+ -w <path> Path to your configuration git directory
+ (default: '$RC_CONFIG')
- -c <command> Command for nixos-rebuild. See 'man nixos-rebuild' (default: switch)
- -w <path> Path to your configuration git directory (default: '$RC_CONFIG')
-n DON'T include hostname in tag name
+
-t <tagname> Custom tag name
- -p [<pkgs>] Generate the switch tag in the nixpkgs at <pkgs> as well. (default: '$RC_NIXPKGS')
- -f <tag-flags> Flags for git-tag (see 'git tag --help') (default: '$RC_SWITCH_DEFAULT_TAG_FLAGS')
+
+ -p [<pkgs>] Generate the switch tag in the nixpkgs at <pkgs>
+ as well. (default: '$RC_NIXPKGS')
+
+ -f <tag-flags> Flags for git-tag (see 'git tag --help')
+ (default: '$RC_SWITCH_DEFAULT_TAG_FLAGS')
+
-b Do not call nixos-rebuild at all.
+
-q Don't pass -Q to nixos-rebuild
+
-s <pkgs> Use these nixpkgs clone instead of channels
+
-h Show this help and exit
This command helps you rebuilding your system and keeping track
@@ -36,6 +50,7 @@ usage() {
# in the tag as well (helpful if your configuration is
# shared between hosts).
# Verbosity is on here.
+
nix-script -v switch -c switch -w /home/me/config -n
$(help_rcvars \