ark/users/modules/discord/default.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

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-12-06 22:03:04 +03:00
}: {
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 {
2023-08-23 14:06:38 +03:00
# openasar = {
# setup = true;
# noTyping = true;
# quickstart = true;
# # theme = builtins.readFile inputs.catppuccin-discord;
# };
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;
2023-08-23 14:06:38 +03:00
# withOpenASAR = true;
2022-11-04 00:59:34 +03:00
})
.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
}