From 57e0bc5acb0e1a4d3e04ec3008dd1648ba381460 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Thu, 2 Jan 2025 10:56:24 +0200 Subject: [PATCH] feat: remove default actions --- main.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/main.go b/main.go index 97a45ad..03a533a 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Jonni Liljamo + * Copyright (C) 2025 Jonni Liljamo * * 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{}{} -- 2.44.1