I have a NAS running NixOS with a HDD ZFS mirror and an NVMe SSD with ZFS on it. The SSD is mounted at /data/apps
and I’d like Prometheus to write to /data/apps/prometheus
, however there doesn’t seem to be a way to overwrite the default /var/lib/prometheus2/data
(I’m aware of the stateDir option, it still doesn’t do what I want) just using services.prometheus
or other options. I’d rather not create a custom Prometheus service just for this, since I don’t want to lose all of the nice stuff in nixpkgs.
My question here is partially a question of semantics; should I create a ZFS dataset that mounts to /var/lib/prometheus2/data
or should I create the custom service?