If you want all bars to have a different color, you have to use the interaction
of type
and nom
:
library(ggplot2)
ggplot() +
geom_bar(data = comb,aes(x = nom, y = val, fill = interaction(type, nom)),
stat = 'identity', position = 'dodge')