{ config, lib, ... }: let cfg = config.vhack.postgresql; in { options.vhack.postgresql = { enable = lib.mkEnableOption "postgresql"; }; config = lib.mkIf cfg.enable { vhack.persist.directories = [ "/var/lib/postgresql" ]; services.postgresql.enable = true; }; }