about summary refs log tree commit diff stats
path: root/overlay.nix
diff options
context:
space:
mode:
authorAlan Pearce2024-05-10 15:10:01 +0200
committerAlan Pearce2024-05-10 15:24:10 +0200
commitd75a137c0fa6498ca6e35a0f257634ea3df1bec6 (patch)
tree1f40b38343c7b3b3c9288026585ec5c0644bde0a /overlay.nix
downloadnix-packages-d75a137c0fa6498ca6e35a0f257634ea3df1bec6.tar.lz
nix-packages-d75a137c0fa6498ca6e35a0f257634ea3df1bec6.tar.zst
nix-packages-d75a137c0fa6498ca6e35a0f257634ea3df1bec6.zip
initial commit
Diffstat (limited to 'overlay.nix')
-rw-r--r--overlay.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/overlay.nix b/overlay.nix
new file mode 100644
index 0000000..bff7396
--- /dev/null
+++ b/overlay.nix
@@ -0,0 +1,15 @@
+# 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)))