diff options
-rwxr-xr-x | nix-script-diff-generations.sh | 9 | ||||
-rwxr-xr-x | nix-script-ls-profiles.sh | 14 | ||||
-rwxr-xr-x | nix-script-show-generation.sh | 9 | ||||
-rwxr-xr-x | nix-script-switch.sh | 18 | ||||
-rwxr-xr-x | nix-script-update-package-def.sh | 25 |
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 } |