anchor.diff:          description = ''
             The postStart phase of the systemd service. You may need to
             override this if you are passing in flags to docker which
  -          don't cause the socket file to be created.
  +          don't cause the socket file to be created. This option is ignored
  +          if socket activation is used.
           '';
         };
   
  
positive.code:   config = mkIf cfg.enable (mkMerge [
      { environment.systemPackages = [ pkgs.docker ];
        users.extraGroups.docker.gid = config.ids.gids.docker;
      }
      (mkIf cfg.socketActivation {
  
        systemd.services.docker = {
          description = "Docker Application Container Engine";
          after = [ "network.target" "docker.socket" ];
          requires = [ "docker.socket" ];
          serviceConfig = {
            ExecStart = "${pkgs.docker}/bin/docker daemon --host=fd:// --group=docker --storage-driver=${cfg.storageDriver} ${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;
            LimitNPROC = 1048576;
          } // proxy_env;
        };
  
        systemd.sockets.docker = {
          description = "Docker Socket for the API";
          wantedBy = [ "sockets.target" ];
  
negative.code:         };
        };
      })
    ]);
  
  }
  