Skip to content

Commit

Permalink
nixos-rebuild: renamed commands
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Apr 20, 2024
1 parent dc661ca commit 2c91d76
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"github.com/spf13/cobra"
)

var build_vmCmd = &cobra.Command{
var buildVmCmd = &cobra.Command{
Use: "build-vm",
Short: "Build a script that starts a NixOS virtual machine with the configuration",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(build_vmCmd).Standalone()
rootCmd.AddCommand(build_vmCmd)
carapace.Gen(buildVmCmd).Standalone()
rootCmd.AddCommand(buildVmCmd)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"github.com/spf13/cobra"
)

var build_vm_with_bootloaderCmd = &cobra.Command{
var buildVmWithBootloaderCmd = &cobra.Command{
Use: "build-vm-with-bootloader",
Short: "Like build-vm, but boots with the regular bootloader of your configuration",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(build_vm_with_bootloaderCmd).Standalone()
rootCmd.AddCommand(build_vm_with_bootloaderCmd)
carapace.Gen(buildVmWithBootloaderCmd).Standalone()
rootCmd.AddCommand(buildVmWithBootloaderCmd)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"github.com/spf13/cobra"
)

var dry_activateCmd = &cobra.Command{
var dryActivateCmd = &cobra.Command{
Use: "dry-activate",
Short: "Build the new configuration, but show what changes would occur on activation instead of activating the configuration",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(dry_activateCmd).Standalone()
rootCmd.AddCommand(dry_activateCmd)
carapace.Gen(dryActivateCmd).Standalone()
rootCmd.AddCommand(dryActivateCmd)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"github.com/spf13/cobra"
)

var dry_buildCmd = &cobra.Command{
var dryBuildCmd = &cobra.Command{
Use: "dry-build",
Short: "Show what store paths would be built or downloaded, but otherwise do nothing",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(dry_buildCmd).Standalone()
rootCmd.AddCommand(dry_buildCmd)
carapace.Gen(dryBuildCmd).Standalone()
rootCmd.AddCommand(dryBuildCmd)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ import (
"github.com/spf13/cobra"
)

var list_generationsCmd = &cobra.Command{
var listGenerationsCmd = &cobra.Command{
Use: "list-generations",
Short: "List the available generations",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(list_generationsCmd).Standalone()
carapace.Gen(listGenerationsCmd).Standalone()

list_generationsCmd.Flags().Bool("json", false, "Output in JSON")

rootCmd.AddCommand(list_generationsCmd)
listGenerationsCmd.Flags().Bool("json", false, "Output in JSON")
rootCmd.AddCommand(listGenerationsCmd)
}

0 comments on commit 2c91d76

Please sign in to comment.