mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Introduce mapNullable
into lib and use it in a few places
Also simply some configure flag logic my grep also alerted me too.
This commit is contained in:
parent
f3055a3c50
commit
85aa5005af
7 changed files with 18 additions and 14 deletions
|
@ -4,7 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.services.graphite;
|
||||
writeTextOrNull = f: t: if t == null then null else pkgs.writeTextDir f t;
|
||||
writeTextOrNull = f: t: mapNullable (pkgs.writeTextDir f) t;
|
||||
|
||||
dataDir = cfg.dataDir;
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ let
|
|||
};
|
||||
});
|
||||
default = null;
|
||||
apply = x: if x == null then null else _filter x;
|
||||
apply = x: mapNullable _filter x;
|
||||
description = ''
|
||||
Optional http login credentials for metrics scraping.
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue