Use a more customized Discord package
This commit is contained in:
parent
6a14d9d7ad
commit
8e49a68efb
4 changed files with 34 additions and 2 deletions
27
home/modules/programs/discord.nix
Normal file
27
home/modules/programs/discord.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue