nixos/graphite: Make pure, fix several bugs, add dataDir option