❄ 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-unfree configuration option

Fuwn 4ae51647 9edb89a8

+21 -5
+3
README.md
··· 59 59 60 60 # Rui falls back on the `FLAKE` environment variable 61 61 flake = "/path/to/your-flake"; 62 + 63 + # Allow unfree packages 64 + allow-unfree = false; 62 65 }; 63 66 }; 64 67 }
+6 -1
flake.nix
··· 41 41 { 42 42 packages.default = pkgs.buildGoModule { 43 43 pname = "rui"; 44 - version = "2024.09.23"; 44 + version = "2024.09.27"; 45 45 src = pkgs.lib.cleanSource ./.; 46 46 vendorHash = "sha256-mN/QjzJ4eGfbW1H92cCKvC0wDhCR6IUes2HCZ5YBdPA="; 47 47 ··· 113 113 flake = mkOption { 114 114 type = types.str; 115 115 default = ""; 116 + }; 117 + 118 + allow-unfree = mkOption { 119 + type = types.bool; 120 + default = false; 116 121 }; 117 122 }; 118 123 };
+12 -4
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"` 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"` 18 19 } 19 20 20 21 type ActionDetails struct { ··· 115 116 return os.Setenv("NIXPKGS_ALLOW_UNFREE", state) 116 117 }, 117 118 }, 119 + }, 120 + Before: func(c *cli.Context) error { 121 + if configuration.AllowUnfree { 122 + c.Set("allow-unfree", "1") 123 + } 124 + 125 + return nil 118 126 }, 119 127 Commands: []*cli.Command{ 120 128 {