Fix dkim public key for froidmont.org

This commit is contained in:
Paul-Henri Froidmont 2021-09-02 16:11:58 +02:00
parent 807fade22b
commit df9573573c
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
5 changed files with 193 additions and 175 deletions

1
.gitignore vendored
View file

@ -9,3 +9,4 @@ terraform.tfstate.backup
.tmp .tmp
terraform.tfvars terraform.tfvars
.direnv .direnv
.vscode

7
dns.tf
View file

@ -1,6 +1,5 @@
locals { locals {
dmarc_value = "\"v=DMARC1; p=none; rua=mailto:failed-dmarc@banditlair.com; ruf=mailto:dmarc@banditlair.com\"" dmarc_value = "\"v=DMARC1; p=none; rua=mailto:failed-dmarc@banditlair.com; ruf=mailto:dmarc@banditlair.com\""
dkim_value = "\"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwDEwt+a0neFlyq7ndCj0EECUp4bsusFpL2aVzroLY5Xw9S//dYuXUp1sr/yiivS71WyNjt7tOpuonu0gGEWpc6RPyeZrzXQg+zY1k/1+cLXFMz5HmJJaAbNxK02Qn89qfk/Y3pbuJt6Y/NBQ4KVOCZQB2hCT2izVSWSkhegYTCwIDAQAB\""
} }
data "hetznerdns_zone" "banditlair_zone" { data "hetznerdns_zone" "banditlair_zone" {
@ -100,7 +99,7 @@ resource "hetznerdns_record" "dmarc_report_falbo_txt" {
resource "hetznerdns_record" "dkim_txt" { resource "hetznerdns_record" "dkim_txt" {
zone_id = data.hetznerdns_zone.banditlair_zone.id zone_id = data.hetznerdns_zone.banditlair_zone.id
name = "dkim._domainkey" name = "dkim._domainkey"
value = local.dkim_value value = "\"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwDEwt+a0neFlyq7ndCj0EECUp4bsusFpL2aVzroLY5Xw9S//dYuXUp1sr/yiivS71WyNjt7tOpuonu0gGEWpc6RPyeZrzXQg+zY1k/1+cLXFMz5HmJJaAbNxK02Qn89qfk/Y3pbuJt6Y/NBQ4KVOCZQB2hCT2izVSWSkhegYTCwIDAQAB\""
type = "TXT" type = "TXT"
ttl = 600 ttl = 600
} }
@ -160,7 +159,7 @@ resource "hetznerdns_record" "falbo_dmarc_txt" {
resource "hetznerdns_record" "falbo_dkim_txt" { resource "hetznerdns_record" "falbo_dkim_txt" {
zone_id = data.hetznerdns_zone.falbo_zone.id zone_id = data.hetznerdns_zone.falbo_zone.id
name = "dkim._domainkey" name = "dkim._domainkey"
value = local.dkim_value value = "\"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDWJwmQoiaxKCp6Cj+rELeHicd7VD1l/Q5KKQURgt1wIAY36bwbFYeuN/+ULruJzbnoyJ63G2QttO4H6MLdVTgNRjTuixmoE5mZEAE/7BlyAfDS0MLUXyGbxD6WtGZPT6PQ1cxWp9jVvYUs/NypcRfpDu0J9IXX6+coQM5CMLLdRwIDAQAB\""
type = "TXT" type = "TXT"
ttl = 600 ttl = 600
} }
@ -220,7 +219,7 @@ resource "hetznerdns_record" "froidmont_dmarc_txt" {
resource "hetznerdns_record" "froidmont_dkim_txt" { resource "hetznerdns_record" "froidmont_dkim_txt" {
zone_id = data.hetznerdns_zone.froidmont_zone.id zone_id = data.hetznerdns_zone.froidmont_zone.id
name = "dkim._domainkey" name = "dkim._domainkey"
value = local.dkim_value value = "\"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDlBZhkvPboheAWQtlWZCJpxIsjLvMOjn9TUHpyNz/tATA4/I6m21YlXreyHVoLLkaGOS/jXx2dptU/l6C0Bu+HdhcyBqw3tOxnTwDzD07h58u1mM5L//k/F+YsD+onCWYehQpIzCeRGgNe1w4QN11im4VVoNznFPzwMLIeepbg/QIDAQAB\""
type = "TXT" type = "TXT"
ttl = 600 ttl = 600
} }

12
flake.lock generated
View file

@ -2,16 +2,16 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1626395775, "lastModified": 1630248577,
"narHash": "sha256-7Uo+4PIQGirfd7WfFuRuspLCyDT7eUn6pnJx/CL9UC8=", "narHash": "sha256-9d/yq96TTrnF7qjA6wPYk+rYjWAXwfUmwk3qewezSeg=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a165aeceda9f9741d15bc2488425daeb06c0707e", "rev": "8d8a28b47b7c41aeb4ad01a2bd8b7d26986c3512",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-21.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -1,5 +1,5 @@
{ {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }: outputs = { self, nixpkgs }:
let let
@ -17,7 +17,8 @@
devShell.x86_64-linux = pkgs.mkShell { devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
nixpkgs-fmt nixpkgs-fmt
terraform_0_14 terraform
terraform-ls
sops sops
]; ];
}; };
@ -28,7 +29,9 @@
modules = common.modules ++ [ modules = common.modules ++ [
./modules/postgresql.nix ./modules/postgresql.nix
./modules/custom-backup-job.nix ./modules/custom-backup-job.nix
({ ./modules/custom-backup-job.nix
(
{
networking.hostName = "db1"; networking.hostName = "db1";
networking.domain = "banditlair.com"; networking.domain = "banditlair.com";
networking.firewall.interfaces."enp7s0".allowedTCPPorts = [ 5432 ]; networking.firewall.interfaces."enp7s0".allowedTCPPorts = [ 5432 ];
@ -40,7 +43,9 @@
''; '';
startAt = "03:00"; startAt = "03:00";
}; };
}) system.stateVersion = "21.05";
}
)
]; ];
}; };
backend1 = nixpkgs.lib.nixosSystem { backend1 = nixpkgs.lib.nixosSystem {
@ -51,7 +56,8 @@
./modules/synapse.nix ./modules/synapse.nix
./modules/nextcloud.nix ./modules/nextcloud.nix
./modules/custom-backup-job.nix ./modules/custom-backup-job.nix
({ (
{
networking.hostName = "backend1"; networking.hostName = "backend1";
networking.domain = "banditlair.com"; networking.domain = "banditlair.com";
networking.localCommands = "ip addr add 95.216.177.3/32 dev enp1s0"; networking.localCommands = "ip addr add 95.216.177.3/32 dev enp1s0";
@ -63,7 +69,9 @@
additionalPreHook = "cp /var/lib/murmur/murmur.sqlite /nix/var/data/murmur/murmur.sqlite"; additionalPreHook = "cp /var/lib/murmur/murmur.sqlite /nix/var/data/murmur/murmur.sqlite";
startAt = "03:30"; startAt = "03:30";
}; };
}) system.stateVersion = "21.05";
}
)
]; ];
}; };
}; };

10
shell.nix Normal file
View file

@ -0,0 +1,10 @@
(
import (
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
}
) {
src = ./.;
}
).shellNix