feat(vesuvio): add acme certificates
This commit is contained in:
parent
00c926e45b
commit
50a4954704
2 changed files with 37 additions and 3 deletions
25
systems/vesuvio/certificates.nix
Normal file
25
systems/vesuvio/certificates.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ 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" ];
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./certificates.nix
|
||||
./frp.nix
|
||||
./hetzner.nix
|
||||
];
|
||||
|
@ -10,8 +11,16 @@
|
|||
traceroute
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
ports = [ 4269 ];
|
||||
openFirewall = true;
|
||||
services = {
|
||||
nginx.enable = true;
|
||||
openssh = {
|
||||
ports = [ 4269 ];
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue