diff --git a/hosts/modules/hal/pine64-pinephone-pro/default.nix b/hosts/modules/hal/pine64-pinephone-pro/default.nix index 1ffbbe5de..5382a7547 100644 --- a/hosts/modules/hal/pine64-pinephone-pro/default.nix +++ b/hosts/modules/hal/pine64-pinephone-pro/default.nix @@ -120,6 +120,20 @@ in config.boot.kernelPackages.rk818-charger #< rk818 battery/charger isn't mainline as of 2024-10-01 ]; + # default nixos behavior is to error if a kernel module is provided by more than one package. + # in fact, i'm _intentionally_ overwriting the in-tree modules, so inline this buildEnv logic + # from AKA pkgs.aggregateModules + # but configured to **ignore collisions** + system.modulesTree = lib.mkForce [( + (pkgs.aggregateModules + ( config.boot.extraModulePackages ++ [ config.boot.kernelPackages.kernel ]) + ).overrideAttrs { + # earlier items override the contents of later items + ignoreCollisions = true; + # checkCollisionContents = false; + } + )]; + boot.kernelModules = [ # these don't get probed automatically, not sure why (shouldn't the device tree cause it to be auto-loaded?) # but are needed for battery capacity/charging info diff --git a/pkgs/additional/linux-sane-pinephonepro/default.nix b/pkgs/additional/linux-sane-pinephonepro/default.nix index ab67b1841..667760e8a 100644 --- a/pkgs/additional/linux-sane-pinephonepro/default.nix +++ b/pkgs/additional/linux-sane-pinephonepro/default.nix @@ -384,12 +384,12 @@ linux_latest.override { name = "make-module-for-out-of-tree"; patch = null; extraStructuredConfig = with lib.kernel; { - MFD_RK8XX = no; - MFD_RK8XX_I2C = no; - MFD_RK8XX_SPI = no; #< necessary for MFD_RK8XX=... to apply - # MFD_RK8XX = module; - # MFD_RK8XX_I2C = module; - # MFD_RK8XX_SPI = module; + # MFD_RK8XX = no; + # MFD_RK8XX_I2C = no; + # MFD_RK8XX_SPI = no; #< necessary for MFD_RK8XX=... to apply + MFD_RK8XX = module; + MFD_RK8XX_I2C = module; + MFD_RK8XX_SPI = module; }; } ];