hosts/plover: fix erroneous config values

This commit is contained in:
Gabriel Arazas 2024-09-22 22:07:59 +08:00
parent 67bcd06f92
commit 5bd8aede0a
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
6 changed files with 16 additions and 28 deletions

View File

@ -30,13 +30,11 @@
monitoring.enable = true;
reverse-proxy.enable = true;
fail2ban.enable = true;
# The self-hosted services.
grafana.enable = true;
};
# We're using our own VPN configuration for this one.
suites.vpn.enable = true;
suites.vpn.personal.enable = true;
state.network = rec {
ipv4 = "135.181.26.192";
@ -115,8 +113,5 @@
type = "ed25519";
}];
# Make Nix experimental.
nix.package = pkgs.nixUnstable;
system.stateVersion = "23.05";
system.stateVersion = "24.11";
}

View File

@ -13,13 +13,13 @@ let
getZoneFile = domain: "${zonesDir}/${domain}.zone";
zonefile = pkgs.substituteAll {
src = ../setups/dns/zones/${domain}.zone;
src = ./zones/${domain}.zone;
ploverWANIPv4 = config.state.network.ipv4;
ploverWANIPv6 = config.state.network.ipv6;
};
fqdnZone = pkgs.substituteAll {
src = ../setups/dns/zones/${fqdn}.zone;
src = ./zones/${fqdn}.zone;
ploverWANIPv4 = config.state.network.ipv4;
ploverWANIPv6 = config.state.network.ipv6;
};
@ -280,7 +280,7 @@ in
security.dhparams.params.bind.bits = 4096;
}
(lib.mkIf hostCfg.setups.monitoring.enable {
(lib.mkIf hostCfg.services.monitoring.enable {
state.ports.bindStatistics.value = 9423;
services.bind.extraConfig = ''

View File

@ -153,12 +153,11 @@ in
# the PostgreSQL documentation at
# https://www.postgresql.org/docs/15/ddl-schemas.html#DDL-SCHEMAS-PATTERNS.
services.postgresql = {
ensureUsers = [{
ensureDatabases = [ config.services.gitea.user ];
ensureUsers = lib.singleton {
name = config.services.gitea.user;
ensurePermissions = {
"SCHEMA ${config.services.gitea.user}" = "ALL PRIVILEGES";
ensureDBOwnership = true;
};
}];
};
# Setting up Gitea for PostgreSQL secure schema usage.

View File

@ -155,13 +155,10 @@ in
# Setting up PostgreSQL with secure schema.
services.postgresql = {
ensureDatabases = [ grafanaDatabaseName ];
ensureUsers = [{
ensureUsers = lib.singleton {
name = grafanaDatabaseName;
ensurePermissions = {
"DATABASE ${grafanaDatabaseName}" = "ALL PRIVILEGES";
"SCHEMA ${grafanaDatabaseUser}" = "ALL PRIVILEGES";
ensureDBOwnership = true;
};
}];
};
})

View File

@ -9,7 +9,7 @@ let
certsDir = config.security.acme.certs."${authDomain}".directory;
backupsDir = "/var/lib/kanidm/backups";
backupsDir = "${config.state.paths.dataDir}/kanidm/backups";
in
{
options.hosts.plover.services.idm.enable = lib.mkEnableOption "preferred IDM server";

View File

@ -120,13 +120,10 @@ in
services.postgresql = {
ensureDatabases = [ vaultwardenDbName ];
ensureUsers = [{
ensureUsers = lib.singleton {
name = vaultwardenUser;
ensurePermissions = {
"DATABASE ${vaultwardenDbName}" = "ALL PRIVILEGES";
"SCHEMA ${vaultwardenDbName}" = "ALL PRIVILEGES";
ensureDBOwnership = true;
};
}];
};
systemd.services.vaultwarden = {