diff --git a/Migration.md b/Migration.md index 26afdfd..3c0ccd9 100644 --- a/Migration.md +++ b/Migration.md @@ -1,6 +1,6 @@ -## Migration from imbert to zentralwerk +## Migration from [imbert to zentralwerk](https://codimd.c3d2.de/inbert-2021) -[based on](https://docs.gitea.io/en-us/backup-and-restore/) +[based on https://docs.gitea.io/en-us/backup-and-restore/](https://docs.gitea.io/en-us/backup-and-restore/) @imbert: ```shell diff --git a/configuration.nix b/configuration.nix index b1a135b..2c0ae5e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -6,6 +6,7 @@ imports = [ ./modules/nix.nix + ./modules/networking.nix ./modules/gitea.nix ./modules/admin.nix @@ -13,6 +14,5 @@ ]; system.stateVersion = "21.11"; - networking.hostName = "gitea"; time.timeZone = "Europe/Berlin"; } diff --git a/modules/gitea.nix b/modules/gitea.nix index e874ca2..db41916 100644 --- a/modules/gitea.nix +++ b/modules/gitea.nix @@ -16,7 +16,7 @@ }; repositoryRoot = "/var/lib/gitea/repositories"; - #disableRegistration = true; + disableRegistration = true; lfs.enable = true; diff --git a/modules/networking.nix b/modules/networking.nix new file mode 100644 index 0000000..36e5ae0 --- /dev/null +++ b/modules/networking.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: + +{ + networking = { + hostName = "gitea"; + useDHCP = false; + interfaces.eth0 = { + useDHCP = false; + ipv4.addresses = [{ address = "172.20.73.53"; prefixLength = 26; }]; + }; + defaultGateway = "172.20.73.1"; + nameservers = [ "172.20.73.8" "9.9.9.9" ]; + firewall.allowedTCPPorts = [ 80 443 2222 ]; + }; +}