97 lines
3.1 KiB
Nix
97 lines
3.1 KiB
Nix
{ 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 ];
|
|
runtimeDependencies = (old.runtimeDependencies or [ ])
|
|
++ [ pkgs.wayland ];
|
|
postFixup = (old.postFixup or "") + ''
|
|
wrapProgram $out/bin/${bin} \
|
|
--add-flags "--ozone-platform-hint=auto"
|
|
'';
|
|
});
|
|
zulipWayland = pkgs.makeDesktopItem {
|
|
name = "zulip-wayland";
|
|
desktopName = "Zulip (Wayland)";
|
|
exec = "${unstable.zulip}/bin/zulip --ozone-platform-hint=auto";
|
|
terminal = false;
|
|
icon = "zulip";
|
|
type = "Application";
|
|
};
|
|
# Facebook messenger
|
|
fbChromeDesktopItem = pkgs.makeDesktopItem {
|
|
name = "messenger-chrome";
|
|
desktopName = "Messenger (chrome)";
|
|
exec =
|
|
''${pkgs.chromium}/bin/chromium "--app=https://messenger.com"'';
|
|
terminal = false;
|
|
};
|
|
# Teams
|
|
teamsItem = pkgs.makeDesktopItem {
|
|
name = "teams-wayland";
|
|
desktopName = "Teams (Wayland)";
|
|
exec = ''
|
|
${pkgs.chromium}/bin/chromium "--app=https://teams.microsoft.com"'';
|
|
terminal = false;
|
|
};
|
|
# Cinny
|
|
cinnyItem = pkgs.makeDesktopItem {
|
|
name = "cinny";
|
|
desktopName = "Cinny";
|
|
exec = ''${pkgs.chromium}/bin/chromium "--app=https://app.cinny.in"'';
|
|
terminal = false;
|
|
};
|
|
messagesItem = pkgs.makeDesktopItem {
|
|
name = "messages";
|
|
desktopName = "Messages (Chromium)";
|
|
exec = ''
|
|
${pkgs.chromium}/bin/chromium "--app=https://messages.google.com/web"'';
|
|
terminal = false;
|
|
};
|
|
in [
|
|
# Discord
|
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.webcord-vencord
|
|
# inputs.self.packages.${pkgs.system}.discordWayland
|
|
betterdiscordctl
|
|
# discordItem
|
|
# Desktop matrix client
|
|
(enableWayland element-desktop "element-desktop")
|
|
# Desktop signal client
|
|
(enableWayland
|
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.signal-desktop
|
|
"signal-desktop")
|
|
# Desktop telegram client
|
|
tdesktop
|
|
# Desktop mastodon client
|
|
tootle
|
|
# zulip
|
|
unstable.zulip
|
|
zulipWayland
|
|
# Cinny for pretty matrix
|
|
cinnyItem
|
|
# chromium
|
|
# (enableWayland chromium "Chromium (Wayland)")
|
|
# Wayland workaround packages
|
|
fbChromeDesktopItem
|
|
# Messages
|
|
messagesItem
|
|
# Mattermost
|
|
mattermost-desktop
|
|
];
|
|
|
|
programs.chromium = {
|
|
enable = true;
|
|
extensions = [{ id = "bphagiicbkoknlhmmbiokkdobkiglpio"; }];
|
|
};
|
|
};
|
|
}
|