1
Fork 0
satellite/modules/home-manager/discord.nix
Matei Adriel 1cd3d7a903
Hyprland
2023-05-24 03:17:09 +02:00

35 lines
908 B
Nix

{ config, lib, pkgs, ... }:
let cfg = config.programs.discord;
in
{
options.programs.discord = {
enable = lib.mkEnableOption "Discord";
enableOpenASAR = lib.mkEnableOption "openASAR";
disableUpdateCheck = lib.mkEnableOption "update skipping";
enableDevtools = lib.mkEnableOption "devtools";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.discord;
description = "The discord package to install";
};
};
config = lib.mkIf cfg.enable {
home.packages =
[
(if cfg.enableOpenASAR
then cfg.package.override { withOpenASAR = true; }
else cfg.package)
];
xdg.configFile."discord/settings.json".text =
builtins.toJSON
{
SKIP_HOST_UPDATE = cfg.disableUpdateCheck;
DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = cfg.enableDevtools;
};
};
}