❄ 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): allow insecure packages flag

Fuwn 54437ee3 6d89e269

+28 -8
+4 -1
README.md
··· 62 62 # Rui falls back on the `FLAKE` environment variable if `flake` is unset 63 63 flake = "/path/to/your-flake"; 64 64 65 - # Allow unfree packages; defaults to false 65 + # Allow unfree packages on the global level; defaults to false 66 66 allow-unfree = false; 67 + 68 + # Allow insecure packages on the global level; defaults to false 69 + allow-insecure = false; 67 70 68 71 # Extra arguments to pass to `nixos-rebuild` and `home-manager`; defaults 69 72 # to [ ]
+1 -1
flake.nix
··· 51 51 inherit meta; 52 52 53 53 pname = "rui"; 54 - version = "2024.09.27"; 54 + version = "2024.10.04"; 55 55 src = pkgs.lib.cleanSource ./.; 56 56 vendorHash = "sha256-mN/QjzJ4eGfbW1H92cCKvC0wDhCR6IUes2HCZ5YBdPA="; 57 57
+23 -6
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"` 19 - ExtraArgs []string `json:"extra-args"` 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 + AllowInsecure bool `json:"allow-insecure"` 20 + ExtraArgs []string `json:"extra-args"` 20 21 } 21 22 22 23 type ActionDetails struct { ··· 117 118 return os.Setenv("NIXPKGS_ALLOW_UNFREE", state) 118 119 }, 119 120 }, 121 + &cli.BoolFlag{ 122 + Name: "allow-insecure", 123 + Action: func(c *cli.Context, b bool) error { 124 + state := "0" 125 + 126 + if b { 127 + state = "1" 128 + } 129 + 130 + return os.Setenv("NIXPKGS_ALLOW_INSECURE", state) 131 + }, 132 + }, 120 133 }, 121 134 Before: func(c *cli.Context) error { 122 135 if configuration.AllowUnfree { 123 136 c.Set("allow-unfree", "1") 137 + } 138 + 139 + if configuration.AllowInsecure { 140 + c.Set("allow-insecure", "1") 124 141 } 125 142 126 143 return nil