summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2016-09-13 15:59:18 +0200
committerGitHub <noreply@github.com>2016-09-13 15:59:18 +0200
commit7a9dd489d6200929c1f89c22441f286fc46b8170 (patch)
treeb2d5a060c2f30fd660a813bb22cadc5dd0231aff /nixos/modules/virtualisation
parent49ba0b7896a4e8f70c2c8e9571c814e5dd1d3931 (diff)
parent5d9c62541a3524fd2c035b75058a0cb412b61f95 (diff)
downloadnixlib-7a9dd489d6200929c1f89c22441f286fc46b8170.tar
nixlib-7a9dd489d6200929c1f89c22441f286fc46b8170.tar.gz
nixlib-7a9dd489d6200929c1f89c22441f286fc46b8170.tar.bz2
nixlib-7a9dd489d6200929c1f89c22441f286fc46b8170.tar.lz
nixlib-7a9dd489d6200929c1f89c22441f286fc46b8170.tar.xz
nixlib-7a9dd489d6200929c1f89c22441f286fc46b8170.tar.zst
nixlib-7a9dd489d6200929c1f89c22441f286fc46b8170.zip
Merge pull request #18481 from offlinehacker/pkgs/docker/1.12.1
docker: 1.10.3 -> 1.12.1
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/docker.nix25
1 files changed, 21 insertions, 4 deletions
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix
index ebc2be087a5b..92fe98f3f9c2 100644
--- a/nixos/modules/virtualisation/docker.nix
+++ b/nixos/modules/virtualisation/docker.nix
@@ -40,13 +40,25 @@ in
       };
     storageDriver =
       mkOption {
-        type = types.enum ["aufs" "btrfs" "devicemapper" "overlay" "zfs"];
-        default = "devicemapper";
+        type = types.nullOr (types.enum ["aufs" "btrfs" "devicemapper" "overlay" "overlay2" "zfs"]);
+        default = null;
         description =
           ''
-            This option determines which Docker storage driver to use.
+            This option determines which Docker storage driver to use. By default
+            it let's docker automatically choose preferred storage driver.
           '';
       };
+
+    logDriver =
+      mkOption {
+        type = types.enum ["none" "json-file" "syslog" "journald" "gelf" "fluentd" "awslogs" "splunk" "etwlogs" "gcplogs"];
+        default = "journald";
+        description =
+          ''
+            This option determines which Docker log driver to use.
+          '';
+      };
+
     extraOptions =
       mkOption {
         type = types.separatedString " ";
@@ -88,7 +100,12 @@ in
         after = [ "network.target" ] ++ (optional cfg.socketActivation "docker.socket") ;
         requires = optional cfg.socketActivation "docker.socket";
         serviceConfig = {
-          ExecStart = "${pkgs.docker}/bin/docker daemon --group=docker --storage-driver=${cfg.storageDriver} ${optionalString cfg.socketActivation "--host=fd://"} ${cfg.extraOptions}";
+          ExecStart = ''${pkgs.docker}/bin/dockerd \
+            --group=docker --log-driver=${cfg.logDriver} \
+            ${optionalString (cfg.storageDriver != null) "--storage-driver=${cfg.storageDriver}"} \
+            ${optionalString cfg.socketActivation "--host=fd://"} \
+            ${cfg.extraOptions}
+          '';
           #  I'm not sure if that limits aren't too high, but it's what
           #  goes in config bundled with docker itself
           LimitNOFILE = 1048576;