{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9801","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9801/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9801/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9801/events","html_url":"https://github.com/NixOS/nixpkgs/issues/9801","id":106041257,"number":9801,"title":"error: The option `virtualisation.docker.storageDriver' is used but not defined.","user":{"login":"bjornfor","id":133602,"avatar_url":"https://avatars.githubusercontent.com/u/133602?v=3","gravatar_id":"","url":"https://api.github.com/users/bjornfor","html_url":"https://github.com/bjornfor","followers_url":"https://api.github.com/users/bjornfor/followers","following_url":"https://api.github.com/users/bjornfor/following{/other_user}","gists_url":"https://api.github.com/users/bjornfor/gists{/gist_id}","starred_url":"https://api.github.com/users/bjornfor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjornfor/subscriptions","organizations_url":"https://api.github.com/users/bjornfor/orgs","repos_url":"https://api.github.com/users/bjornfor/repos","events_url":"https://api.github.com/users/bjornfor/events{/privacy}","received_events_url":"https://api.github.com/users/bjornfor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/nixos","name":"nixos","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-11T16:03:20Z","updated_at":"2015-09-11T21:56:16Z","closed_at":null,"body":"I'm getting this error on latest release-15.09 channel (15.09.308.2734724):\r\n```\r\n$ nixos-rebuild build -Q\r\nbuilding Nix...\r\nbuilding the system configuration...\r\nerror: The option `virtualisation.docker.storageDriver' is used but not defined.\r\n(use ‘--show-trace’ to show detailed location information)\r\n```\r\n\r\nI'm guessing this commit caused it: https://github.com/NixOS/nixpkgs/commit/c2d1617b91ed4bb0b589d133da7f5428dd625b12"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/139670214","html_url":"https://github.com/NixOS/nixpkgs/issues/9801#issuecomment-139670214","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/9801","id":139670214,"user":{"login":"bjornfor","id":133602,"avatar_url":"https://avatars.githubusercontent.com/u/133602?v=3","gravatar_id":"","url":"https://api.github.com/users/bjornfor","html_url":"https://github.com/bjornfor","followers_url":"https://api.github.com/users/bjornfor/followers","following_url":"https://api.github.com/users/bjornfor/following{/other_user}","gists_url":"https://api.github.com/users/bjornfor/gists{/gist_id}","starred_url":"https://api.github.com/users/bjornfor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjornfor/subscriptions","organizations_url":"https://api.github.com/users/bjornfor/orgs","repos_url":"https://api.github.com/users/bjornfor/repos","events_url":"https://api.github.com/users/bjornfor/events{/privacy}","received_events_url":"https://api.github.com/users/bjornfor/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T21:56:15Z","updated_at":"2015-09-11T21:56:15Z","body":"I tried this:\r\n\r\n```\r\ndiff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix\r\nindex ba078cc..20f06b5 100644\r\n--- a/nixos/modules/virtualisation/docker.nix\r\n+++ b/nixos/modules/virtualisation/docker.nix\r\n@@ -45,7 +45,8 @@ in\r\n       };\r\n     storageDriver =\r\n       mkOption {\r\n-        type = types.enum [\"aufs\" \"btrfs\" \"devicemapper\" \"overlay\" \"zfs\"];\r\n+        type = types.nullOr (types.enum [\"aufs\" \"btrfs\" \"devicemapper\" \"overlay\" \"zfs\"]);\r\n+        default = null;\r\n         description =\r\n           ''\r\n             This option determines which Docker storage driver to use.\r\n@@ -86,6 +87,14 @@ in\r\n   ###### implementation\r\n \r\n   config = mkIf cfg.enable (mkMerge [\r\n+    { assertions = [ {\r\n+        assertion = cfg.storageDriver != null;\r\n+        message = ''\r\n+          Option services.docker.storageDriver is not defined (required because\r\n+          services.docker.enable is true).\r\n+        '';\r\n+        } ];\r\n+    }\r\n     { environment.systemPackages = [ pkgs.docker ];\r\n       users.extraGroups.docker.gid = config.ids.gids.docker;\r\n     }\r\n```\r\n\r\nBut got \"error: cannot coerce null to a string\". Is it because the mkMerge causes the option to be evaluated before the assert?"}}