Compare commits
No commits in common. "8c56beb84c9910d9a06769e5a4d35249dc13e711" and "46b71e40797fac0d13adc027e5b5baa53d10ec86" have entirely different histories.
8c56beb84c
...
46b71e4079
1 changed files with 24 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
constants,
|
||||
lib,
|
||||
...
|
||||
|
|
@ -15,10 +16,33 @@ in
|
|||
inputs.synix.nixosModules.nginx
|
||||
];
|
||||
|
||||
users.users.nginx.extraGroups = [ "tailscale" ];
|
||||
systemd.services.nginx.serviceConfig = {
|
||||
SupplementaryGroups = [ "tailscale" ];
|
||||
Requires = [ "tailscaled.service" ];
|
||||
After = [ "tailscaled.service" ];
|
||||
};
|
||||
|
||||
systemd.services."generate-tailscale-certs-${constants.hosts.sid.domain}" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
before = [ "nginx.service" ];
|
||||
after = [ "tailscaled.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${config.services.tailscale.package}/bin/tailscale cert ${constants.hosts.sid.domain}";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
forceSSL = ssl;
|
||||
virtualHosts."${constants.hosts.sid.domain}" = {
|
||||
sslCertificate = "/var/lib/tailscale/certs/${constants.hosts.sid.domain}.crt";
|
||||
sslCertificateKey = "/var/lib/tailscale/certs/${constants.hosts.sid.domain}.key";
|
||||
forceSSL = true;
|
||||
};
|
||||
virtualHosts."${constants.services.docs.fqdn}" = mkVirtualHost {
|
||||
inherit ssl;
|
||||
address = constants.hosts.rx4.ip;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue