fix: All machine have they own hardware
This commit is contained in:
parent
1637885001
commit
4070c37cc5
17 changed files with 286 additions and 103 deletions
|
|
@ -6,11 +6,11 @@ with lib;
|
|||
services.nginx.enable = true;
|
||||
|
||||
services.nginx.virtualHosts = mkMerge [
|
||||
(mkIf config.sVAULTWARDEN.enable {
|
||||
"${config.HostName}-vault" = {
|
||||
listen = [{ addr = "0.0.0.0"; port = config.sVAULTWARDEN.externalPort; }];
|
||||
(mkIf config.module.vaultwarden.enable {
|
||||
"${config.module.hostName}-vault" = {
|
||||
listen = [{ addr = "0.0.0.0"; port = config.module.vaultwarden.externalPort; }];
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.sVAULTWARDEN.internalPort}";
|
||||
proxyPass = "http://127.0.0.1:${toString config.module.vaultwarden.internalPort}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
|
@ -21,9 +21,9 @@ with lib;
|
|||
};
|
||||
})
|
||||
|
||||
(mkIf config.sROUNDCUBE.enable {
|
||||
"${config.HostName}-roundcube" = {
|
||||
listen = [{ addr = "0.0.0.0"; port = config.sROUNDCUBE.port; }];
|
||||
(mkIf config.module.roundcube.enable {
|
||||
"${config.module.hostName}-roundcube" = {
|
||||
listen = [{ addr = "0.0.0.0"; port = config.module.roundcube.port; }];
|
||||
root = "${pkgs.roundcube}/public_html";
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
|
|
@ -43,7 +43,7 @@ with lib;
|
|||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = concatLists [
|
||||
(if config.sVAULTWARDEN.enable then [ config.sVAULTWARDEN.externalPort ] else [])
|
||||
(if config.sROUNDCUBE.enable then [ config.sROUNDCUBE.port ] else [])
|
||||
(if config.module.vaultwarden.enable then [ config.module.vaultwarden.externalPort ] else [])
|
||||
(if config.module.roundcube.enable then [ config.module.roundcube.port ] else [])
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue