Compare commits

..

No commits in common. "3f5c5c8d1b57ce4497a8826581c6c5c43f00d172" and "60642a9ba75b3d8cff79c72980559e9ea273dfee" have entirely different histories.

3 changed files with 3 additions and 72 deletions

View file

@ -1,25 +0,0 @@
{ config, ... }:
{
security.acme = {
acceptTerms = true;
defaults = {
email = "acme@uku.moe";
webroot = "/var/lib/acme/acme-challenge";
};
};
services.nginx.virtualHosts = {
"acme.uku3lig.net" = {
serverAliases = [
"*.uku3lig.net"
"*.uku.moe"
];
locations."/.well-known/acme-challenge".root = config.security.acme.defaults.webroot;
};
};
# /var/lib/acme/acme-challenge must be writable by the ACME user and readable by the Nginx user.
# The easiest way to achieve this is to add the Nginx user to the ACME group.
users.users.nginx.extraGroups = [ "acme" ];
}

View file

@ -1,7 +1,6 @@
{ pkgs, ... }:
{
imports = [
./certificates.nix
./frp.nix
./hetzner.nix
];
@ -11,16 +10,8 @@
traceroute
];
services = {
nginx.enable = true;
openssh = {
services.openssh = {
ports = [ 4269 ];
openFirewall = true;
};
};
networking.firewall.allowedTCPPorts = [
80
443
];
}

View file

@ -1,35 +0,0 @@
{ config, ... }:
let
certName = "mail.c.uku3lig.net";
certLocation = config.security.acme.certs.${certName}.directory;
in
{
security.acme.certs.${certName} = {
group = config.services.maddy.group;
extraLegoRenewFlags = [ "--reuse-key" ]; # soopyc said its more secure
};
services.maddy = {
enable = true;
hostname = "mx1.uku3lig.net";
primaryDomain = "uku3lig.net";
localDomains = [
"$(primary_domain)"
"uku.moe"
];
tls = {
loader = "file";
certificates = [
{
certPath = "${certLocation}/fullchain.pem";
keyPath = "${certLocation}/key.pem";
}
];
};
config = ''
'';
};
}