uhhh
uhhh the 2nd rendition
This commit is contained in:
parent
132a109da8
commit
565aac949c
37 changed files with 2606 additions and 36 deletions
43
modules/software/distractions/discord.nix
Normal file
43
modules/software/distractions/discord.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.distractions.discord;
|
||||
in {
|
||||
options.modules.software.distractions.discord = {
|
||||
enable = mkEnableOption "Enable discord, a social messaging app";
|
||||
armcord = mkEnableOption "Use armcord, an alternative discord client.";
|
||||
};
|
||||
|
||||
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.discord-canary.override {
|
||||
withOpenASAR = true;
|
||||
withVencord = true;
|
||||
}).overrideAttrs (old: {
|
||||
preInstall = ''
|
||||
gappsWrapperArgs=+("--add-flags" "${concatStringsSep " " flags}")
|
||||
'';
|
||||
});
|
||||
in [ discord ];
|
||||
})
|
||||
(mkIf cfg.armcord {
|
||||
user.packages = with pkgs; [ armcord ];
|
||||
})
|
||||
]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue