From 2ddc335e6f32b875e14ad9610101325b306a0add Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Sun, 3 Oct 2021 18:06:03 +0200 Subject: nixos/doc: clean up defaults and examples --- nixos/modules/services/monitoring/grafana.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nixos/modules/services/monitoring/grafana.nix') diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix index d46e38e82af..9b21dc78b19 100644 --- a/nixos/modules/services/monitoring/grafana.nix +++ b/nixos/modules/services/monitoring/grafana.nix @@ -330,13 +330,14 @@ in { staticRootPath = mkOption { description = "Root path for static assets."; default = "${cfg.package}/share/grafana/public"; + defaultText = literalExpression ''"''${package}/share/grafana/public"''; type = types.str; }; package = mkOption { description = "Package to use."; default = pkgs.grafana; - defaultText = "pkgs.grafana"; + defaultText = literalExpression "pkgs.grafana"; type = types.package; }; @@ -344,7 +345,7 @@ in { type = with types; nullOr (listOf path); default = null; description = "If non-null, then a list of packages containing Grafana plugins to install. If set, plugins cannot be manually installed."; - example = literalExample "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]"; + example = literalExpression "with pkgs.grafanaPlugins; [ grafana-piechart-panel ]"; # Make sure each plugin is added only once; otherwise building # the link farm fails, since the same path is added multiple # times. -- cgit 1.4.1