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