Replace copy pasted hosts entry with option

This commit is contained in:
Sandro - 2022-12-22 21:25:53 +01:00
parent 2b7f6f41a8
commit 24bc378143
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
6 changed files with 23 additions and 39 deletions

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, zentralwerk, ... }:
# this file contains default configuration that may be turned on depending on other config settings.
# options should go to modules.
@ -71,6 +71,10 @@ lib.mkMerge [
enable = true;
permitRootLogin = "prohibit-password";
};
portunus = with zentralwerk.lib.config.site.net.serv; {
externalIp4 = hosts4.auth;
externalIp6 = hosts6.up4.auth;
};
};
programs = {

View File

@ -7,10 +7,6 @@
networking = {
hostName = "gitea";
hosts = with zentralwerk.lib.config.site.net.serv; {
${hosts6.up4.auth} = [ "auth.c3d2.de" ];
${hosts4.auth} = [ "auth.c3d2.de" ];
};
firewall.allowedTCPPorts = [ 2222 ];
};
@ -139,6 +135,8 @@
X11Forwarding no
'';
};
portunus.addToHosts = true;
};
programs.msmtp = {

View File

@ -11,13 +11,7 @@
"net.netfilter.nf_conntrack_max" = "65536";
};
networking = {
hostName = "hedgedoc";
hosts = with zentralwerk.lib.config.site.net.serv; {
${hosts6.up4.auth} = [ "auth.c3d2.de" ];
${hosts4.auth} = [ "auth.c3d2.de" ];
};
};
networking.hostName = "hedgedoc";
services = {
hedgedoc = {
@ -75,19 +69,19 @@
};
};
portunus.addToHosts = true;
postgresql = {
enable = true;
ensureDatabases = [
"hedgedoc"
];
ensureUsers = [
{
name = "hedgedoc";
ensurePermissions = {
"DATABASE \"hedgedoc\"" = "ALL PRIVILEGES";
};
}
];
ensureUsers = [ {
name = "hedgedoc";
ensurePermissions = {
"DATABASE \"hedgedoc\"" = "ALL PRIVILEGES";
};
}];
package = pkgs.postgresql_14;
};
};

View File

@ -101,10 +101,6 @@ in
# };
networking = {
hosts = with zentralwerk.lib.config.site.net.serv; {
${hosts6.up4.auth} = [ "auth.c3d2.de" ];
${hosts4.auth} = [ "auth.c3d2.de" ];
};
hostName = "hydra";
firewall.enable = false;
nameservers = [ "172.20.73.8" "9.9.9.9" ];
@ -233,9 +229,11 @@ in
};
};
smartd.enable = true;
portunus.addToHosts = true;
resolved.enable = false;
smartd.enable = true;
};
sops = {

View File

@ -46,14 +46,8 @@ in
group = config.users.users.dovecot2.group;
};
networking = {
hosts = with zentralwerk.lib.config.site.net.serv; {
${hosts6.up4.auth} = [ "auth.c3d2.de" ];
${hosts4.auth} = [ "auth.c3d2.de" ];
};
};
services = {
portunus.addToHosts = true;
postfix = {
enable = true;
enableSmtp = true;

View File

@ -7,13 +7,7 @@
needForSpeed = true;
};
networking = {
hostName = "mastodon";
hosts = with zentralwerk.lib.config.site.net.serv; {
${hosts6.up4.auth} = [ "auth.c3d2.de" ];
${hosts4.auth} = [ "auth.c3d2.de" ];
};
};
networking.hostName = "mastodon";
nixpkgs.config.allowUnfreePredicate = pkg: lib.getName pkg == "elasticsearch";
@ -152,6 +146,8 @@
"social.c3d2.de"
];
portunus.addToHosts = true;
postgresql = {
enable = true;
ensureUsers = [{