Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.05] nixos/tsm-client: Fix multi-value dsm.sys options #328031

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nixos/modules/programs/tsm-client.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let optionsGlobal = options; in
let

inherit (lib.attrsets) attrNames attrValues mapAttrsToList removeAttrs;
inherit (lib.lists) all allUnique concatLists elem isList map;
inherit (lib.lists) all allUnique concatLists concatMap elem isList map;
inherit (lib.modules) mkDefault mkIf;
inherit (lib.options) mkEnableOption mkOption mkPackageOption;
inherit (lib.strings) concatLines match optionalString toLower;
Expand Down Expand Up @@ -231,7 +231,7 @@ let
# Turn a key-value pair from the server options attrset
# into zero (value==null), one (scalar value) or
# more (value is list) configuration stanza lines.
if isList value then map (makeDsmSysLines key) value else # recurse into list
if isList value then concatMap (makeDsmSysLines key) value else # recurse into list
if value == null then [ ] else # skip `null` value
[ (" ${key}${
if value == true then "" else # just output key if value is `true`
Expand Down