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
|
|
|
|
unstable = import inputs.nixpkgs-unstable { config = { allowUnfree = true; }; inherit system; };
|
|
|
|
enableWayland = drv: bin: drv.overrideAttrs (
|
|
|
|
old: {
|
|
|
|
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
|
|
|
|
postFixup = (old.postFixup or "") + ''
|
|
|
|
wrapProgram $out/bin/${bin} \
|
|
|
|
--add-flags "--enable-features=UseOzonePlatform" \
|
|
|
|
--add-flags "--ozone-platform=wayland"
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
);
|
2022-09-04 02:54:15 -04:00
|
|
|
discordWayland = pkgs.callPackage ../../../packages/discord/default.nix rec {
|
2022-06-23 02:57:41 -04:00
|
|
|
pname = "discord-electron";
|
|
|
|
binaryName = "Discord";
|
|
|
|
desktopName = "Discord (Wayland)";
|
2022-08-18 03:02:08 -04:00
|
|
|
version = "0.0.19";
|
2022-06-23 02:57:41 -04:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
|
2022-08-18 03:02:08 -04:00
|
|
|
hash = "sha256-GfSyddbGF8WA6JmHo4tUM27cyHV5kRAyrEiZe1jbA5A=";
|
2022-06-23 02:57:41 -04:00
|
|
|
};
|
|
|
|
electron = pkgs.electron_13;
|
|
|
|
};
|
|
|
|
zulipWayland = pkgs.makeDesktopItem {
|
|
|
|
name = "zulip-wayland";
|
|
|
|
desktopName = "Zulip (Wayland)";
|
|
|
|
exec = "${unstable.zulip}/bin/zulip --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
|
|
|
terminal = false;
|
|
|
|
icon = "zulip";
|
|
|
|
type = "Application";
|
|
|
|
};
|
|
|
|
# Facebook messenger
|
|
|
|
fbChromeDesktopItem = pkgs.makeDesktopItem {
|
|
|
|
name = "messenger-chrome";
|
|
|
|
desktopName = "Messenger (chrome)";
|
2022-07-03 00:33:57 -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-07-03 00:33:57 -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;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
[
|
|
|
|
# Discord
|
|
|
|
discordWayland
|
|
|
|
betterdiscordctl
|
|
|
|
# Desktop matrix client
|
|
|
|
(enableWayland element-desktop "element-desktop")
|
|
|
|
# Desktop signal client
|
|
|
|
(enableWayland signal-desktop "signal-desktop")
|
|
|
|
# Desktop telegram client
|
|
|
|
tdesktop
|
|
|
|
# Desktop mastodon client
|
|
|
|
tootle
|
|
|
|
# zulip
|
|
|
|
unstable.zulip
|
|
|
|
zulipWayland
|
|
|
|
# Zoom (for work, sadly)
|
|
|
|
unstable.zoom-us
|
|
|
|
# Teams (also for work)
|
|
|
|
unstable.teams
|
|
|
|
# chromium
|
|
|
|
(enableWayland chromium "chromium")
|
|
|
|
# Wayland workaround packages
|
|
|
|
fbChromeDesktopItem
|
|
|
|
teamsItem
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|