@@ 1,5 1,5 @@
/*
- * Copyright (C) 2024 Jonni Liljamo <jonni@liljamo.com>
+ * Copyright (C) 2025 Jonni Liljamo <jonni@liljamo.com>
*
* This file is licensed under GPL-3.0-only, see NOTICE and LICENSE for
* more information.
@@ 166,8 166,6 @@ func (m model) View() string {
type config struct {
Hosts []types.HostItem `yaml:"hosts"`
Actions []types.ActionItem `yaml:"actions"`
- // Wheter default actions should be enabled, defaults to true.
- DefaultActions bool `yaml:"default_actions"`
}
func main() {
@@ 215,20 213,6 @@ func main() {
hostList.Styles.PaginationStyle = styles.ListPaginaton
actionListItems := []list.Item{}
- if !config.DefaultActions {
- actionListItems = []list.Item{
- types.ActionItem{
- Name: "ssh",
- ExecTemplate: "ssh {{ .A.host.Data.user }}@{{ .A.host.IP }}",
- A: map[string]interface{}{},
- },
- types.ActionItem{
- Name: "remote switch",
- ExecTemplate: "nixos-rebuild switch --flake \".?submodules=1#{{ .A.host.Name }}\" --target-host {{ .A.host.Data.user }}@{{ .A.host.IP }}",
- A: map[string]interface{}{},
- },
- }
- }
for _, i := range config.Actions {
if i.A == nil {
i.A = map[string]interface{}{}