From fea47bf2169f155449ad869ef7dd3d2318308e62 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 25 Sep 2015 13:01:55 +0200 Subject: Better overview over the help text --- nix-script-switch.sh | 25 ++++++++++++++++++++----- 1 file 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 <] [-w ]") + $(help_synopsis "${BASH_SOURCE[0]}" \ + "[-h] [-q] [-c ] [-w ]") + + -c Command for nixos-rebuild. + See 'man nixos-rebuild' (default: switch) + + -w Path to your configuration git directory + (default: '$RC_CONFIG') - -c Command for nixos-rebuild. See 'man nixos-rebuild' (default: switch) - -w Path to your configuration git directory (default: '$RC_CONFIG') -n DON'T include hostname in tag name + -t Custom tag name - -p [] Generate the switch tag in the nixpkgs at as well. (default: '$RC_NIXPKGS') - -f Flags for git-tag (see 'git tag --help') (default: '$RC_SWITCH_DEFAULT_TAG_FLAGS') + + -p [] Generate the switch tag in the nixpkgs at + as well. (default: '$RC_NIXPKGS') + + -f 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 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 \ -- cgit v1.2.3