fix: a mess of ports
This commit is contained in:
parent
b00d1519ac
commit
9004fd3933
2 changed files with 14 additions and 5 deletions
|
|
@ -12,13 +12,14 @@
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
ports = [ 4200 ];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 4200 ];
|
||||||
|
|
||||||
users.users.lew = {
|
users.users.lew = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
|
||||||
|
|
@ -12,26 +12,34 @@ in
|
||||||
services.caddy.virtualHosts."git.ily.rs" = {
|
services.caddy.virtualHosts."git.ily.rs" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
reverse_proxy localhost:${toString srv.HTTP_PORT}
|
reverse_proxy localhost:${toString srv.HTTP_PORT}
|
||||||
|
encode zstd gzip
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
database.type = "sqlite3";
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
DOMAIN = "git.ily.rs";
|
DOMAIN = "git.ily.rs";
|
||||||
ROOT_URL = "https://git.ily.rs/";
|
ROOT_URL = "https://git.ily.rs/";
|
||||||
HTTP_PORT = 3000;
|
HTTP_PORT = 3000;
|
||||||
|
SSH_DOMAIN = "git.ily.rs";
|
||||||
START_SSH_SERVER = true;
|
START_SSH_SERVER = true;
|
||||||
SSH_PORT = 2222;
|
SSH_PORT = 4201;
|
||||||
SSH_LISTEN_PORT = 2222;
|
SSH_LISTEN_PORT = 4201;
|
||||||
|
DISABLE_HTTP_GIT = true;
|
||||||
|
};
|
||||||
|
service = {
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
REQUIRE_SIGNIN_VIEW = false;
|
||||||
};
|
};
|
||||||
service.DISABLE_REGISTRATION = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 2222 ];
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 4201 ];
|
||||||
|
|
||||||
systemd.services.forgejo.preStart = let
|
systemd.services.forgejo.preStart = let
|
||||||
adminCmd = "${lib.getExe cfg.package} admin user";
|
adminCmd = "${lib.getExe cfg.package} admin user";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue