nix-git/modules/signal-desktop.nix

60 lines
2.0 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
{
users.users.yoda = {
packages = with pkgs; [
signal-desktop-beta # Signal client
];
};
# users.users.yoda = {
# packages = with pkgs.unstable; [
# signal-desktop-beta # Signal client
# ];
# };
2023-10-18 17:48:00 +02:00
# TODO: lib.mkIf (config.services.xserver.displayManager.gdm.wayland)
2023-10-20 15:01:39 +02:00
# TODO: Signal on Wayland without frequent crashes.
# Signal does also use the NIXOS_OZONE_WL variable to enable Wayland support.
2023-10-20 15:01:39 +02:00
# However, it does currently crash (very often) in this mode.
# See
# https://github.com/stelcodes/nixos-config/commit/79071d30912c5b6c2560654925bcc98533cf758f
# https://github.com/NixOS/nixpkgs/pull/222163
# https://github.com/NixOS/nixpkgs/issues/261101
2023-10-19 14:27:47 +02:00
# https://github.com/NixOS/nixpkgs/blob/898cb2064b6e98b8c5499f37e81adbdf2925f7c5/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix#L155
# Wayland support:
2023-10-19 14:27:47 +02:00
# Temporary fix until the above TODO is resolved.
#
# The following worked multiple times with signal-desktop-beta
# ... But sometimes it crashes on startup.
# signal-desktop-beta --use-tray-icon --enable-features=UseOzonePlatform --ozone-platform=wayland
2023-10-19 14:27:47 +02:00
#
# https://github.com/NixOS/nixpkgs/issues/222043#issuecomment-1493457041
2023-10-20 15:01:39 +02:00
nixpkgs.overlays = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) [
2023-10-19 14:27:47 +02:00
(self: super: {
signal-desktop-beta = super.signal-desktop-beta.overrideAttrs (old: {
preFixup = old.preFixup + ''
gappsWrapperArgs+=(
--add-flags "--enable-features=UseOzonePlatform"
--add-flags "--ozone-platform=wayland"
)
'';
});
})
];
2023-10-20 15:01:39 +02:00
# nixpkgs.overlays = lib.mkIf (config.services.xserver.displayManager.gdm.wayland) [
# (self: super: {
# unstable.signal-desktop-beta = super.unstable.signal-desktop-beta.overrideAttrs (old: {
# preFixup = old.preFixup + ''
# gappsWrapperArgs+=(
# --add-flags "--enable-features=UseOzonePlatform"
# --add-flags "--ozone-platform=wayland"
# )
# '';
# });
# })
# ];
}