From d7fa0b014f0f06670e6928129278de6ad7b5646a Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 26 Mar 2020 13:05:12 +0300 Subject: [PATCH] Update modules/default.nix modules/gitea.nix modules/nginx.nix --- modules/default.nix | 1 + modules/gitea.nix | 12 ++++++++++++ modules/nginx.nix | 10 ++-------- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 modules/gitea.nix diff --git a/modules/default.nix b/modules/default.nix index 8562075..0a6ef49 100755 --- a/modules/default.nix +++ b/modules/default.nix @@ -42,5 +42,6 @@ device: ./workspace/kanshi.nix ./openvpn.nix ./nginx.nix + ./gitea.nix ]; } diff --git a/modules/gitea.nix b/modules/gitea.nix new file mode 100644 index 0000000..15c209d --- /dev/null +++ b/modules/gitea.nix @@ -0,0 +1,12 @@ +{ pkgs, config, lib, ... }: +{ + services.gitea = { + enable = true; + appName = "code.balsoft.ru"; + cookieSecure = true; + rootUrl = "https://code.balsoft.ru"; + domain = "code.balsoft.ru"; + httpPort = 6000; + # disableRegistration = true; + }; +} diff --git a/modules/nginx.nix b/modules/nginx.nix index f2da86b..ac8dbd6 100644 --- a/modules/nginx.nix +++ b/modules/nginx.nix @@ -16,14 +16,8 @@ enableACME = true; addSSL = true; }; - "corona.balsoft.ru" = { - locations."/" = { - root = "/var/lib/corona"; - index = "index.html"; - extraConfig = '' - add_header 'Access-Control-Allow-Origin' '*'; - ''; - }; + "code.balsoft.ru" = { + locations."/" = { proxyPass = "http://localhost:6000"; }; } // default; "cache.balsoft.ru" = { locations."/" = { proxyPass = "http://localhost:5000"; };