refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
41
modules/nixos/apps/discord/default.nix
Normal file
41
modules/nixos/apps/discord/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ options, config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.apps.discord;
|
||||
discord = lib.replugged.makeDiscordPlugged {
|
||||
inherit pkgs;
|
||||
|
||||
# This is currently broken, but could speed up Discord startup in the future.
|
||||
withOpenAsar = false;
|
||||
|
||||
plugins = {
|
||||
inherit (inputs) discord-tweaks;
|
||||
};
|
||||
|
||||
themes = {
|
||||
inherit (inputs) discord-nord-theme;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.plusultra.apps.discord = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable Discord.";
|
||||
canary.enable = mkBoolOpt false "Whether or not to enable Discord Canary.";
|
||||
chromium.enable = mkBoolOpt false
|
||||
"Whether or not to enable the Chromium version of Discord.";
|
||||
firefox.enable = mkBoolOpt false
|
||||
"Whether or not to enable the Firefox version of Discord.";
|
||||
native.enable = mkBoolOpt false "Whether or not to enable the native version of Discord.";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable or cfg.chromium.enable) {
|
||||
environment.systemPackages =
|
||||
lib.optional cfg.enable discord
|
||||
++ lib.optional cfg.canary.enable pkgs.plusultra.discord
|
||||
++ lib.optional cfg.chromium.enable pkgs.plusultra.discord-chromium
|
||||
++ lib.optional cfg.firefox.enable pkgs.plusultra.discord-firefox
|
||||
++ lib.optional cfg.native.enable pkgs.discord;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue