refactor
This commit is contained in:
1 parent
81e576a877
commit
cde67e4d75
46 files changed
+619
-518
No files matched your search
@@ -1,18 +1,24 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
service = config.facts.services.gitea;
|
||||
nixosModules = config.flake.modules.nixos;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.gitea = {
|
||||
imports = [
|
||||
nixosModules.caddy
|
||||
nixosModules.openssh
|
||||
];
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = service.domain;
|
||||
ROOT_URL = service.url;
|
||||
HTTP_PORT = service.port;
|
||||
HTTP_ADDR = service.host;
|
||||
ROOT_URL = "${service.origin}/";
|
||||
HTTP_PORT = 3001;
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
|
||||
START_SSH_SERVER = false;
|
||||
SSH_PORT = 22;
|
||||
@@ -24,7 +30,6 @@ in
|
||||
|
||||
services.openssh.settings.AllowUsers = [ "gitea" ];
|
||||
|
||||
services.caddy.virtualHosts.${service.domain}.extraConfig =
|
||||
"reverse_proxy :${toString service.port}";
|
||||
services.caddy.virtualHosts.${service.domain}.extraConfig = "reverse_proxy 127.0.0.1:3001";
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user