diff options
author | Ben Sima <ben@bsima.me> | 2019-10-27 09:48:52 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-10-27 12:14:40 -0700 |
commit | c790672cc244ac4caba1bda3572829a6c6862891 (patch) | |
tree | 2706bb8044f7b14840c5f90f215b79b433e81045 /com/simatime/networking.nix | |
parent | 44df4ba39f65c3afd84bee6b03f47d9b061e9038 (diff) |
move everything to namespace directories
Diffstat (limited to 'com/simatime/networking.nix')
-rw-r--r-- | com/simatime/networking.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/com/simatime/networking.nix b/com/simatime/networking.nix new file mode 100644 index 0000000..4cfd73d --- /dev/null +++ b/com/simatime/networking.nix @@ -0,0 +1,38 @@ +{ lib, ... }: { + networking = { + + hostName = "simatime"; + + firewall = { + allowedTCPPorts = [ 22 80 443 ]; + allowPing = true; + }; + + # This following was populated at runtime with the networking details + # gathered from the active system. + nameservers = [ + "67.207.67.2" + "67.207.67.3" + ]; + defaultGateway = "159.89.128.1"; + defaultGateway6 = ""; + dhcpcd.enable = false; + usePredictableInterfaceNames = lib.mkForce true; + interfaces = { + eth0 = { + ipv4.addresses = [ + { address="159.89.128.69"; prefixLength=20; } +{ address="10.46.0.6"; prefixLength=16; } + ]; + ipv6.addresses = [ + { address="fe80::e899:c0ff:fe9c:e194"; prefixLength=64; } + ]; + }; + + }; + }; + services.udev.extraRules = '' + ATTR{address}=="ea:99:c0:9c:e1:94", NAME="eth0" + + ''; +} |