i hate discord so much
This commit is contained in:
parent
a86eea72df
commit
5251310b99
|
@ -85,6 +85,7 @@
|
|||
# distractions
|
||||
distractions.steam.enable = true;
|
||||
distractions.discord.enable = true;
|
||||
distractions.discord.armcord = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,32 +6,38 @@ let
|
|||
in {
|
||||
options.modules.software.distractions.discord = {
|
||||
enable = mkEnableOption "Enable Discord, a social messaging app";
|
||||
armcord = mkEnableOption "Use Armcord, an alternative Electron client";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
user.packages = let
|
||||
flags =
|
||||
[
|
||||
"--flag-switches-begin"
|
||||
"--flag-switches-end"
|
||||
"--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"
|
||||
"--disable-features=UseOzonePlatform"
|
||||
"--enable-features=VaapiVideoDecoder"
|
||||
];
|
||||
discord = (pkgs.unstable.discord-canary.override {
|
||||
withOpenASAR = false;
|
||||
withVencord = true;
|
||||
}).overrideAttrs (old: {
|
||||
preInstall = ''
|
||||
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}")
|
||||
'';
|
||||
});
|
||||
in [ discord ];
|
||||
};
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf (!cfg.armcord) {
|
||||
user.packages = let
|
||||
flags =
|
||||
[
|
||||
"--flag-switches-begin"
|
||||
"--flag-switches-end"
|
||||
"--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"
|
||||
"--disable-features=UseOzonePlatform"
|
||||
"--enable-features=VaapiVideoDecoder"
|
||||
];
|
||||
discord = (pkgs.unstable.discord-canary.override {
|
||||
withOpenASAR = false;
|
||||
withVencord = true;
|
||||
}).overrideAttrs (old: {
|
||||
preInstall = ''
|
||||
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}")
|
||||
'';
|
||||
});
|
||||
in [ discord ];
|
||||
})
|
||||
(mkIf cfg.armcord {
|
||||
user.packages = with pkgs.unstable; [ armcord ];
|
||||
})
|
||||
]);
|
||||
}
|
Loading…
Reference in New Issue