about summary refs log tree commit diff
path: root/home/modules/programs/nixpkgs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/modules/programs/nixpkgs/default.nix')
-rw-r--r--home/modules/programs/nixpkgs/default.nix23
1 files changed, 19 insertions, 4 deletions
diff --git a/home/modules/programs/nixpkgs/default.nix b/home/modules/programs/nixpkgs/default.nix
index 92653a1..e20923f 100644
--- a/home/modules/programs/nixpkgs/default.nix
+++ b/home/modules/programs/nixpkgs/default.nix
@@ -1,7 +1,8 @@
 { config, lib, ... }:
 
 let
-  allowed = config.nixpkgs.allowedUnfree;
+  allowedUnf = config.nixpkgs.allowedUnfree;
+  allowedIns = config.nixpkgs.allowedInsecure;
 in
 
 {
@@ -9,12 +10,26 @@ in
     type = lib.types.listOf lib.types.string;
     default = [ ];
     description = ''
-      Allows for  unfree packages by their name.
+      Allows for unfree packages by their name.
     '';
   };
 
+  options.nixpkgs.allowedInsecure = lib.mkOption {
+    type = lib.types.listOf lib.types.string;
+    default = [ ];
+    description = ''
+      Allows for insercure packages by their name.
+    '';
+  };
+
+
   config.nixpkgs.config.allowUnfreePredicate =
-    if (allowed == [ ])
+    if (allowedUnf == [ ])
+    then (_: false)
+    else (pkg: __elem (lib.getName pkg) allowedUnf);
+
+  config.nixpkgs.config.allowInsecurePredicate =
+    if (allowedIns == [ ])
     then (_: false)
-    else (pkg: __elem (lib.getName pkg) allowed);
+    else (pkg: __elem (lib.getName pkg) allowedIns);
 }