aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-21 22:54:00 +0000
committerFuwn <[email protected]>2024-09-21 22:54:00 +0000
commitef21d2f726ca37249ea7f0994eed6826d91b909a (patch)
treed5fa6ddbd6a2526e2085cbc07a3aaa16c7765afb
parentfeat(flake): bump nixpkgs and pin flake inputs (diff)
downloadrui-ef21d2f726ca37249ea7f0994eed6826d91b909a.tar.xz
rui-ef21d2f726ca37249ea7f0994eed6826d91b909a.zip
feat(rui): allow-unfree flag
-rw-r--r--flake.nix2
-rw-r--r--rui.go14
2 files changed, 15 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index f6f15c6..5225e71 100644
--- a/flake.nix
+++ b/flake.nix
@@ -41,7 +41,7 @@
{
packages.default = pkgs.buildGoModule {
pname = "rui";
- version = "2024.09.19";
+ version = "2024.09.21";
src = pkgs.lib.cleanSource ./.;
vendorHash = "sha256-mN/QjzJ4eGfbW1H92cCKvC0wDhCR6IUes2HCZ5YBdPA=";
diff --git a/rui.go b/rui.go
index 00c7adb..778783a 100644
--- a/rui.go
+++ b/rui.go
@@ -55,6 +55,20 @@ func main() {
}
},
Suggest: true,
+ Flags: []cli.Flag{
+ &cli.BoolFlag{
+ Name: "allow-unfree",
+ Action: func(c *cli.Context, b bool) error {
+ state := "0"
+
+ if b {
+ state = "1"
+ }
+
+ return os.Setenv("NIXPKGS_ALLOW_UNFREE", state)
+ },
+ },
+ },
Commands: []*cli.Command{
{
Name: "hs",