diff options
author | Felix Buehler <account@buehler.rocks> | 2023-06-24 20:19:19 +0200 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-06-24 20:19:19 +0200 |
commit | f3719756b550113c1acbbab00c89a56fb77256f2 (patch) | |
tree | a94f6678f9b1b25c6773bdd7a35422aabc816032 /nixos/modules/services/networking/nsd.nix | |
parent | e9e3f2e7362aba3ef709173d1777f0b893fc0ebf (diff) |
treewide: use optionalString instead of 'then ""'
Diffstat (limited to 'nixos/modules/services/networking/nsd.nix')
-rw-r--r-- | nixos/modules/services/networking/nsd.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index 09f3bdc7ae07..6db728e7aa5a 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -137,8 +137,8 @@ let ''; yesOrNo = b: if b then "yes" else "no"; - maybeString = prefix: x: if x == null then "" else ''${prefix} "${x}"''; - maybeToString = prefix: x: if x == null then "" else ''${prefix} ${toString x}''; + maybeString = prefix: x: optionalString (x != null) ''${prefix} "${x}"''; + maybeToString = prefix: x: optionalString (x != null) ''${prefix} ${toString x}''; forEach = pre: l: concatMapStrings (x: pre + x + "\n") l; |