Move forgejo to hetznix
This commit is contained in:
parent
1156a9af04
commit
d50f92ca1b
14 changed files with 120 additions and 99 deletions
|
@ -15,9 +15,17 @@
|
|||
./secrets.nix
|
||||
./security
|
||||
./services
|
||||
|
||||
../../users/opdavies
|
||||
];
|
||||
|
||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs-2405}" ];
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
trusted-users = root opdavies
|
||||
'';
|
||||
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs-2405}" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
# TODO Refactor to use a wildcard certificate.
|
||||
"2020.oliverdavies.uk"
|
||||
"bootstrap-with-tailwind.oliverdavies.uk"
|
||||
"code.oliverdavies.uk"
|
||||
"florida-drupalcamp-tailwind-css.oliverdavies.uk"
|
||||
"luke.oliverdavies.uk"
|
||||
"phpsw-sculpin-demo.oliverdavies.uk"
|
||||
|
|
|
@ -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