nixos/chromium: Make programs.chromium.enable install chromium

This commit is contained in:
Gavin John 2024-08-08 16:09:18 +01:00
parent 5544b2785f
commit 93b6400ff5
No known key found for this signature in database
GPG Key ID: 792E158CDD33C3EE

View File

@ -19,6 +19,8 @@ in
programs.chromium = {
enable = lib.mkEnableOption "{command}`chromium` policies";
package = lib.mkPackageOption pkgs "chromium" { };
enablePlasmaBrowserIntegration = lib.mkEnableOption "Native Messaging Host for Plasma Browser Integration";
plasmaBrowserIntegrationPackage = lib.mkPackageOption pkgs [ "plasma5Packages" "plasma-browser-integration" ] { };
@ -119,8 +121,9 @@ in
###### implementation
config = {
environment.etc = lib.mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
environment.etc = {
# for chromium
"chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json" = lib.mkIf cfg.enablePlasmaBrowserIntegration
{ source = "${cfg.plasmaBrowserIntegrationPackage}/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json"; };