From a5e6901702ae08e5bcbe4c7b6574abd559aff6ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20K=C3=A1n=C4=9B?= Date: Sun, 7 Jun 2020 17:19:45 +0200 Subject: [PATCH] traefik: unify TOML generation As a side effect, the dynamic config file is now indented --- nixos/modules/services/web-servers/traefik.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/web-servers/traefik.nix b/nixos/modules/services/web-servers/traefik.nix index 4ab7307c3b67..0631a26569c8 100644 --- a/nixos/modules/services/web-servers/traefik.nix +++ b/nixos/modules/services/web-servers/traefik.nix @@ -20,10 +20,10 @@ let in valueType; dynamicConfigFile = if cfg.dynamicConfigFile == null then pkgs.runCommand "config.toml" { - buildInputs = [ pkgs.remarshal ]; + buildInputs = [ pkgs.yj ]; preferLocalBuild = true; } '' - remarshal -if json -of toml \ + yj -jt -i \ < ${ pkgs.writeText "dynamic_config.json" (builtins.toJSON cfg.dynamicConfigOptions)