From e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0 Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Wed, 13 Oct 2021 22:29:29 +0200 Subject: [PATCH] use pkgs.formats.json --- nixos/modules/virtualisation/docker.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index e273b964f58b..b131ebd4f174 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -8,8 +8,8 @@ let cfg = config.virtualisation.docker; proxy_env = config.networking.proxy.envVars; - daemonSettingsJson = builtins.toJSON cfg.daemon.settings; - daemonSettingsFile = pkgs.writeText "daemon.json" daemonSettingsJson; + settingsFormat = pkgs.formats.json {}; + daemonSettingsFile = settingsFormat.generate "daemon.json" cfg.daemon.settings; in { @@ -55,7 +55,7 @@ in daemon.settings = mkOption { - type = types.anything; + type = settingsFormat.type; default = { }; example = { ipv6 = true;