From 8f0fb577da3889b2121af7a734b111e27b94c11d Mon Sep 17 00:00:00 2001 From: Myned Date: Sun, 22 Dec 2024 07:13:48 -0500 Subject: [PATCH] chromium: fix option not using final package Signed-off-by: Myned --- options/custom/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/options/custom/default.nix b/options/custom/default.nix index 550f745..f442185 100644 --- a/options/custom/default.nix +++ b/options/custom/default.nix @@ -39,7 +39,16 @@ in { wallpaper = mkOption {default = false;}; browser = { - command = mkOption {default = "${config.custom.programs.chromium.package}/bin/google-chrome-stable";}; + # HACK: Find first matching package in final home-manager list + command = mkOption { + default = "${lib.findFirst (pkg: + if (lib.hasAttr "pname" pkg) + then pkg.pname == "google-chrome" + else false) + null + config.home-manager.users.${config.custom.username}.home.packages}/bin/google-chrome-stable"; + }; + desktop = mkOption {default = "google-chrome.desktop";}; };