2022-06-23 02:57:41 -04:00
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
config = lib.mkIf config.nathan.programs.communications.enable {
|
|
|
|
home.packages = with pkgs;
|
|
|
|
let
|
2022-10-13 22:13:43 -04:00
|
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
|
|
config = { allowUnfree = true; };
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
enableWayland = drv: bin:
|
|
|
|
drv.overrideAttrs (old: {
|
|
|
|
nativeBuildInputs = (old.nativeBuildInputs or [ ])
|
|
|
|
++ [ pkgs.makeWrapper ];
|
2023-01-01 19:18:27 -05:00
|
|
|
runtimeDependencies = (old.runtimeDependencies or [ ])
|
|
|
|
++ [ pkgs.wayland ];
|
2022-06-23 02:57:41 -04:00
|
|
|
postFixup = (old.postFixup or "") + ''
|
|
|
|
wrapProgram $out/bin/${bin} \
|
|
|
|
--add-flags "--enable-features=UseOzonePlatform" \
|
|
|
|
--add-flags "--ozone-platform=wayland"
|
|
|
|
'';
|
2022-10-13 22:13:43 -04:00
|
|
|
});
|
2022-06-23 02:57:41 -04:00
|
|
|
zulipWayland = pkgs.makeDesktopItem {
|
|
|
|
name = "zulip-wayland";
|
|
|
|
desktopName = "Zulip (Wayland)";
|
2022-10-13 22:13:43 -04:00
|
|
|
exec =
|
|
|
|
"${unstable.zulip}/bin/zulip --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
2022-06-23 02:57:41 -04:00
|
|
|
terminal = false;
|
|
|
|
icon = "zulip";
|
|
|
|
type = "Application";
|
|
|
|
};
|
|
|
|
# Facebook messenger
|
|
|
|
fbChromeDesktopItem = pkgs.makeDesktopItem {
|
|
|
|
name = "messenger-chrome";
|
|
|
|
desktopName = "Messenger (chrome)";
|
2022-10-13 22:13:43 -04:00
|
|
|
exec = ''
|
|
|
|
${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://messenger.com"'';
|
2022-06-23 02:57:41 -04:00
|
|
|
terminal = false;
|
|
|
|
};
|
|
|
|
# Teams
|
|
|
|
teamsItem = pkgs.makeDesktopItem {
|
|
|
|
name = "teams-wayland";
|
|
|
|
desktopName = "Teams (Wayland)";
|
2022-10-13 22:13:43 -04:00
|
|
|
exec = ''
|
|
|
|
${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://teams.microsoft.com"'';
|
2022-06-23 02:57:41 -04:00
|
|
|
terminal = false;
|
|
|
|
};
|
2022-09-05 22:00:17 -04:00
|
|
|
# Cinny
|
|
|
|
cinnyItem = pkgs.makeDesktopItem {
|
|
|
|
name = "cinny";
|
|
|
|
desktopName = "Cinny";
|
2022-10-13 22:13:43 -04:00
|
|
|
exec = ''
|
|
|
|
${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://app.cinny.in"'';
|
2022-09-05 22:00:17 -04:00
|
|
|
terminal = false;
|
|
|
|
};
|
2023-01-01 19:07:26 -05:00
|
|
|
# Discord
|
|
|
|
discordItem = pkgs.makeDesktopItem {
|
|
|
|
name = "discord";
|
|
|
|
desktopName = "Discord (Chromium)";
|
|
|
|
exec = ''
|
|
|
|
${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform -ozone-platform=wayland "--app=https://discord.com/app"'';
|
|
|
|
terminal = false;
|
|
|
|
};
|
2023-01-27 20:36:15 -05:00
|
|
|
# Messages
|
|
|
|
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"'';
|
|
|
|
terminal = false;
|
|
|
|
};
|
2022-10-13 22:13:43 -04:00
|
|
|
in [
|
2022-06-23 02:57:41 -04:00
|
|
|
# Discord
|
2023-01-01 19:07:26 -05:00
|
|
|
# inputs.self.packages.${pkgs.system}.discordWayland
|
|
|
|
# betterdiscordctl
|
|
|
|
discordItem
|
2022-06-23 02:57:41 -04:00
|
|
|
# Desktop matrix client
|
|
|
|
(enableWayland element-desktop "element-desktop")
|
|
|
|
# Desktop signal client
|
2023-01-27 20:25:49 -05:00
|
|
|
(enableWayland
|
|
|
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.signal-desktop
|
|
|
|
"signal-desktop")
|
2022-06-23 02:57:41 -04:00
|
|
|
# Desktop telegram client
|
|
|
|
tdesktop
|
|
|
|
# Desktop mastodon client
|
2022-11-04 02:29:59 -04:00
|
|
|
# TODO: Reenable when unbroken on unstable
|
|
|
|
# tootle
|
2022-06-23 02:57:41 -04:00
|
|
|
# zulip
|
|
|
|
unstable.zulip
|
|
|
|
zulipWayland
|
|
|
|
# Zoom (for work, sadly)
|
|
|
|
unstable.zoom-us
|
|
|
|
# Teams (also for work)
|
|
|
|
unstable.teams
|
2022-09-05 22:00:17 -04:00
|
|
|
# Cinny for pretty matrix
|
|
|
|
cinnyItem
|
2022-06-23 02:57:41 -04:00
|
|
|
# chromium
|
|
|
|
(enableWayland chromium "chromium")
|
|
|
|
# Wayland workaround packages
|
|
|
|
fbChromeDesktopItem
|
|
|
|
teamsItem
|
2023-01-27 20:36:15 -05:00
|
|
|
# Messages
|
|
|
|
messagesItem
|
2022-06-23 02:57:41 -04:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|