about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/scripts
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-09 21:03:21 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-09 21:03:21 +0200
commit200c1037d9e94fc3a211651c940da6392ee153d9 (patch)
tree603d6751b81c45dcaacc938fe1dd3c9511bc50aa /sys/nixpkgs/pkgs/scripts
parentfix(hm/conf/python): Create history file, if it does not exist (diff)
downloadnixos-config-200c1037d9e94fc3a211651c940da6392ee153d9.tar.gz
nixos-config-200c1037d9e94fc3a211651c940da6392ee153d9.zip
feat(sys/pkgs/scripts/update-sys): Enable completions
Diffstat (limited to '')
-rw-r--r--sys/nixpkgs/pkgs/scripts/default.nix1
-rwxr-xr-xsys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh14
2 files changed, 12 insertions, 3 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/default.nix b/sys/nixpkgs/pkgs/scripts/default.nix
index 0c76e6e4..69fba713 100644
--- a/sys/nixpkgs/pkgs/scripts/default.nix
+++ b/sys/nixpkgs/pkgs/scripts/default.nix
@@ -334,6 +334,7 @@
       update-sys-scr = write_shell {
         name = "update-sys";
         path = "small_functions";
+        completions = true;
         dependencies = builtins.attrValues {
           inherit
             (prev)
diff --git a/sys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh b/sys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh
index 4c5d19c2..d28247f6 100755
--- a/sys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh
+++ b/sys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh
@@ -7,16 +7,24 @@ help() {
     cat <<EOF
 This is a NixOS System flake update manager.
 
-Usage:
+USAGE:
     $NAME [--branch <branchname>] [--help]
 
-Options:
+OPTIONS:
     --branch | -b  BRANCHNAME
                                 select a branch to update from.
-    --mode | -m  MODE
+
+    --mode   | -m  MODE
                                 select a mode to update with
+
     --help   | -h
                                 output this help.
+ARGUMENTS:
+    BRANCHNAME := [[ git branch --list --format '%(refname:short)' ]]
+                                The name of the branch to deploy the config from
+
+    MODE := switch|boot|test|build|dry-build|dry-activate|edit|repl|build-vm|build-vm-with-bootloader
+                                See the 'nixos-rebuild' manpage for more information about these modes.
 EOF
     exit "$1"
 }