nixos-config/modules/powerdns-admin.nix

38 lines
958 B
Nix
Raw Permalink Normal View History

2024-03-06 14:23:31 +01:00
{ lib, pkgs, config, ... }:
let
cfg = import ./vars.nix;
webport = cfg.powerdns-admin.port;
webdbport = cfg.powerdns-admin.dbport;
in
{
imports = [
2025-03-10 11:13:33 +01:00
#./podman.nix
2024-03-06 14:23:31 +01:00
./podman-postgresql.nix # for the database
#./nginx.nix # for the webserver
];
sops.secrets."powerdns-admin/db" = { };
sops.secrets."powerdns-admin/env" = { };
2025-03-10 11:13:33 +01:00
services.podman-postgresql."powerdnsadmin" = {
enable = true;
image = "docker.io/library/postgres:15-alpine";
port = (lib.strings.toInt webdbport);
passwordFile = config.sops.secrets."powerdns-admin/db".path;
};
2024-03-06 14:23:31 +01:00
2025-03-10 11:13:33 +01:00
virtualisation.oci-containers.containers.powerdnsadmin = {
image = "docker.io/powerdnsadmin/pda-legacy";
environment = {
TZ = "Europe/Berlin";
};
environmentFiles = [ config.sops.secrets."powerdns-admin/env".path ];
ports = [
"${webport}:80"
];
extraOptions = cfg.podman.extraOptions;
};
2024-03-06 14:23:31 +01:00
}
# vim: set et ts=2 sw=2 ai: