summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2021-10-13 22:29:29 +0200
committerBob van der Linden <bobvanderlinden@gmail.com>2021-12-19 14:17:04 +0100
commite8dae9246b5ce13bc573c2e2747c1c62f5ac38e0 (patch)
tree920997df3af6db82b2d64ef39a5d2b6ac01eaa9d /nixos
parentc1b0d4acf56526dc8901135fdd668c48e7710632 (diff)
downloadnixpkgs-e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0.tar
nixpkgs-e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0.tar.gz
nixpkgs-e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0.tar.bz2
nixpkgs-e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0.tar.lz
nixpkgs-e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0.tar.xz
nixpkgs-e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0.tar.zst
nixpkgs-e8dae9246b5ce13bc573c2e2747c1c62f5ac38e0.zip
use pkgs.formats.json
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/docker.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix
index e273b964f58..b131ebd4f17 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;