use lib.strings.concatStringSep

This commit is contained in:
41666 2024-05-31 01:29:55 -04:00
parent 4c6f96ee39
commit 4db2bcb209
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
with builtins; let { lib, ... }: with builtins; let
collectAttrFragments = successPredicate: stopPredicate: attrs: let collectAttrFragments = successPredicate: stopPredicate: attrs: let
_collectAttrFragments = attrs: _collectAttrFragments = attrs:
concatMap (key: _collectAttrFragmentsBelowKey key attrs.${key}) (attrNames attrs) concatMap (key: _collectAttrFragmentsBelowKey key attrs.${key}) (attrNames attrs)
@ -24,7 +24,7 @@ with builtins; let
toEnvValue = value: toEnvValue = value:
if isBool value then (if value then "true" else "false") if isBool value then (if value then "true" else "false")
else if isList value then "[${concatStringSep ";" value}]" else if isList value then "[${lib.strings.concatStringsSep ";" value}]"
else value else value
; ;

View file

@ -1,5 +1,5 @@
{ piholeFlake, lingerFlake }: { config, pkgs, lib, ... }: with lib; with builtins; let { piholeFlake, lingerFlake }: { config, pkgs, lib, ... }: with lib; with builtins; let
inherit (import ../lib/util.nix) extractContainerEnvVars extractContainerFTLEnvVars; inherit ((import ../lib/util.nix) { inherit lib; }) extractContainerEnvVars extractContainerFTLEnvVars;
mkContainerEnvOption = { envVar, ... }@optionAttrs: mkContainerEnvOption = { envVar, ... }@optionAttrs:
(mkOption (removeAttrs optionAttrs [ "envVar" ])) (mkOption (removeAttrs optionAttrs [ "envVar" ]))