From 9957e2fa2e6f088cd85de113cfeeb9b06f833413 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 19 Oct 2023 14:27:47 +0200 Subject: [PATCH] signal on Wayland --- modules/autostart.nix | 12 ++++++++---- modules/signal-desktop.nix | 35 ++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/modules/autostart.nix b/modules/autostart.nix index f0274e8..29529c5 100644 --- a/modules/autostart.nix +++ b/modules/autostart.nix @@ -7,15 +7,19 @@ home.file."keepassxc" = { target = ".config/autostart/org.keepassxc.KeePassXC.desktop"; source = (pkgs.keepassxc + "/share/applications/org.keepassxc.KeePassXC.desktop"); - }; + }; # home.file."gnome-secrets" = { # target = ".config/autostart/org.gnome.World.Secrets.desktop"; # source = (pkgs.gnome-secrets + "/share/applications/org.gnome.World.Secrets.desktop"); # }; - home.file."signal-desktop" = lib.mkIf (osConfig.networking.hostName == "yodaTux") { - target = ".config/autostart/" + pkgs.signal-desktop.pname + ".desktop"; - source = (pkgs.signal-desktop + "/share/applications/" + pkgs.signal-desktop.pname + ".desktop"); +# home.file."signal-desktop" = lib.mkIf (osConfig.networking.hostName == "yodaTux") { +# target = ".config/autostart/" + pkgs.signal-desktop.pname + ".desktop"; +# source = (pkgs.signal-desktop + "/share/applications/" + pkgs.signal-desktop.pname + ".desktop"); +# }; + home.file."signal-desktop-beta" = lib.mkIf (osConfig.networking.hostName == "yodaTux") { + target = ".config/autostart/" + pkgs.signal-desktop-beta.pname + ".desktop"; + source = (pkgs.signal-desktop-beta + "/share/applications/" + pkgs.signal-desktop-beta.pname + ".desktop"); }; home.file."thunderbird" = lib.mkIf (osConfig.networking.hostName == "yodaTux") { diff --git a/modules/signal-desktop.nix b/modules/signal-desktop.nix index fef89e9..9b156df 100644 --- a/modules/signal-desktop.nix +++ b/modules/signal-desktop.nix @@ -27,25 +27,30 @@ # 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: - # The following worked once ... But currently Signal crashes. + # 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 - - # Temporary fix. + # # 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: { + 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: {