about summary refs log tree commit diff
path: root/overlay.nix
diff options
context:
space:
mode:
Diffstat (limited to 'overlay.nix')
-rw-r--r--overlay.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/overlay.nix b/overlay.nix
new file mode 100644
index 0000000..122729d
--- /dev/null
+++ b/overlay.nix
@@ -0,0 +1,18 @@
+# You can use this file as a nixpkgs overlay. This is useful in the
+# case where you don't want to add the whole NUR namespace to your
+# configuration.
+
+self: super:
+
+let
+
+  isReserved = n: n == "lib" || n == "overlays" || n == "modules";
+  nameValuePair = n: v: { name = n; value = v; };
+  nurAttrs = import ./default.nix { pkgs = super; };
+
+in
+
+  builtins.listToAttrs
+  (map (n: nameValuePair n nurAttrs.${n})
+  (builtins.filter (n: !isReserved n)
+  (builtins.attrNames nurAttrs)))