From 85572d38f053393f260418b4f611b50b67c2c796 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 17 Mar 2023 23:49:27 -0400 Subject: [PATCH] Add dark messenger extension to chromium --- .../linux/programs/communications.nix | 23 +++++++++++-------- home-manager/linux/programs/media.nix | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/home-manager/linux/programs/communications.nix b/home-manager/linux/programs/communications.nix index 152da35..72291c8 100644 --- a/home-manager/linux/programs/communications.nix +++ b/home-manager/linux/programs/communications.nix @@ -16,15 +16,13 @@ ++ [ pkgs.wayland ]; postFixup = (old.postFixup or "") + '' wrapProgram $out/bin/${bin} \ - --add-flags "--enable-features=UseOzonePlatform" \ - --add-flags "--ozone-platform=wayland" + --add-flags "--ozone-platform-hint=auto" ''; }); zulipWayland = pkgs.makeDesktopItem { name = "zulip-wayland"; desktopName = "Zulip (Wayland)"; - exec = - "${unstable.zulip}/bin/zulip --enable-features=UseOzonePlatform --ozone-platform=wayland"; + exec = "${unstable.zulip}/bin/zulip --ozone-platform-hint=auto"; terminal = false; icon = "zulip"; type = "Application"; @@ -34,7 +32,7 @@ name = "messenger-chrome"; desktopName = "Messenger (chrome)"; exec = '' - ${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://messenger.com"''; + ${pkgs.ungoogled-chromium}/bin/chromium "--app=https://messenger.com"''; terminal = false; }; # Teams @@ -42,7 +40,7 @@ name = "teams-wayland"; desktopName = "Teams (Wayland)"; exec = '' - ${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://teams.microsoft.com"''; + ${pkgs.ungoogled-chromium}/bin/chromium "--app=https://teams.microsoft.com"''; terminal = false; }; # Cinny @@ -50,14 +48,14 @@ name = "cinny"; desktopName = "Cinny"; exec = '' - ${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://app.cinny.in"''; + ${pkgs.ungoogled-chromium}/bin/chromium "--app=https://app.cinny.in"''; terminal = false; }; messagesItem = pkgs.makeDesktopItem { name = "messages"; desktopName = "Messages (Chromium)"; exec = '' - ${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://messages.google.com/web"''; + ${pkgs.ungoogled-chromium}/bin/chromium "--app=https://messages.google.com/web"''; terminal = false; }; in [ @@ -74,7 +72,6 @@ # Desktop telegram client tdesktop # Desktop mastodon client - # TODO: Reenable when unbroken on unstable tootle # zulip unstable.zulip @@ -82,11 +79,17 @@ # Cinny for pretty matrix cinnyItem # chromium - (enableWayland chromium "chromium") + # (enableWayland ungoogled-chromium "Chromium (Wayland)") # Wayland workaround packages fbChromeDesktopItem # Messages messagesItem ]; + + programs.chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + extensions = [{ id = "bphagiicbkoknlhmmbiokkdobkiglpio"; }]; + }; }; } diff --git a/home-manager/linux/programs/media.nix b/home-manager/linux/programs/media.nix index b3a2a5d..8a92df1 100644 --- a/home-manager/linux/programs/media.nix +++ b/home-manager/linux/programs/media.nix @@ -8,7 +8,7 @@ let name = "iris"; desktopName = "Iris"; exec = '' - ${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=http://localhost:6680/iris/"''; + ${pkgs.ungoogled-chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=http://localhost:6680/iris/"''; terminal = false; }; in {