static ip

This commit is contained in:
root 2021-09-05 02:50:03 +02:00
parent 12464ce3b9
commit 0041e102d3
4 changed files with 19 additions and 4 deletions

View File

@ -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

View File

@ -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";
}

View File

@ -16,7 +16,7 @@
};
repositoryRoot = "/var/lib/gitea/repositories";
#disableRegistration = true;
disableRegistration = true;
lfs.enable = true;

15
modules/networking.nix Normal file
View File

@ -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 ];
};
}