forked from Zynh0722/permafrost
nginx: use acme certs
This commit is contained in:
parent
0a6f5ef0e3
commit
44251ccf66
3 changed files with 9 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
let
|
||||
cfg = config.permafrost.nyazoom;
|
||||
ACMEEnabled = config.nginx.enableACME;
|
||||
in
|
||||
{
|
||||
options.permafrost.nyazoom = {
|
||||
|
@ -10,10 +11,11 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
permafrost.nginx.enable = lib.mkDefault true;
|
||||
permafrost.nginx.certDomains = [ "git.zynh.me" ];
|
||||
permafrost.nginx.certDomains = lib.mkIf ACMEEnabled [ "git.zynh.me" ];
|
||||
services.nginx.virtualHosts."git.zynh.me" = {
|
||||
addSSL = true;
|
||||
serverName = "git.zynh.me";
|
||||
useACMEHost = lib.mkIf ACMEEnabled "scarlet.zynh.me";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3032";
|
||||
};
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
let
|
||||
cfg = config.permafrost.foundry;
|
||||
ACMEEnabled = config.nginx.enableACME;
|
||||
in
|
||||
{
|
||||
options.permafrost.foundry = {
|
||||
|
@ -10,10 +11,11 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
permafrost.nginx.enable = lib.mkDefault true;
|
||||
permafrost.nginx.certDomains = [ "scarlet.zynh.me" ];
|
||||
permafrost.nginx.certDomains = lib.mkIf ACMEEnabled [ "scarlet.zynh.me" ];
|
||||
services.nginx.virtualHosts."scarlet.zynh.me" = {
|
||||
addSSL = true;
|
||||
serverName = "scarlet.zynh.me";
|
||||
useACMEHost = lib.mkIf ACMEEnabled "scarlet.zynh.me";
|
||||
locations."/" = {
|
||||
extraConfig = /* nginx */ ''
|
||||
# Set proxy headers
|
||||
|
|
|
@ -4,6 +4,7 @@ let
|
|||
nyazoom = inputs.nyazoom.packages.${pkgs.system}.default;
|
||||
|
||||
cfg = config.permafrost.nyazoom;
|
||||
ACMEEnabled = config.nginx.enableACME;
|
||||
in
|
||||
{
|
||||
options.permafrost.nyazoom = {
|
||||
|
@ -22,10 +23,11 @@ in
|
|||
};
|
||||
|
||||
permafrost.nginx.enable = lib.mkDefault true;
|
||||
permafrost.nginx.certDomains = [ "nyazoom.zynh.me" ];
|
||||
permafrost.nginx.certDomains = lib.mkIf ACMEEnabled [ "nyazoom.zynh.me" ];
|
||||
services.nginx.virtualHosts."nyazoom.zynh.me" = {
|
||||
addSSL = true;
|
||||
serverName = "nyazoom.zynh.me";
|
||||
useACMEHost = lib.mkIf ACMEEnabled "scarlet.zynh.me";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3000";
|
||||
extraConfig = /* nginx */ ''
|
||||
|
|
Loading…
Reference in a new issue