Compare commits
2 commits
7a3a7cc797
...
53d9bfa3dc
| Author | SHA1 | Date | |
|---|---|---|---|
| 53d9bfa3dc | |||
| 9f47d5758f |
3 changed files with 12 additions and 27 deletions
|
|
@ -94,7 +94,7 @@
|
|||
dev.git.enable = true;
|
||||
# distractions
|
||||
distractions.discord.enable = true;
|
||||
distractions.discord.vesktop = true;
|
||||
distractions.discord.equibop = true;
|
||||
distractions.steam.enable = true;
|
||||
distractions.steam.useGamescope = true;
|
||||
# tools
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
hm.programs.fuzzel = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
settings = {
|
||||
main = {
|
||||
terminal = "wezterm start";
|
||||
|
|
|
|||
|
|
@ -3,47 +3,31 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.distractions.discord;
|
||||
flags = [
|
||||
"--flag-switches-begin"
|
||||
"--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"
|
||||
"--enable-features=UseOzonePlatform"
|
||||
"--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);
|
||||
finalPackage =
|
||||
if cfg.equibop then pkgs.equibop else
|
||||
if cfg.vesktop then pkgs.vesktop else
|
||||
vanillaDiscordPackage;
|
||||
in {
|
||||
options.modules.software.distractions.discord = {
|
||||
enable = mkEnableOption "Enable discord, a social messaging app";
|
||||
armcord = mkEnableOption "Use Armcord, an alternative Electron client";
|
||||
vesktop = mkEnableOption "Use Vesktop, an alternative Electron client with vencord preinstalled";
|
||||
enable = mkEnableOption "Enable Discord, a social messaging app";
|
||||
vesktop = mkEnableOption "Use Vesktop, an alternative Electron client with Vencord preinstalled";
|
||||
equibop = mkEnableOption "Use Equibop, a fork of Vesktop with Equicord preinstalled";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(cfg.armcord && cfg.vesktop);
|
||||
message = "You must either enable Armcord or Vesktop, not both";
|
||||
assertion = !(cfg.vesktop && cfg.equibop);
|
||||
message = "You must either enable Vesktop or Equibop, not both";
|
||||
}
|
||||
];
|
||||
|
||||
user.packages = [
|
||||
(package.overrideAttrs (old: {
|
||||
preInstall = ''
|
||||
gappsWrapperArgs+=("--add-flags" "${concatStringsSep " " flags}")
|
||||
'';
|
||||
}))
|
||||
finalPackage
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue