diff options
| author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-09-04 16:19:07 +0200 |
|---|---|---|
| committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-07-31 01:46:16 +0200 |
| commit | f9cebb18b491a93ce4dc335b27ee82f90e5dab2d (patch) | |
| tree | 5b3dbe3113ba9c39030f6e7043dc8baef925f7d1 | |
| parent | bb6337251e6b1100a61f932677a54124672d4c97 (diff) | |
| download | vm-configurations-f9cebb18b491a93ce4dc335b27ee82f90e5dab2d.tar.gz vm-configurations-f9cebb18b491a93ce4dc335b27ee82f90e5dab2d.tar.bz2 vm-configurations-f9cebb18b491a93ce4dc335b27ee82f90e5dab2d.zip | |
Make IPv4 easily configurable
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
| -rw-r--r-- | ftp.replicant.us.scm | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ftp.replicant.us.scm b/ftp.replicant.us.scm index 459979a..a0cea58 100644 --- a/ftp.replicant.us.scm +++ b/ftp.replicant.us.scm @@ -12,8 +12,12 @@ ;; Variables specific to the vm ;; Change them when deploying this configuration in production (define %vm-domain-name "ftp.replicant.cyberdimension.org") -;; TODO: -;; - Define IPv4 and IPv6 configuration here +(define %ethernet-interface-name "eth0") +(define %ipv4-interface-address "192.168.10.43") +(define %ipv4-interface-netmask "255.255.255.0") +(define %ipv4-interface-gateway "192.168.10.1") +(define %ipv4-interface-dns1 "192.168.10.1") +(define %ipv4-interface-dns2 "192.168.10.1") ;; Hack to Add IPv6 support (write "Hack to Add static IPv6 support:") @@ -98,11 +102,16 @@ ;; In the mean time, we either need to switch to DHCP for testing and ;; get a public IPv6 address through that, or use some OpenVPN service ;; to get a public IPv4 address. - (static-networking-service "eth0" "192.168.10.43" - #:gateway "192.168.10.1" - #:netmask "255.255.255.0" - #:name-servers '("192.168.10.1" - "192.168.10.2")) + (static-networking-service %ethernet-interface-name + %ipv4-interface-address + #:gateway %ipv4-interface-gateway + #:netmask %ipv4-interface-netmask + #:name-servers `( + (unquote + %ipv4-interface-dns1) + (unquote + %ipv4-interface-dns2) + )) (service certbot-service-type (certbot-configuration |
