KPP configuration #46

Merged
rouven0 merged 3 commits from kpp into main 2023-07-07 12:14:11 +02:00
5 changed files with 70 additions and 52 deletions
Showing only changes of commit 1b3ea40f9e - Show all commits

View file

@ -43,8 +43,8 @@
./modules/options.nix ./modules/options.nix
./modules/base.nix ./modules/base.nix
./modules/sops.nix ./modules/sops.nix
./modules/ldap.nix
./modules/kpp.nix ./modules/kpp.nix
./modules/ldap
# ./modules/keycloak.nix replaced by portunus # ./modules/keycloak.nix replaced by portunus
./modules/mail.nix ./modules/mail.nix
./modules/mailman.nix ./modules/mailman.nix
@ -71,7 +71,7 @@
./hosts/quitte/configuration.nix ./hosts/quitte/configuration.nix
./modules/options.nix ./modules/options.nix
./modules/base.nix ./modules/base.nix
./modules/ldap.nix ./modules/ldap
# ./modules/keycloak.nix replaced by portunus # ./modules/keycloak.nix replaced by portunus
./modules/nginx.nix ./modules/nginx.nix
./modules/mail.nix ./modules/mail.nix

View file

@ -0,0 +1,25 @@
From f5c68898be345fb0dca5ab7b596b9cbe674f5dfb Mon Sep 17 00:00:00 2001
From: Rouven Seifert <rouven@rfive.de>
Date: Tue, 4 Jul 2023 15:14:00 +0200
Subject: [PATCH] update user validation regex
---
internal/core/validation.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/internal/core/validation.go b/internal/core/validation.go
index 3e168b5..10dfc0a 100644
--- a/internal/core/validation.go
+++ b/internal/core/validation.go
@@ -30,7 +30,7 @@ import (
)
//this regexp copied from useradd(8) manpage
-const posixAccountNamePattern = `[a-z_][a-z0-9_-]*\$?`
+const posixAccountNamePattern = `[a-z_][a-z0-9._-]*\$?`
var (
errIsMissing = errors.New("is missing")
--
2.41.0

View file

@ -48,6 +48,9 @@ in
services.portunus = { services.portunus = {
enable = true; enable = true;
package = pkgs.portunus.overrideAttrs (old: {
patches = [ ./0001-update-user-validation-regex.patch ];
});
user = "${portunusUser}"; user = "${portunusUser}";
group = "${portunusGroup}"; group = "${portunusGroup}";
domain = "${domain}"; domain = "${domain}";
@ -65,7 +68,7 @@ in
#tls = true; #tls = true;
}; };
seedPath = ../config/portunus_seeds.json; seedPath = ../../config/portunus_seeds.json;
}; };
#users.ldap = { #users.ldap = {
@ -123,18 +126,4 @@ in
}; };
}; };
}; };
# nixpkgs.overlays = [
# (self: super:
# {
# portunus = super.portunus.overrideAttrs (old: {
# src = super.fetchFromGitHub {
# owner = "revol-xut";
# repo = "portunus";
# rev = "4dc29febacb11c613785bc95352fa00e0ca9b14a";
# sha256 = "sha256-6O2392aHXhgvgZf6ftDY5Bh6hG3OzzCnlriig/Vkkz8=";
# };
# });
# })
# ];
} }

View file

@ -39,7 +39,7 @@ in
domain = "${domain}"; domain = "${domain}";
origin = "${domain}"; origin = "${domain}";
destination = [ "${hostname}" "${domain}" "localhost" ]; destination = [ "${hostname}" "${domain}" "localhost" ];
networks = [ "127.0.0.1" "141.30.30.169" ]; networksStyle = "host"; # localhost and own public IP
sslCert = "/var/lib/acme/${hostname}/fullchain.pem"; sslCert = "/var/lib/acme/${hostname}/fullchain.pem";
sslKey = "/var/lib/acme/${hostname}/key.pem"; sslKey = "/var/lib/acme/${hostname}/key.pem";
relayDomains = [ "hash:/var/lib/mailman/data/postfix_domains" ]; relayDomains = [ "hash:/var/lib/mailman/data/postfix_domains" ];
@ -61,9 +61,13 @@ in
dumper: root dumper: root
operator: root operator: root
abuse: postmaster abuse: postmaster
postmaster: root
# trap decode to catch security attacks # trap decode to catch security attacks
decode: root decode: root
# yeet into the void
noreply: /dev/null
''; '';
config = { config = {
home_mailbox = "Maildir/"; home_mailbox = "Maildir/";
@ -98,6 +102,7 @@ in
]; ];
# smtpd_sender_login_maps = [ "ldap:${ldap-senders}" ]; # smtpd_sender_login_maps = [ "ldap:${ldap-senders}" ];
alias_maps = [ "hash:/etc/aliases" ]; alias_maps = [ "hash:/etc/aliases" ];
alias_database = [ "hash:/etc/aliases" ];
# alias_maps = [ "hash:/etc/aliases" "ldap:${ldap-aliases}" ]; # alias_maps = [ "hash:/etc/aliases" "ldap:${ldap-aliases}" ];
smtpd_milters = [ "local:/run/opendkim/opendkim.sock" ]; smtpd_milters = [ "local:/run/opendkim/opendkim.sock" ];
non_smtpd_milters = [ "local:/var/run/opendkim/opendkim.sock" ]; non_smtpd_milters = [ "local:/var/run/opendkim/opendkim.sock" ];
@ -105,10 +110,10 @@ in
smtpd_sasl_path = "/var/lib/postfix/auth"; smtpd_sasl_path = "/var/lib/postfix/auth";
smtpd_sasl_type = "dovecot"; smtpd_sasl_type = "dovecot";
#mailman stuff #mailman stuff
local_transport = "lmtp:unix:/run/dovecot2/dovecot-lmtp"; mailbox_transport = "lmtp:unix:/run/dovecot2/dovecot-lmtp";
transport_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ]; transport_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" ];
local_recipient_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" "ldap:${config.sops.secrets."postfix_ldap_aliases".path}" ]; local_recipient_maps = [ "hash:/var/lib/mailman/data/postfix_lmtp" "ldap:${config.sops.secrets."postfix_ldap_aliases".path}" "$alias_maps" ];
}; };
}; };
dovecot2 = { dovecot2 = {
@ -172,7 +177,6 @@ in
inet_listener sieve { inet_listener sieve {
port = 4190 port = 4190
} }
service_count = 1 service_count = 1
} }
service lmtp { service lmtp {

View file

@ -15,7 +15,7 @@ mediawiki:
postgres: ENC[AES256_GCM,data:XRfUc2PRMJcoILAnm5MWr2Cg5u4e/IhGMUnz/oIQSzY=,iv:8U+qlD1SQzxUyD/6QK4SdwRCDyMODK/lP0IDrLlcQ4U=,tag:2spNMj9dY2wWilOusq24yQ==,type:str] postgres: ENC[AES256_GCM,data:XRfUc2PRMJcoILAnm5MWr2Cg5u4e/IhGMUnz/oIQSzY=,iv:8U+qlD1SQzxUyD/6QK4SdwRCDyMODK/lP0IDrLlcQ4U=,tag:2spNMj9dY2wWilOusq24yQ==,type:str]
initial_admin: ENC[AES256_GCM,data:iET5rz9rygx49NDBjKwqAlRgpeS+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Vkqu9nDc1ws2NxkMKrHPZ13i3jqDkk4Y0kejw=,tag:BjhmPc4lSbsZBmZ/q2CqGg==,type:str] mautrix-telegram_env: ENC[AES256_GCM,data:2p5vYV+/vEDrrZItTcT1vxddv2tM7dLGBUmG+OXHccTzJ2UhyYpDGgUMr5KgObxvyssYBZTsvbV7QFN3sjcU/jVPx1qEUn6zyKO0HBQjrviVU3urx5zNOnCEHwDKyDrZ1Hu/CE6lpGNrtGlpewgOs/+84JZIZhC9qSuzDhN38sr4OGfMr29fMzafYC+TGHoZyA64GI9xz0KvXhwg6ci1hLtVWYEOFW2Nf8uLY8qkNLuDzA6bYx8rn3CEXoxiv0n4,iv:jmcWTyVkqu9nDc1ws2NxkMKrHPZ13i3jqDkk4Y0kejw=,tag:BjhmPc4lSbsZBmZ/q2CqGg==,type:str]
sops: sops:
kms: [] kms: []
@ -32,8 +32,8 @@ sops:
NEJBTHE2end1RDlHRTNFYlZjTjhib2cKmQRHpBKZ2DbQ5CfOwcSPfZAm9fnnpxUk NEJBTHE2end1RDlHRTNFYlZjTjhib2cKmQRHpBKZ2DbQ5CfOwcSPfZAm9fnnpxUk
+LcR8haK//O3N2uNf9etDW3VsT5ipPucCdFU1m/v9L5tcN6ZP8WP+w== +LcR8haK//O3N2uNf9etDW3VsT5ipPucCdFU1m/v9L5tcN6ZP8WP+w==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2023-07-04T07:41:45Z" lastmodified: "2023-07-07T08:54:55Z"
mac: ENC[AES256_GCM,data:YLC02dhSSLl9C1B7wo/AJcY4a4zc1LIaA0PKH0H8uZ8I9Kh105yk4sc2cz15FVMLtkMeIdfnhmWxbnPyLbM0mA9bAYT9MQn65quEgDumr+XH0UW6m1e2S23/2fxTFH1xRWsu7/Kon/gdzLb5hf2m30eJAP7MrdpxDz28Q7ut1P4=,iv:9UC71WxpDt1bxWSu16Sc+OKpy6KmX0Ru+Q54LYuQCBU=,tag:CpNKSJem+XHimm+yzRpwaw==,type:str] mac: ENC[AES256_GCM,data:JlITbCiRVYkS9wWLxAOX3ZUtgtmBFiS4JeNt+3/prTScPVC3cqhZPx6UWfPh8hzS1NZGSJEy9J2roWm1DEZnj73cRmjwROAx/RiiGXJIkfxgUik4HFleIpKuOJ31Jkvl7m+YaEcgNail+KakKSy7H3Jf21Qu08fLGrN3kwt+JUA=,iv:GtuJrjnId9aU5f9o5hGYMNBN5FRB1OSLWCp9zFimhzA=,tag:RTL70JdR4C0UhXnMH01LPQ==,type:str]
pgp: pgp:
- created_at: "2023-04-23T17:48:54Z" - created_at: "2023-04-23T17:48:54Z"
enc: | enc: |