diff options
Diffstat (limited to 'modules/system/nix-update/nix-update.zsh')
| -rw-r--r-- | modules/system/nix-update/nix-update.zsh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/system/nix-update/nix-update.zsh b/modules/system/nix-update/nix-update.zsh new file mode 100644 index 0000000..a9500e6 --- /dev/null +++ b/modules/system/nix-update/nix-update.zsh @@ -0,0 +1,22 @@ +#compdef nix-update + +_arguments \ + '1: :->target' \ + '*:: :->flags' + +case $state in + target) + local -a commands + commands=( + 'home-manager:Update and switch home-manager configuration' + 'nixos:Update and switch NixOS configuration' + 'both:Update and switch both configurations' + ) + _describe 'command' commands + ;; + flags) + _arguments \ + '--only-flake[Only run nix flake update, skip switch commands]' \ + '--only-switch[Only run switch commands, skip nix flake update]' + ;; +esac |
