topology: extend some more

This commit is contained in:
h7x4
2025-12-31 02:40:02 +09:00
parent 843f8d6a02
commit 7cff6b197c
6 changed files with 124 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
{ config, unstablePkgs, lib, ... }:
let
cfg = config.services.postgresql;
cfgBak = config.services.postgresqlBackup;
in
{
config.topology.self.services.postgresql = lib.mkIf cfg.enable {
name = "PostgreSQL";
icon = "${unstablePkgs.super-tiny-icons}/share/icons/SuperTinyIcons/svg/postgresql.svg";
details.listen.text = lib.mkIf cfg.enableTCPIP "0.0.0.0:${toString cfg.settings.port}";
details.socket.text = "/run/postgresql/.s.PGSQL.${toString cfg.settings.port}";
details.version.text = cfg.package.version;
details.dataDir.text = cfg.dataDir;
# details.backup-time = lib.mkIf cfgBak.enable cfgBak.startAt;
# details.backup-location = lib.mkIf cfgBak.enable cfgBak.location;
};
}