❄ Personal NixOS Flake Manager
nixos home-manager go nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(rui): extra-args configuration option

Fuwn a2b461f4 4ae51647

+26 -10
+11 -5
README.md
··· 45 45 ```nix 46 46 { 47 47 programs.rui = { 48 - enable = true; 48 + enable = true; # Defaults to false 49 49 50 50 settings = { 51 - # Status notifications via `notify-send` 51 + # Status notifications via `notify-send`; defaults to false 52 52 notify = true; 53 53 54 - # The command to use for sending notifications, view a cool example below! 54 + # The command to use for sending notifications, view a cool example below; 55 + # defaults to `notify-send` 55 56 notifier = "notify-send"; 56 57 57 58 # Rui falls back on the `FLAKE_EDITOR` and `EDITOR` environment variables 59 + # if `editor` is unset 58 60 editor = "code"; 59 61 60 - # Rui falls back on the `FLAKE` environment variable 62 + # Rui falls back on the `FLAKE` environment variable if `flake` is unset 61 63 flake = "/path/to/your-flake"; 62 64 63 - # Allow unfree packages 65 + # Allow unfree packages; defaults to false 64 66 allow-unfree = false; 67 + 68 + # Extra arguments to pass to `nixos-rebuild` and `home-manager`; defaults 69 + # to [ ] 70 + extra-args = [ "--impure" ]; 65 71 }; 66 72 }; 67 73 }
+5
flake.nix
··· 119 119 type = types.bool; 120 120 default = false; 121 121 }; 122 + 123 + extra-args = mkOption { 124 + type = types.listOf types.str; 125 + default = [ ]; 126 + }; 122 127 }; 123 128 }; 124 129
+10 -5
rui.go
··· 11 11 ) 12 12 13 13 type Configuration struct { 14 - Notify bool `json:"notify"` 15 - Editor string `json:"editor"` 16 - Flake string `json:"flake"` 17 - Notifier string `json:"notifier"` 18 - AllowUnfree bool `json:"allow-unfree"` 14 + Notify bool `json:"notify"` 15 + Editor string `json:"editor"` 16 + Flake string `json:"flake"` 17 + Notifier string `json:"notifier"` 18 + AllowUnfree bool `json:"allow-unfree"` 19 + ExtraArgs []string `json:"extra-args"` 19 20 } 20 21 21 22 type ActionDetails struct { ··· 159 160 Action: func(c *cli.Context) error { 160 161 flake := configuration.Flake 161 162 extraArgs := c.Args().Slice() 163 + 164 + extraArgs = append(extraArgs, configuration.ExtraArgs...) 162 165 163 166 if flake == "" { 164 167 flake = os.Getenv("FLAKE") ··· 328 331 nh, err := exec.LookPath("nh") 329 332 extraArgs := c.Args().Slice() 330 333 name, verb, usableWithNH := actionDetails(action) 334 + 335 + extraArgs = append(extraArgs, configuration.ExtraArgs...) 331 336 332 337 if err := notify("Queued home " + name); err != nil { 333 338 return err