Use a more customized Discord package

This commit is contained in:
Natsu Kagami 2022-11-08 18:59:53 +01:00
parent 6a14d9d7ad
commit 8e49a68efb
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
4 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,27 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.nki.programs.discord;
in
{
options.nki.programs.discord = {
enable = mkEnableOption "Enable discord";
basePackage = mkOption {
type = types.package;
default = pkgs.unstable.discord;
description = "The base Discord package that will get patched";
};
package = mkOption {
type = types.package;
default = cfg.basePackage.override { withOpenASAR = true; nss = pkgs.nss_latest; };
description = "The actual package to use";
};
};
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
};
}

View file

@ -71,7 +71,7 @@ in
discord = mkOption {
type = types.nullOr types.str;
description = "The command for discord";
default = "${pkgs.discord}/bin/discord";
default = "${config.nki.programs.discord.package}/bin/discord";
};
lockCmd = mkOption {