diff options
author | Artturi <Artturin@artturin.com> | 2023-04-20 16:07:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-20 16:07:30 +0300 |
commit | b83db86a9e9ff5b07360e8917c3e007001b06f9c (patch) | |
tree | 01bc1eeb7fd3e6c17a4d3649400d8310ce691c59 /nixos/modules/services/network-filesystems | |
parent | 2fc54db033c27ffb4f50e35a2079233d7280c9b9 (diff) | |
parent | 327b0cff7aedc20a148d245b1182f43800acc1f5 (diff) |
Merge pull request #222080 from Stunkymonkey/nixos-optionalString
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r-- | nixos/modules/services/network-filesystems/openafs/lib.nix | 4 |
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 80628f4dfaf29..e5e147a8dc338 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"; |