2022-08-11 05:44:58 +03:00
|
|
|
{
|
2022-08-23 08:18:37 +03:00
|
|
|
config,
|
2022-08-11 05:44:58 +03:00
|
|
|
inputs,
|
|
|
|
pkgs,
|
2022-09-02 16:16:07 +03:00
|
|
|
lib,
|
2022-08-11 05:44:58 +03:00
|
|
|
...
|
2022-10-04 02:08:44 +03:00
|
|
|
}: let
|
|
|
|
theme = pkgs.fetchurl {
|
2022-11-04 00:59:34 +03:00
|
|
|
url = "https://catppuccin.github.io/discord/dist/catppuccin-mocha.theme.css";
|
|
|
|
hash = "sha256-LCjw3k2NuPKGwAEvPUnJeQk9zQQ+TyHpZ/eNrETkWSM=";
|
2022-10-04 02:08:44 +03:00
|
|
|
};
|
|
|
|
in {
|
2022-08-23 08:18:37 +03:00
|
|
|
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
|
2022-11-05 23:10:31 +03:00
|
|
|
".config/discordcanary"
|
2022-08-23 08:18:37 +03:00
|
|
|
];
|
2022-11-04 00:59:34 +03:00
|
|
|
xdg.configFile."discordcanary/settings.json".text = builtins.toJSON {
|
|
|
|
openasar = {
|
|
|
|
setup = true;
|
|
|
|
noTyping = true;
|
|
|
|
quickstart = true;
|
|
|
|
theme = builtins.readFile theme;
|
2022-10-04 02:08:44 +03:00
|
|
|
};
|
2022-11-04 00:59:34 +03:00
|
|
|
SKIP_HOST_UPDATE = true;
|
|
|
|
IS_MAXIMIZED = true;
|
|
|
|
IS_MINIMIZED = false;
|
|
|
|
trayBalloonShown = true;
|
|
|
|
};
|
|
|
|
home.packages = let
|
|
|
|
flags = [
|
|
|
|
"--flag-switches-begin"
|
2022-11-05 23:10:31 +03:00
|
|
|
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
|
2022-11-04 00:59:34 +03:00
|
|
|
"--flag-switches-end"
|
|
|
|
"--ozone-platform=wayland"
|
|
|
|
"--enable-webrtc-pipewire-capturer"
|
2022-11-05 23:10:31 +03:00
|
|
|
"--disable-gpu-memory-buffer-video-frames"
|
|
|
|
"--enable-accelerated-mjpeg-decode"
|
|
|
|
"--enable-accelerated-video"
|
|
|
|
"--enable-gpu-rasterization"
|
|
|
|
"--enable-native-gpu-memory-buffers"
|
|
|
|
"--enable-zero-copy"
|
|
|
|
"--ignore-gpu-blocklist"
|
2022-11-04 00:59:34 +03:00
|
|
|
];
|
|
|
|
pkg =
|
|
|
|
(pkgs.discord-canary.override {
|
2022-11-27 01:04:43 +03:00
|
|
|
nss = pkgs.nss_latest;
|
2022-11-04 00:59:34 +03:00
|
|
|
withOpenASAR = true;
|
|
|
|
})
|
|
|
|
.overrideAttrs (old: {
|
|
|
|
preInstall = ''
|
|
|
|
gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}")
|
|
|
|
'';
|
|
|
|
});
|
2022-10-04 02:08:44 +03:00
|
|
|
in [pkg];
|
2022-08-11 05:44:58 +03:00
|
|
|
}
|