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;