some discofd flags. fixes something i think
This commit is contained in:
parent
bbe0c17023
commit
62acc8b4dd
1 changed files with 20 additions and 15 deletions
|
@ -3,6 +3,19 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.distractions.discord;
|
||||
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"
|
||||
];
|
||||
in {
|
||||
options.modules.software.distractions.discord = {
|
||||
enable = mkEnableOption "Enable discord, a social messaging app";
|
||||
|
@ -12,20 +25,6 @@ in {
|
|||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf (!cfg.vesktop) {
|
||||
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.discord-canary.override {
|
||||
withOpenASAR = true;
|
||||
withVencord = true;
|
||||
|
@ -37,7 +36,13 @@ in {
|
|||
in [ discord ];
|
||||
})
|
||||
(mkIf cfg.vesktop {
|
||||
user.packages = with pkgs; [ vesktop ];
|
||||
user.packages = [
|
||||
(pkgs.vesktop.overrideAttrs (old: {
|
||||
preInstall = ''
|
||||
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}")
|
||||
'';
|
||||
}))
|
||||
];
|
||||
})
|
||||
]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue