initial commit
This commit is contained in:
commit
95085a0d24
16 changed files with 294 additions and 0 deletions
13
hosts/physique/hyponix/services/default.nix
Normal file
13
hosts/physique/hyponix/services/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fail2ban.nix
|
||||
./forgejo.nix
|
||||
];
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
}
|
||||
8
hosts/physique/hyponix/services/fail2ban.nix
Normal file
8
hosts/physique/hyponix/services/fail2ban.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.openssh.settings.LogLevel = "VERBOSE";
|
||||
}
|
||||
22
hosts/physique/hyponix/services/forgejo.nix
Normal file
22
hosts/physique/hyponix/services/forgejo.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{config, ...}:
|
||||
let
|
||||
domain = "git.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = domain;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services.caddy.virtualHosts."git.${config.networking.domain}" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue