(mirror) personal dotfiles
github.com/crescentrose/dotfiles
1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7let
8 cfg = config.programs.discordAccel;
9in
10{
11 options.programs.discordAccel = {
12 enable = lib.mkEnableOption "The cursed online chat app.";
13 package = lib.mkPackageOption pkgs "discord" { nullable = true; };
14 };
15
16 config = lib.mkIf cfg.enable {
17 home.packages = [ cfg.package ];
18
19 # Enable hardware acceleration in Discord, which is disabled by default because of reasons only
20 # known to Mr. John Discord himself
21 xdg.desktopEntries.discord = {
22 categories = [
23 "Network"
24 "InstantMessaging"
25 ];
26 exec = "discord --ignore-gpu-blocklist --disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop --enable-gpu-rasterization --enable-zero-copy";
27 genericName = "All-in-one cross-platform voice and text chat for gamers";
28 icon = "discord";
29 mimeType = [ "x-scheme-handler/discord" ];
30 name = "Discord";
31 type = "Application";
32 terminal = false;
33 };
34 };
35}