From 2f1a499d264a7002a4d40502a92577d26f148f19 Mon Sep 17 00:00:00 2001 From: networkException Date: Thu, 15 Aug 2024 02:16:21 +0200 Subject: [PATCH 1/2] Revert "nixos/chromium: Update description for `programs.chromium.enable`" This reverts commit 80656f196da5a1d05ae2b3c50d8e8433ecf7800f. The main change to be reverted depends on this change, see the following commit. --- nixos/modules/programs/chromium.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/programs/chromium.nix b/nixos/modules/programs/chromium.nix index 65a334b46f0a..298a2197effa 100644 --- a/nixos/modules/programs/chromium.nix +++ b/nixos/modules/programs/chromium.nix @@ -17,7 +17,7 @@ in options = { programs.chromium = { - enable = lib.mkEnableOption "the {command}`chromium` web browser"; + enable = lib.mkEnableOption "{command}`chromium` policies"; package = lib.mkPackageOption pkgs "chromium" { }; From 2c8c689cd7643f326e2782d8d8b28572d946816a Mon Sep 17 00:00:00 2001 From: networkException Date: Thu, 15 Aug 2024 02:16:25 +0200 Subject: [PATCH 2/2] Revert "nixos/chromium: Make programs.chromium.enable install chromium" This reverts commit 93b6400ff55782bdcdc68df89168fe498ae6494a. Putting chromium in the system closure by enabling the module breaks previous expectations of module users. Previously, this would create policy files for chromium, google-chrome and brave as chromium based browsers. Use cases relating to a browser other than chromium directly as well as only using home-manager's module system to configure other aspects of a chromium package (various use cases require overriding inputs to the chromium derivation) were not covered by this breaking change. More design is needed before having policy and package options coexist properly in this module. --- nixos/modules/programs/chromium.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nixos/modules/programs/chromium.nix b/nixos/modules/programs/chromium.nix index 298a2197effa..4d248dbe0945 100644 --- a/nixos/modules/programs/chromium.nix +++ b/nixos/modules/programs/chromium.nix @@ -19,8 +19,6 @@ 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" ] { }; @@ -121,9 +119,8 @@ in ###### implementation - config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; - environment.etc = { + config = { + environment.etc = lib.mkIf cfg.enable { # 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"; };