summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/network-filesystems/openafs/lib.nix
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-03-19 21:44:31 +0100
committerFelix Buehler <account@buehler.rocks>2023-04-07 13:38:33 +0200
commit327b0cff7aedc20a148d245b1182f43800acc1f5 (patch)
treea498ae1b2dd2289310483d81345903d7e9123cb7 /nixos/modules/services/network-filesystems/openafs/lib.nix
parentb392d9b827cf4bb52141ab86e4202ec340f0b181 (diff)
treewide: use more lib.optionalString
Diffstat (limited to 'nixos/modules/services/network-filesystems/openafs/lib.nix')
-rw-r--r--nixos/modules/services/network-filesystems/openafs/lib.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/network-filesystems/openafs/lib.nix b/nixos/modules/services/network-filesystems/openafs/lib.nix
index 80628f4dfaf2..e5e147a8dc33 100644
--- a/nixos/modules/services/network-filesystems/openafs/lib.nix
+++ b/nixos/modules/services/network-filesystems/openafs/lib.nix
@@ -1,13 +1,13 @@
{ config, lib, ...}:
let
- inherit (lib) concatStringsSep mkOption types;
+ inherit (lib) concatStringsSep mkOption types optionalString;
in {
mkCellServDB = cellName: db: ''
>${cellName}
- '' + (concatStringsSep "\n" (map (dbm: if (dbm.ip != "" && dbm.dnsname != "") then dbm.ip + " #" + dbm.dnsname else "")
+ '' + (concatStringsSep "\n" (map (dbm: optionalString (dbm.ip != "" && dbm.dnsname != "") "${dbm.ip} #${dbm.dnsname}")
db))
+ "\n";