discord experimentatioj
This commit is contained in:
parent
4a7d8858e5
commit
d472a99976
1 changed files with 27 additions and 26 deletions
|
@ -5,7 +5,6 @@ let
|
||||||
cfg = config.modules.software.distractions.discord;
|
cfg = config.modules.software.distractions.discord;
|
||||||
flags = [
|
flags = [
|
||||||
"--flag-switches-begin"
|
"--flag-switches-begin"
|
||||||
"--flag-switches-end"
|
|
||||||
"--disable-gpu-memory-buffer-video-frames"
|
"--disable-gpu-memory-buffer-video-frames"
|
||||||
"--enable-accelerated-mjpeg-decode"
|
"--enable-accelerated-mjpeg-decode"
|
||||||
"--enable-accelerated-video"
|
"--enable-accelerated-video"
|
||||||
|
@ -13,36 +12,38 @@ let
|
||||||
"--enable-native-gpu-memory-buffers"
|
"--enable-native-gpu-memory-buffers"
|
||||||
"--enable-zero-copy"
|
"--enable-zero-copy"
|
||||||
"--ignore-gpu-blocklist"
|
"--ignore-gpu-blocklist"
|
||||||
"--disable-features=UseOzonePlatform"
|
"--enable-features=UseOzonePlatform"
|
||||||
"--enable-features=VaapiVideoDecoder"
|
"--enable-features=VaapiVideoDecoder"
|
||||||
|
"--enable-features=VaapiVideoEncoder"
|
||||||
|
"--enable-features=WebRTCPipeWireCapturer"
|
||||||
|
"--flag-switches-end"
|
||||||
];
|
];
|
||||||
|
vanillaDiscordPackage = pkgs.discord-canary.override {
|
||||||
|
withOpenASAR = true;
|
||||||
|
withVencord = true;
|
||||||
|
};
|
||||||
|
package = if cfg.armcord then pkgs.armcord else (if cfg.vesktop then pkgs.vesktop else vanillaDiscordPackage);
|
||||||
in {
|
in {
|
||||||
options.modules.software.distractions.discord = {
|
options.modules.software.distractions.discord = {
|
||||||
enable = mkEnableOption "Enable discord, a social messaging app";
|
enable = mkEnableOption "Enable discord, a social messaging app";
|
||||||
vesktop = mkEnableOption "Use vesktop, an alternative discord client.";
|
armcord = mkEnableOption "Use Armcord, an alternative Electron client";
|
||||||
|
vesktop = mkEnableOption "Use Vesktop, an alternative Electron client with vencord preinstalled";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable {
|
||||||
(mkIf (!cfg.vesktop) {
|
assertions = [
|
||||||
user.packages = let
|
{
|
||||||
discord = (pkgs.discord-canary.override {
|
assertion = !(cfg.armcord && cfg.vesktop);
|
||||||
withOpenASAR = true;
|
message = "You must either enable Armcord or Vesktop, not both";
|
||||||
withVencord = true;
|
}
|
||||||
}).overrideAttrs (old: {
|
];
|
||||||
preInstall = ''
|
|
||||||
gappsWrapperArgs=+("--add-flags" "${concatStringsSep " " flags}")
|
user.packages = [
|
||||||
'';
|
(package.overrideAttrs (old: {
|
||||||
});
|
preInstall = ''
|
||||||
in [ discord ];
|
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}")
|
||||||
})
|
'';
|
||||||
(mkIf cfg.vesktop {
|
}))
|
||||||
user.packages = [
|
];
|
||||||
(pkgs.vesktop.overrideAttrs (old: {
|
};
|
||||||
preInstall = ''
|
|
||||||
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}")
|
|
||||||
'';
|
|
||||||
}))
|
|
||||||
];
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue