Override qq to use wayland.

This commit is contained in:
ulic-youthlic 2025-06-02 10:46:36 +08:00
parent e77baa8fc2
commit 50d2805acb
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
5 changed files with 34 additions and 0 deletions

View file

@ -507,6 +507,10 @@ in
app-id = "^org\\.telegram\\.desktop$";
title = "Media viewer";
})
(match {
app-id = "^QQ$";
title = "";
})
(leaf "open-floating" true)
(leaf "open-fullscreen" false)
])

View file

@ -0,0 +1,5 @@
{outputs, ...}: final: prev: let
inherit (prev.stdenv.hostPlatform) system;
in {
qq = outputs.packages."${system}".QQ;
}

View file

@ -8,6 +8,7 @@ in
./spotifyx.nix
./radicle-explorer.nix
./wshowkeys.nix
./QQ.nix
]
|> map (file: import file args)
|> (overlays: (lib.composeManyExtensions overlays) final prev)

23
pkgs/QQ.nix Normal file
View file

@ -0,0 +1,23 @@
{
symlinkJoin,
makeWrapper,
qq,
...
}:
symlinkJoin {
name = "QQ";
paths = [qq];
inherit (qq) meta;
buildInputs = [
makeWrapper
];
postBuild = ''
rm $out/share/applications/qq.desktop
cp ${qq}/share/applications/qq.desktop $out/share/applications/qq.desktop
substituteInPlace $out/share/applications/qq.desktop \
--replace-fail "${qq}" $out
wrapProgram $out/bin/qq \
--set NIXOS_OZONE_WL 1 \
--add-flags '--wayland-text-input-version=3'
'';
}

View file

@ -17,6 +17,7 @@ in
TrackersListCollection = callPackage ./TrackersListCollection.nix {};
wshowkeys-mao = callPackage ./wshowkeys-mao.nix {};
OuterWildsTextAdventure = callPackage ./OuterWildsTextAdventure.nix {};
QQ = callPackage ./QQ.nix {};
noto-serif-cjk = callPackage ./noto-serif-cjk.nix {};
noto-sans-cjk = callPackage ./noto-sans-cjk.nix {};