{ config, lib, pkgs, options, ... }: with lib; let cfg = config.modules.services.postgres; in { options.modules.services.postgres = { enable = mkEnableOption "enable postgres, the database industry standard"; }; config = mkIf cfg.enable { services.postgresql = { enable = true; package = pkgs.postgresql_14; }; }; }