summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-07-10 19:10:54 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-07-10 19:10:54 +0200
commit420d2ed3b05a06141b6cbadd988ce55f16f943da (patch)
tree887bb48286f51080b0e27b8c8046f7327fdb3f43
parentcdc3cd98cccfc56b6c9eeccaad4df18aed268058 (diff)
parent116c0997431081da274e98891e4cb7d4b057f6af (diff)
Merge pull request #47 from matthiasbeyer/add-more_help_text
Add more help text
-rwxr-xr-xnix-script-diff-generations.sh9
-rwxr-xr-xnix-script-ls-profiles.sh14
-rwxr-xr-xnix-script-show-generation.sh9
-rwxr-xr-xnix-script-switch.sh18
-rwxr-xr-xnix-script-update-package-def.sh25
5 files changed, 75 insertions, 0 deletions
diff --git a/nix-script-diff-generations.sh b/nix-script-diff-generations.sh
index 0721d23..0df561d 100755
--- a/nix-script-diff-generations.sh
+++ b/nix-script-diff-generations.sh
@@ -11,6 +11,15 @@ usage() {
-n a..b Diff these generations
-h Show this help and exit
+ Show the diff between two generations, so the installed and removed
+ packages.
+
+ Example usage:
+
+ # To show the diff of the system generation 123 to 145
+ # with verbosity on
+ nix-script -v diff-generations -s -n 123..145
+
$(help_end)
EOS
}
diff --git a/nix-script-ls-profiles.sh b/nix-script-ls-profiles.sh
index 3ee0324..be2eae4 100755
--- a/nix-script-ls-profiles.sh
+++ b/nix-script-ls-profiles.sh
@@ -14,6 +14,20 @@ usage() {
-n | Show only profile numbers
-h | Show this help and exit
+ Show the generations which are currently available for either the
+ current user (-u | --user) or the current system (-s | --system)
+ profile.
+
+ Per default, this shows the link name, if you pass -n it only shows
+ the numbers.
+
+ Example usage:
+
+ # To show the profile generations for the system generation, but
+ # only the numbers.
+ # With verbosity on.
+ nix-script -v ls-profiles -s -n
+
$(help_end)
EOS
}
diff --git a/nix-script-show-generation.sh b/nix-script-show-generation.sh
index 5924846..27320ad 100755
--- a/nix-script-show-generation.sh
+++ b/nix-script-show-generation.sh
@@ -10,6 +10,15 @@ usage() {
-u Show user generation (default)
-h Show this help and exit
+ Show the number of the current generations. Defaults to user
+ profile, but system profile can be checked as well.
+
+ Example usage:
+
+ # To show the system generation which is current.
+ # With verbosity on.
+ nix-script -v show-generations -s
+
$(help_end)
EOS
}
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index 9b25614..098d51f 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -17,11 +17,29 @@ usage() {
-n Include hostname in tag name
-h Show this help and exit
+ This command helps you rebuilding your system and keeping track
+ of the system generation in the git directory where your
+ configuration.nix lives. It generates a tag for each sucessfull
+ build of a system. So everytime you rebuild your system, this
+ script creates a tag for you, so you can revert your
+ configuration.nix to the generation state.
+
+ Example usage:
+
+ # To rebuild the system with "nixos-rebuild switch" (by -c
+ # switch), tag in /home/me/config and include the hostname
+ # 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
+
Everything after a double dash (--) will be passed to nixos-rebuild as
additional parameters. For example:
nix-script switch -c switch -- -I nixpkgs=/home/user/pkgs
+ can be used to use your local clone of the nixpkgs repository.
+
$(help_end)
EOS
}
diff --git a/nix-script-update-package-def.sh b/nix-script-update-package-def.sh
index 85b64a8..d0d068d 100755
--- a/nix-script-update-package-def.sh
+++ b/nix-script-update-package-def.sh
@@ -20,6 +20,31 @@ usage() {
-g <path> Path of nixpkgs clone (defaults to ./)
-h Show this help and exit
+ Helper for developers of Nix packages.
+
+ With this command you can
+ - Download package update diffs
+ - Create package update commits on a new branch
+ - Test build the updated package
+ and everything in one step. All you need is the URL of the
+ patch.
+
+ The script asks before building the package, so you can abort if
+ the script fails to find the package name.
+
+ You really should base the update branch on the commit your
+ current system is based on. This way you don't need to rebuild
+ the whole world.
+
+ Example usage:
+
+ # Create in the current directory (which should be a clone
+ # of the nixpkgs repo) a new branch for updateing ffmpeg,
+ # download the patch and apply it (commit message gets generated
+ # for you) and then test build it.
+ # Verbosity is on.
+ nix-script -v update-package-def -b -u http://monitor.nixos.org/patch?p=ffmpeg-full&v=2.7.1&m=Matthias+Beyer
+
$(help_end)
EOS
}