#compdef nixos-rebuild

# AUTOMATICALLY GENERATED by `shtab`


_shtab_nixos_rebuild_commands() {
  local _commands=(
    
  )
  _describe 'nixos-rebuild commands' _commands
}

_shtab_nixos_rebuild_options=(
  "*"{--verbose,-v}"[Enable verbose logging (includes nix)]"
  "*--quiet[]"
  {--max-jobs,-j}"[]:max_jobs:"
  "--cores[]:cores:"
  "--log-format[]:log_format:"
  {--keep-going,-k}"[]"
  {--keep-failed,-K}"[]"
  "--fallback[]"
  "--repair[]"
  "*--option[]:option:"
  "--builders[]:builders:"
  "*"{--include,-I}"[]:include:"
  {--print-build-logs,-L}"[]"
  "--show-trace[]"
  "--accept-flake-config[]"
  "--refresh[]"
  "--impure[]"
  "--offline[]"
  "--no-net[]"
  "--recreate-lock-file[]"
  "--no-update-lock-file[]"
  "--no-write-lock-file[]"
  "--no-registries[]"
  "--commit-lock-file[]"
  "*--update-input[]:update_input:"
  "*--override-input[]:override_input:"
  {--no-build-output,--no-link,-Q}"[]"
  {--use-substitutes,--substitute-on-destination,-s}"[]"
  {--help,-h}"[Show manpage]"
  "--debug[Enable debug logging]"
  {--file,-f}"[Enable and build the NixOS system from the specified file]:file:"
  {--attr,-A}"[Enable and build the NixOS system from nix file and use the specified attribute path from file specified by the --file option]:attr:"
  "--flake[Build the NixOS system from the specified flake]:flake:"
  "--no-flake[Do not imply --flake if \/etc\/nixos\/flake.nix exists]"
  "--install-bootloader[Causes the boot loader to be (re)installed on the device specified by the relevant configuration options]"
  "--install-grub[Deprecated, use \'--install-bootloader\' instead]"
  {--profile-name,-p}"[Use nix profile \/nix\/var\/nix\/profiles\/system-profiles\/\<profile-name\>]:profile_name:"
  {--specialisation,-c}"[Activates given specialisation]:specialisation:"
  "--rollback[Roll back to the previous configuration]"
  "--upgrade[Update the root user\'s channel named \'nixos\' before rebuilding the system and channels which have a file named \'.update-on-nixos-rebuild\']"
  "--upgrade-all[Same as --upgrade, but updates all root user\'s channels]"
  "--json[JSON output, only implemented for \'list-generations\' right now]"
  {--ask-sudo-password,-S}"[Asks for sudo password for remote activation, implies --sudo]"
  "--sudo[Prefixes activation commands with sudo]"
  "--use-remote-sudo[Deprecated, use \'--sudo\' instead]"
  "--no-ssh-tty[Deprecated]"
  "--no-reexec[Do not update nixos-rebuild in-place (also known as re-exec) before build]"
  "--fast[Deprecated, use \'--no-reexec\' instead]"
  "--build-host[Specifies host to perform the build]:build_host:"
  "--target-host[Specifies host to activate the configuration]:target_host:"
  "--no-build-nix[Deprecated]"
  "--image-variant[Selects an image variant to build from the config.system.build.images attribute of the given configuration]:image_variant:"
  ":action:(switch boot test build edit repl dry-build dry-run dry-activate build-image build-vm build-vm-with-bootloader list-generations)"
)


_shtab_nixos_rebuild() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${_shtab_nixos_rebuild_options[(I)${(q)one_or_more}*]} + ${_shtab_nixos_rebuild_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    _shtab_nixos_rebuild_options+=(': :_shtab_nixos_rebuild_commands' '*::: :->nixos-rebuild')
  fi
  _arguments -C -s $_shtab_nixos_rebuild_options

  case $state in
    nixos-rebuild)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:_shtab_nixos_rebuild-$line[1]:"
      case $line[1] in
        
      esac
  esac
}



typeset -A opt_args

if [[ $zsh_eval_context[-1] == eval ]]; then
  # eval/source/. command, register function for later
  compdef _shtab_nixos_rebuild -N nixos-rebuild
else
  # autoload from fpath, call function directly
  _shtab_nixos_rebuild "$@"
fi

