Garbage collection v2 #47

Merged
rouven0 merged 2 commits from garbage into main 2023-07-07 12:20:12 +02:00
5 changed files with 81 additions and 37 deletions
Showing only changes of commit 2afef761ed - Show all commits

View file

@ -1,5 +1,25 @@
{
"nodes": {
"kpp": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1688479784,
"narHash": "sha256-xCI0Q8pQK5JRHYwieQApHmLseuXLiHnsYVlxUVKLCQA=",
"owner": "fsr",
"repo": "kpp",
"rev": "bf78c8481cbd1a43a122da90a63bbd0ed257b244",
"type": "github"
},
"original": {
"owner": "fsr",
"repo": "kpp",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1685004253,
@ -34,6 +54,7 @@
},
"root": {
"inputs": {
"kpp": "kpp",
"nixpkgs": "nixpkgs",
"sops-nix": "sops-nix"
}

View file

@ -3,8 +3,11 @@
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
sops-nix.url = github:Mic92/sops-nix;
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
kpp.url = "github:fsr/kpp";
kpp.inputs.nixpkgs.follows = "nixpkgs";
# fsr-infoscreen.url = github:fsr/infoscreen; # some anonymous strukturer accidentally removed the flake.nix
};
outputs = { self, nixpkgs, sops-nix, ... }@inputs:
outputs = { self, nixpkgs, sops-nix, kpp, ... }@inputs:
{
packages."x86_64-linux".quitte = self.nixosConfigurations.quitte-vm.config.system.build.vm;
packages."x86_64-linux".default = self.packages."x86_64-linux".quitte;
@ -15,10 +18,12 @@
system = "x86_64-linux";
modules = [
inputs.sops-nix.nixosModules.sops
inputs.kpp.nixosModules.default
./hosts/quitte/configuration.nix
./modules/options.nix
./modules/base.nix
./modules/sops.nix
./modules/kpp.nix
./modules/ldap
# ./modules/keycloak.nix replaced by portunus
./modules/mail.nix

15
modules/kpp.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, ... }:
let
domain = "kpp.${config.fsr.domain}";
in
{
services.kpp = {
enable = true;
hostName = domain;
};
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
};
}

View file

@ -39,7 +39,7 @@ in
domain = "${domain}";
origin = "${domain}";
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";
sslKey = "/var/lib/acme/${hostname}/key.pem";
relayDomains = [ "hash:/var/lib/mailman/data/postfix_domains" ];
@ -47,7 +47,6 @@ in
extraAliases = ''
# Taken from kaki, maybe we can throw out some at some point
# General redirections for pseudo accounts
postmaster: root
bin: root
daemon: root
named: root
@ -62,9 +61,13 @@ in
dumper: root
operator: root
abuse: postmaster
postmaster: root
# trap decode to catch security attacks
decode: root
# yeet into the void
noreply: /dev/null
'';
config = {
home_mailbox = "Maildir/";
@ -99,6 +102,7 @@ in
];
# smtpd_sender_login_maps = [ "ldap:${ldap-senders}" ];
alias_maps = [ "hash:/etc/aliases" ];
alias_database = [ "hash:/etc/aliases" ];
# alias_maps = [ "hash:/etc/aliases" "ldap:${ldap-aliases}" ];
smtpd_milters = [ "local:/run/opendkim/opendkim.sock" ];
non_smtpd_milters = [ "local:/var/run/opendkim/opendkim.sock" ];
@ -106,10 +110,10 @@ in
smtpd_sasl_path = "/var/lib/postfix/auth";
smtpd_sasl_type = "dovecot";
#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" ];
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 = {
@ -173,7 +177,6 @@ in
inet_listener sieve {
port = 4190
}
service_count = 1
}
service lmtp {

View file

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