From 93b6400ff55782bdcdc68df89168fe498ae6494a Mon Sep 17 00:00:00 2001 From: Gavin John Date: Thu, 8 Aug 2024 16:09:18 +0100 Subject: [PATCH] nixos/chromium: Make programs.chromium.enable install chromium --- nixos/modules/programs/chromium.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/chromium.nix b/nixos/modules/programs/chromium.nix index 4d248dbe0945..298a2197effa 100644 --- a/nixos/modules/programs/chromium.nix +++ b/nixos/modules/programs/chromium.nix @@ -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"; };