diff --git a/hosts/dlaptop/sops.nix b/hosts/dlaptop/sops.nix index 5f0b843..8d17a20 100644 --- a/hosts/dlaptop/sops.nix +++ b/hosts/dlaptop/sops.nix @@ -39,6 +39,25 @@ in group = "socks"; }; + + "nginx/graf1" = { }; + "nginx/graf2" = { }; + "nginx/kibana" = { }; + templates ={ + "nginx-graf1.conf"= { + content = '' proxy_pass ${config.sops.placeholder."nginx/graf1"}; ''; + mode = "0444"; + }; + "nginx-graf2.conf"= { + content = '' proxy_pass ${config.sops.placeholder."nginx/graf2"}; ''; + mode = "0444"; + }; + "nginx-kibana.conf"= { + content = '' proxy_pass ${config.sops.placeholder."nginx/kibana"}; ''; + mode = "0444"; + }; + }; + } // wifiSecrets; }; } \ No newline at end of file diff --git a/hosts/dlaptop/work.nix b/hosts/dlaptop/work.nix index 6edd841..2d1e522 100644 --- a/hosts/dlaptop/work.nix +++ b/hosts/dlaptop/work.nix @@ -33,11 +33,11 @@ let location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_pass http://123.123.123.123:3000; + include ${config.sops.templates."nginx-graf1.conf".path}; } location /api/live/ws { - proxy_pass http://123.123.123.123:3000; + include ${config.sops.templates."nginx-graf1.conf".path}; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -51,11 +51,11 @@ let location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_pass http://123.123.123.123:3000; + include ${config.sops.templates."nginx-graf2.conf".path}; } location /api/live/ws { - proxy_pass http://123.123.123.123:3000; + include ${config.sops.templates."nginx-graf2.conf".path}; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -69,7 +69,7 @@ let location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_pass http://123.123.123.123:5601; + include ${config.sops.templates."nginx-kibana.conf".path}; } } }