1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-24 09:50:58 +01:00

chromium: fix null package

This commit is contained in:
Nick DeGroot 2025-12-10 12:55:09 -08:00 committed by Matthieu Coudron
parent af7c726e8b
commit 7b34e428f3

View file

@ -40,7 +40,7 @@ let
finalPackage = mkOption {
inherit visible;
type = types.package;
type = types.nullOr types.package;
readOnly = true;
description = ''
Resulting customized ${name} package
@ -220,15 +220,22 @@ let
};
in
lib.mkIf cfg.enable {
programs.${browser}.finalPackage = lib.mkIf (cfg.package != null) (
assertions = [
{
assertion = !(cfg.package == null && cfg.commandLineArgs != [ ]);
message = "Cannot set `commandLineArgs` when `package` is null for ${browser}.";
}
];
programs.${browser}.finalPackage =
if cfg.commandLineArgs != [ ] then
cfg.package.override {
commandLineArgs = lib.concatStringsSep " " cfg.commandLineArgs;
}
else
cfg.package
);
cfg.package;
home.packages = lib.mkIf (cfg.finalPackage != null) [
cfg.finalPackage