jq: add package
option
This commit is contained in:
parent
d2aaeac42c
commit
0e329cee4c
|
@ -30,6 +30,13 @@ in {
|
||||||
programs.jq = {
|
programs.jq = {
|
||||||
enable = mkEnableOption "the jq command-line JSON processor";
|
enable = mkEnableOption "the jq command-line JSON processor";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.jq;
|
||||||
|
defaultText = literalExample "pkgs.jq";
|
||||||
|
description = "jq package to use.";
|
||||||
|
};
|
||||||
|
|
||||||
colors = mkOption {
|
colors = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
The colors used in colored JSON output.</para>
|
The colors used in colored JSON output.</para>
|
||||||
|
@ -65,7 +72,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.jq ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.sessionVariables = let c = cfg.colors;
|
home.sessionVariables = let c = cfg.colors;
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Reference in a new issue