aboutsummaryrefslogtreecommitdiff
path: root/rui.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-27 07:53:38 +0000
committerFuwn <[email protected]>2024-09-27 07:53:38 +0000
commita2b461f4ada0731c80f5797d368ca281b0b71ce5 (patch)
tree387eeafb3e90d5efea099317647be4f5067a03ec /rui.go
parentfeat(rui): allow-unfree configuration option (diff)
downloadrui-a2b461f4ada0731c80f5797d368ca281b0b71ce5.tar.xz
rui-a2b461f4ada0731c80f5797d368ca281b0b71ce5.zip
feat(rui): extra-args configuration option
Diffstat (limited to 'rui.go')
-rw-r--r--rui.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/rui.go b/rui.go
index c76870e..2f06d43 100644
--- a/rui.go
+++ b/rui.go
@@ -11,11 +11,12 @@ import (
)
type Configuration struct {
- Notify bool `json:"notify"`
- Editor string `json:"editor"`
- Flake string `json:"flake"`
- Notifier string `json:"notifier"`
- AllowUnfree bool `json:"allow-unfree"`
+ Notify bool `json:"notify"`
+ Editor string `json:"editor"`
+ Flake string `json:"flake"`
+ Notifier string `json:"notifier"`
+ AllowUnfree bool `json:"allow-unfree"`
+ ExtraArgs []string `json:"extra-args"`
}
type ActionDetails struct {
@@ -160,6 +161,8 @@ func main() {
flake := configuration.Flake
extraArgs := c.Args().Slice()
+ extraArgs = append(extraArgs, configuration.ExtraArgs...)
+
if flake == "" {
flake = os.Getenv("FLAKE")
}
@@ -329,6 +332,8 @@ func home(c *cli.Context, action int) error {
extraArgs := c.Args().Slice()
name, verb, usableWithNH := actionDetails(action)
+ extraArgs = append(extraArgs, configuration.ExtraArgs...)
+
if err := notify("Queued home " + name); err != nil {
return err
}