diff options
| author | Fuwn <[email protected]> | 2024-09-27 00:53:38 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-27 00:53:38 -0700 |
| commit | f82576a91c3f1709ce14cf5787ff75b823fba771 (patch) | |
| tree | 387eeafb3e90d5efea099317647be4f5067a03ec /rui.go | |
| parent | 648ab372616597f3193ebad0f3cb710f9cd1f77c (diff) | |
| download | rui-f82576a91c3f1709ce14cf5787ff75b823fba771.tar.xz rui-f82576a91c3f1709ce14cf5787ff75b823fba771.zip | |
feat(rui): extra-args configuration option
Diffstat (limited to 'rui.go')
| -rw-r--r-- | rui.go | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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 } |