0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #224859 from Yarny0/tsm-client

tsm-client: use `libxcrypt-legacy`, drop `openssl_1_1`, use `concatLines` in module
This commit is contained in:
ajs124 2023-04-11 11:17:29 +02:00 committed by GitHub
commit f7245e9e4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 15 deletions

View file

@ -6,7 +6,7 @@ let
inherit (lib.attrsets) attrNames filterAttrs hasAttr mapAttrs mapAttrsToList optionalAttrs;
inherit (lib.modules) mkDefault mkIf;
inherit (lib.options) literalExpression mkEnableOption mkOption;
inherit (lib.strings) concatStringsSep optionalString toLower;
inherit (lib.strings) concatLines optionalString toLower;
inherit (lib.types) addCheck attrsOf lines nonEmptyStr nullOr package path port str strMatching submodule;
# Checks if given list of strings contains unique
@ -164,7 +164,7 @@ let
mkLine = k: v: k + optionalString (v!="") " ${v}";
lines = mapAttrsToList mkLine attrset;
in
concatStringsSep "\n" lines;
concatLines lines;
config.stanza = ''
server ${config.name}
${config.text}
@ -263,7 +263,7 @@ let
${optionalString (cfg.defaultServername!=null) "defaultserver ${cfg.defaultServername}"}
${concatStringsSep "\n" (mapAttrsToList (k: v: v.stanza) cfg.servers)}
${concatLines (mapAttrsToList (k: v: v.stanza) cfg.servers)}
'';
in