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

28 lines
726 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2023-05-24 03:17:09 +02:00
let cfg = config.programs.discord;
in
{
options.programs.discord = {
2023-05-24 03:17:09 +02:00
enable = lib.mkEnableOption "Discord";
disableUpdateCheck = lib.mkEnableOption "update skipping";
enableDevtools = lib.mkEnableOption "devtools";
2023-05-24 03:17:09 +02:00
package = lib.mkOption {
type = lib.types.package;
default = pkgs.discord;
description = "The discord package to install";
};
};
config = lib.mkIf cfg.enable {
2024-05-21 01:37:39 +02:00
home.packages = [ cfg.package ];
xdg.configFile."discord/settings.json".text =
2024-05-21 01:37:39 +02:00
builtins.toJSON {
SKIP_HOST_UPDATE = cfg.disableUpdateCheck;
DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = cfg.enableDevtools;
};
};
}
2023-03-12 05:24:25 +01:00