summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2025-09-06 16:35:50 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2025-09-06 16:35:50 +0200
commit6b0580e4add23addb567478bc51dc8e2d3226aa3 (patch)
tree6423a0e48929a1f2db5ba43cd18edae9f6b82905
parent8bf52fd90e113cf64b193defdd3d3847a00be7c2 (diff)
add lib/overlays.nix
-rw-r--r--lib/default.nix5
-rw-r--r--lib/overlays.nix13
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 68f40ca..bb8f63a 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -15,17 +15,20 @@ in
./devShell.nix
./machines.nix
./nixosModules.nix
+ ./overlays.nix
./packages.nix
];
specialArgs = {
inherit
self
sources
- pkgs
;
inherit (pkgs)
lib
;
+ pkgs = import pkgs.path {
+ overlays = [ self.config.outputs.overlay ];
+ };
};
};
in
diff --git a/lib/overlays.nix b/lib/overlays.nix
new file mode 100644
index 0000000..7779e13
--- /dev/null
+++ b/lib/overlays.nix
@@ -0,0 +1,13 @@
+{ config, lib, pkgs, ... }:
+{
+ options = {
+ overlays = lib.mkOption {
+ type = lib.types.listOf (lib.types.functionTo (lib.types.functionTo (lib.types.lazyAttrsOf lib.types.unspecified)));
+ default = [];
+ };
+ outputs.overlay = lib.mkOption {
+ type = lib.types.functionTo (lib.types.functionTo (lib.types.lazyAttrsOf lib.types.unspecified));
+ };
+ };
+ config.outputs.overlay = lib.composeManyExtensions config.overlays;
+}