From 37c19421d91b27a184dcd85abb2b4422f1b47555 Mon Sep 17 00:00:00 2001 From: 514fpv Date: Sun, 18 Feb 2024 18:41:27 +0800 Subject: [PATCH] refactor(eientei): move hass nginx configuration --- spec/eientei/hass.nix | 14 +++++++++++++- spec/eientei/nginx.nix | 12 ------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spec/eientei/hass.nix b/spec/eientei/hass.nix index cbad0c79..210d6755 100644 --- a/spec/eientei/hass.nix +++ b/spec/eientei/hass.nix @@ -19,7 +19,19 @@ ]; }; - nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" ]; + services.nginx.virtualHosts."home.514fpv.io" = { + useACMEHost = ".514fpv.io"; + addSSL = true; + extraConfig = '' + proxy_buffering off; + ''; + locations."/" = { + proxyPass = "http://127.0.0.1:8123"; + proxyWebsockets = true; + }; + }; global.fs.zfs.mountpoints."/nix/persist/service/hass" = "service/hass"; + + nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" ]; } diff --git a/spec/eientei/nginx.nix b/spec/eientei/nginx.nix index facdc9ba..a83b542e 100644 --- a/spec/eientei/nginx.nix +++ b/spec/eientei/nginx.nix @@ -17,18 +17,6 @@ useACMEHost = ".514fpv.io"; extraConfig = "return 444;"; }; - - "home.514fpv.io" = { - useACMEHost = ".514fpv.io"; - addSSL = true; - extraConfig = '' - proxy_buffering off; - ''; - locations."/" = { - proxyPass = "http://127.0.0.1:8123"; - proxyWebsockets = true; - }; - }; }; };