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