From 41bdeb88009dd232808edee9fc0e4ae94358d8d6 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 29 Aug 2026 02:02:23 +0530 Subject: refactor: moving script into modules that makes sense - instead of collecting all scripts into modules/scripts we are moving them to modules that makes sense (yazi-file-chooser.sh into yazi) --- modules/system/nix-update/nix-update.zsh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/system/nix-update/nix-update.zsh (limited to 'modules/system/nix-update/nix-update.zsh') 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 -- cgit v1.2.3