1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

feat: support writing arrays to system defaults

This commit is contained in:
Glib Shpychka 2023-03-14 14:50:10 +02:00 committed by GitHub
parent 87b9d090ad
commit 9f93b19585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@ let
if isInt value then "-int ${toString value}" else
if isFloat value then "-float ${strings.floatToString value}" else
if isString value then "-string '${value}'" else
if isList value then "-array ${concatStringsSep " " (map (v: writeValue v)value)}" else
throw "invalid value type";
writeDefault = domain: key: value: