From d2db3e52c2076645b38bf7ddb1b8a69b3bc2c518 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 9 Jan 2022 22:19:07 +0100 Subject: [PATCH] home: add discord --- home/default.nix | 1 + home/discord/default.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 home/discord/default.nix diff --git a/home/default.nix b/home/default.nix index b88dfed..82d2cc3 100644 --- a/home/default.nix +++ b/home/default.nix @@ -5,6 +5,7 @@ ./bluetooth ./comma ./direnv + ./discord ./documentation ./feh ./firefox diff --git a/home/discord/default.nix b/home/discord/default.nix new file mode 100644 index 0000000..7348bb4 --- /dev/null +++ b/home/discord/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.my.home.discord; + + jsonFormat = pkgs.formats.json { }; +in +{ + options.my.home.discord = with lib; { + enable = mkEnableOption "discord configuration"; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + discord + ]; + + xdg.configFile."discord/settings.json".source = + jsonFormat.generate "discord.json" { + # Do not keep me from using the app just to force an update + SKIP_HOST_UPDATE = true; + }; + }; +}