From cf3a2e549693d65992ef59789cdba1373cbd2535 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Sun, 14 Jan 2024 00:34:35 -0800 Subject: [PATCH] Remove re-application check in propagationModule Home-manager does not actually use it's pkgs argument for packages, so the overlays will not be applied twice. --- builtinModules/propagationModule.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/builtinModules/propagationModule.nix b/builtinModules/propagationModule.nix index 8212926..b1f1953 100644 --- a/builtinModules/propagationModule.nix +++ b/builtinModules/propagationModule.nix @@ -7,7 +7,7 @@ { lib, config, flakelight, moduleArgs, inputs, outputs, ... }: let - inherit (lib) composeManyExtensions mapAttrs mkOption optionalAttrs; + inherit (lib) mapAttrs mkOption optionalAttrs; inherit (flakelight.types) module; in { @@ -21,16 +21,8 @@ in { config = (optionalAttrs (options ? nixpkgs.overlays) { # Apply flakelight overlays to NixOS/home-manager configurations - nixpkgs.overlays = lib.mkOrder 10 [ - # Avoid re-applying overlays - # This can happen when home-manager's pkgs arg already has them - (final: prev: optionalAttrs (! prev ? flakelight) ( - (composeManyExtensions - (config.withOverlays ++ [ config.packageOverlay ])) - final - prev - )) - ]; + nixpkgs.overlays = lib.mkOrder 10 + (config.withOverlays ++ [ config.packageOverlay ]); }) // (optionalAttrs (options ? home-manager.sharedModules) { # Propagate module to home-manager when using its nixos module