From 23a2a074cf74c03d770957eb8da620bcb8485091 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 22 Mar 2026 13:48:21 +0100 Subject: [PATCH] fix(nix): inherit noctalia-qs overlay in our overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids a second instantiation of Nixpkgs, when consuming the overlay, instead of using the package output directly. Smoke test: ```console nix repl nix-repl> :lf . nix-repl> pkgs = imports inputs.nixpkgs { overlays = [outputs.overlays.default]; } nix-repl> pkgs.noctalia-shell «derivation /nix/store/30ilvacnyyqyrnqh26vz6x1s095iwysb-noctalia-shell-2026-03-22_df0a16d.drv» nix-repl> pkgs.quickshell «derivation /nix/store/zyrm8fb4r4bq6mqrv4ssjc08haf5j2b4-quickshell-2026-03-21_c9beee5.drv» ``` Signed-off-by: Sefa Eyeoglu --- .gitignore | 2 ++ flake.nix | 34 ++++++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 7f3d074e3..d5001216d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ __pycache__ result build /debian/ +.direnv/ +.envrc diff --git a/flake.nix b/flake.nix index d6bb08cf8..b124f6153 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,16 @@ self.overlays.default ] ); + + mkDate = + longDate: + nixpkgs.lib.concatStringsSep "-" [ + (builtins.substring 0 4 longDate) + (builtins.substring 4 2 longDate) + (builtins.substring 6 2 longDate) + ]; + + version = mkDate (self.lastModifiedDate or "19700101") + "_" + (self.shortRev or "dirty"); in { formatter = eachSystem (system: pkgsFor.${system}.nixfmt); @@ -33,22 +43,14 @@ }); overlays = { - default = final: prev: { - noctalia-shell = final.callPackage ./nix/package.nix { - version = - let - mkDate = - longDate: - final.lib.concatStringsSep "-" [ - (builtins.substring 0 4 longDate) - (builtins.substring 4 2 longDate) - (builtins.substring 6 2 longDate) - ]; - in - mkDate (self.lastModifiedDate or "19700101") + "_" + (self.shortRev or "dirty"); - quickshell = noctalia-qs.packages.${prev.stdenv.hostPlatform.system}.default; - }; - }; + default = nixpkgs.lib.composeManyExtensions [ + noctalia-qs.overlays.default + (final: prev: { + noctalia-shell = final.callPackage ./nix/package.nix { + inherit version; + }; + }) + ]; }; devShells = eachSystem (system: {