Compare commits
No commits in common. "85ec8e01fe8cfb935f7e9649dd7e228f2f5acfc7" and "1a817b5ac56bb13b350b6f28ce156083f655eb37" have entirely different histories.
85ec8e01fe
...
1a817b5ac5
4 changed files with 18 additions and 29 deletions
|
|
@ -38,7 +38,6 @@
|
||||||
owner = "matrix-synapse";
|
owner = "matrix-synapse";
|
||||||
};
|
};
|
||||||
ntfy-admin-hash.file = ./secrets/ntfy-admin-hash.age;
|
ntfy-admin-hash.file = ./secrets/ntfy-admin-hash.age;
|
||||||
webhook-secret.owner = "stalwart-mail";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
|
|
@ -147,8 +146,6 @@
|
||||||
services.jetpham-website = {
|
services.jetpham-website = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tor.enable = true;
|
tor.enable = true;
|
||||||
qaMailDomain = "jetpham.com";
|
|
||||||
qaReplyDomain = "jetpham.com";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow Tailscale traffic
|
# Allow Tailscale traffic
|
||||||
|
|
|
||||||
14
flake.lock
generated
14
flake.lock
generated
|
|
@ -470,11 +470,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774581174,
|
"lastModified": 1773803479,
|
||||||
"narHash": "sha256-258qgkMkYPkJ9qpIg63Wk8GoIbVjszkGGPU1wbVHYTk=",
|
"narHash": "sha256-GD6i1F2vrSxbsmbS92+8+x3DbHOJ+yrS78Pm4xigW4M=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "a313afc75b85fc77ac154bf0e62c36f68361fd0b",
|
"rev": "f17186f52e82ec5cf40920b58eac63b78692ac7c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -553,11 +553,11 @@
|
||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774581798,
|
"lastModified": 1774078882,
|
||||||
"narHash": "sha256-WimRZfiKOR8/yxxpmEx1kFP4IM/Ahq692fSvPLhxUek=",
|
"narHash": "sha256-0ABtMFWqKsESSX2E4Z+uY1VXCNb9PzZ/ke7HmpTkflE=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "38af26d959bf4934155d85f15345f0d83252dab9",
|
"rev": "ede986080a538eced16490e47c638398c2e4c49f",
|
||||||
"revCount": 48,
|
"revCount": 39,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.extremist.software/jet/website"
|
"url": "https://git.extremist.software/jet/website"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,18 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
caddyPkg = pkgs.callPackage "${pkgs.path}/pkgs/by-name/ca/caddy/package.nix" {
|
||||||
|
buildGo125Module = pkgs.buildGo126Module;
|
||||||
|
};
|
||||||
|
caddyWithPlugins = pkgs.callPackage "${pkgs.path}/pkgs/by-name/ca/caddy/plugins.nix" {
|
||||||
|
caddy = caddyPkg;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.caddy.withPlugins {
|
package = caddyWithPlugins {
|
||||||
plugins = [ "github.com/mholt/caddy-ratelimit@v0.1.0" ];
|
plugins = [ "github.com/mholt/caddy-ratelimit@v0.1.0" ];
|
||||||
hash = "sha256-Ko4kJJiBUGX/2x6O+Q0f7hrf6r7YkVCQPRV04Adgedw=";
|
hash = "sha256-Ko4kJJiBUGX/2x6O+Q0f7hrf6r7YkVCQPRV04Adgedw=";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -45,28 +45,11 @@
|
||||||
user = "admin";
|
user = "admin";
|
||||||
secret = "%{file:/run/agenix/stalwart-admin}%";
|
secret = "%{file:/run/agenix/stalwart-admin}%";
|
||||||
};
|
};
|
||||||
|
|
||||||
session.hook."qa-webhook" = {
|
|
||||||
enable = "contains(recipients, 'qa@jetpham.com')";
|
|
||||||
url = "http://127.0.0.1:3003/api/webhook";
|
|
||||||
stages = [ "data" ];
|
|
||||||
auth = {
|
|
||||||
username = "qa-webhook";
|
|
||||||
secret = "%{file:${config.age.secrets.webhook-secret.path}}%";
|
|
||||||
};
|
|
||||||
options = {
|
|
||||||
"tempfail-on-error" = true;
|
|
||||||
"max-response-size" = 1048576;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow Stalwart to read the ACME certificate procured for Caddy and the agenix secret
|
# Allow Stalwart to read the ACME certificate procured for Caddy and the agenix secret
|
||||||
systemd.services.stalwart.serviceConfig.SupplementaryGroups = [ "acme" ];
|
systemd.services.stalwart.serviceConfig.SupplementaryGroups = [ "acme" ];
|
||||||
systemd.services.stalwart.serviceConfig.ReadOnlyPaths = [
|
systemd.services.stalwart.serviceConfig.ReadOnlyPaths = [ "/run/agenix/stalwart-admin" ];
|
||||||
"/run/agenix/stalwart-admin"
|
|
||||||
config.age.secrets.webhook-secret.path
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue