nix-git/modules/signal-desktop.nix

67 lines
2.1 KiB
Nix

{ config, pkgs, lib, ... }:
{
# Import unstable with niv.
nixpkgs.config.packageOverrides = pkgs: {
unstable = import (import ../nix/sources.nix).unstable {
inherit pkgs;
};
};
users.users.yoda = {
packages = with pkgs; [
signal-desktop-beta # Signal client
];
};
# users.users.yoda = {
# packages = with pkgs.unstable; [
# signal-desktop-beta # Signal client
# ];
# };
# TODO: lib.mkIf (config.services.xserver.displayManager.gdm.wayland)
# TODO: Signal on Wayland without crash.
# Signal does also use the NIXOS_OZONE_WL variable to enable Wayland support.
# However, it does currently crash 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
# https://github.com/NixOS/nixpkgs/blob/898cb2064b6e98b8c5499f37e81adbdf2925f7c5/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix#L155
# Wayland support:
# 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
#
# https://github.com/NixOS/nixpkgs/issues/222043#issuecomment-1493457041
nixpkgs.overlays = [
(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"
)
'';
});
})
];
# nixpkgs.overlays = [
# (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"
# )
# '';
# });
# })
# ];
}