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