{ pkgs, lib, config, ... }: { options = { docker.enable = lib.mkEnableOption "enables docker"; docker.btrfsSupport = lib.mkEnableOption "changes docker storageDriver to btrfs"; }; config = lib.mkIf config.docker.enable { virtualisation.docker = { enable = true; storageDriver = lib.mkIf config.docker.btrfsSupport "btrfs"; }; environment.systemPackages = with pkgs; [ docker-compose ]; }; }