Move forgejo to hetznix
This commit is contained in:
parent
1156a9af04
commit
d50f92ca1b
14 changed files with 120 additions and 99 deletions
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./acme.nix
|
||||
./caddy
|
||||
./forgejo.nix
|
||||
./openssl.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
28
nix/hosts/hetznix/services/forgejo.nix
Normal file
28
nix/hosts/hetznix/services/forgejo.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
forgejo = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "code.oliverdavies.uk";
|
||||
HTTP_PORT = 2223;
|
||||
};
|
||||
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
caddy.virtualHosts."${config.services.forgejo.settings.server.DOMAIN}" = {
|
||||
useACMEHost = "oliverdavies.uk";
|
||||
|
||||
extraConfig = "reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
|
||||
};
|
||||
|
||||
openssh.settings.AllowUsers = [ "forgejo" ];
|
||||
};
|
||||
}
|
10
nix/hosts/hetznix/services/openssl.nix
Normal file
10
nix/hosts/hetznix/services/openssl.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
AllowUsers = [ "opdavies" ];
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue