Nilpotent groups, spaces and g-spaces