0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #148785 from pennae/more-option-doc-staticizing

treewide: more defaultText for options
This commit is contained in:
Graham Christensen 2021-12-17 11:14:08 -05:00 committed by GitHub
commit 06edb74413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 591 additions and 161 deletions

View file

@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }:
{ config, lib, options, pkgs, ... }:
let
cfg = config.services.parsedmarc;
opt = options.services.parsedmarc;
ini = pkgs.formats.ini {};
in
{
@ -80,6 +81,9 @@ in
datasource = lib.mkOption {
type = lib.types.bool;
default = cfg.provision.elasticsearch && config.services.grafana.enable;
defaultText = lib.literalExpression ''
config.${opt.provision.elasticsearch} && config.${options.services.grafana.enable}
'';
apply = x: x && cfg.provision.elasticsearch;
description = ''
Whether the automatically provisioned Elasticsearch