1
Fork 0
satellite/modules/home-manager/discord.nix

38 lines
726 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
cfg = config.programs.discord;
in
{
options.programs.discord = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
disableUpdateCheck = lib.mkOption {
type = lib.types.bool;
default = false;
};
2023-03-12 05:24:25 +01:00
enableDevtools = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf cfg.enable {
home.packages = [
pkgs.discord
2023-03-12 05:24:25 +01:00
];
xdg.configFile."discord/settings.json".text =
builtins.toJSON
{
SKIP_HOST_UPDATE = cfg.disableUpdateCheck;
2023-03-12 05:24:25 +01:00
DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = cfg.enableDevtools;
};
};
}
2023-03-12 05:24:25 +01:00