Skip to content

Commit ec98c80

Browse files
committed
chrome kde integration
1 parent b19efe2 commit ec98c80

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/apps/google-chrome/default.nix

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ let
2222
if machineType == "tablet" then builtins.concatStringsSep " " tabletFlags
2323
else if machineType == "desktop" then builtins.concatStringsSep " " desktopFlags
2424
else "";
25+
extensionsPolicy = builtins.toJSON {
26+
ExtensionInstallForcelist = [
27+
"lkbebcjgcmobigpeffafkodonchffocl;https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean/-/raw/master/updates.xml"
28+
] ++ lib.optionals (config.kde.enable or false) [
29+
"cimiefiiaegbelhefglklhhakcgmhkai;https://clients2.google.com/service/update2/crx"
30+
];
31+
};
2532

2633
chromePackage = (pkgs.google-chrome.override {
2734
commandLineArgs = chromeFlags;
@@ -40,10 +47,16 @@ in
4047
pkgs.vdhcoapp
4148
chromePackage
4249
];
43-
environment.etc."opt/chrome/native-messaging-hosts/net.downloadhelper.coapp.json".source =
44-
"${pkgs.vdhcoapp}/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json";
45-
environment.etc."/opt/chrome/policies/enrollment/CloudManagementEnrollmentToken".source = config.age.secrets.chrome-enrolment.path;
46-
environment.etc."/opt/chrome/policies/enrollment/CloudManagementEnrollmentOptions".text = "Mandatory";
4750
environment.sessionVariables.NO_AT_BRIDGE = "1";
51+
environment.etc = {
52+
"opt/chrome/native-messaging-hosts/net.downloadhelper.coapp.json".source =
53+
"${pkgs.vdhcoapp}/lib/mozilla/native-messaging-hosts/net.downloadhelper.coapp.json";
54+
"/opt/chrome/policies/enrollment/CloudManagementEnrollmentToken".source = config.age.secrets.chrome-enrolment.path;
55+
"/opt/chrome/policies/enrollment/CloudManagementEnrollmentOptions".text = "Mandatory";
56+
"opt/chrome/policies/managed/extensions.json".text = extensionsPolicy;
57+
} // lib.optionalAttrs (config.kde.enable or false) {
58+
"opt/chrome/native-messaging-hosts/org.kde.plasma.browser_integration.json".source =
59+
"${pkgs.kdePackages.plasma-browser-integration}/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json";
60+
};
4861
};
4962
}

modules/system/kde.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ in
4545
kdePackages.ksystemlog
4646
libreoffice-qt
4747
kdePackages.isoimagewriter
48+
kdePackages.plasma-browser-integration
4849
] ++ lib.optionals (machineType == "tablet") [
4950
maliit-keyboard
5051
maliit-framework

0 commit comments

Comments
 (0)