1
Fork 0
satellite/modules/home-manager/discord.nix
2023-03-12 05:24:25 +01:00

38 lines
726 B
Nix

{ 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;
};
enableDevtools = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf cfg.enable {
home.packages = [
pkgs.discord
];
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;
};
};
}