summaryrefslogtreecommitdiffstats
path: root/krebs/1systems/puyak
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-11-24 22:11:59 +0100
committermakefu <github@syntax-fehler.de>2020-11-24 22:11:59 +0100
commit41865fe25f356b46b8a56629ab60e2c3af125ae8 (patch)
treea82b5c1253ed4df6e52e72a30d30fd4a919facba /krebs/1systems/puyak
parent3417a4f8908ec157c0d6a10af0a0b053f231376c (diff)
puyak.r: separate config in net.nix
Diffstat (limited to 'krebs/1systems/puyak')
-rw-r--r--krebs/1systems/puyak/config.nix6
-rw-r--r--krebs/1systems/puyak/net.nix23
2 files changed, 24 insertions, 5 deletions
diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix
index 9ee61c6f8..2bfe061f5 100644
--- a/krebs/1systems/puyak/config.nix
+++ b/krebs/1systems/puyak/config.nix
@@ -2,6 +2,7 @@
{
imports = [
+ ./net.nix
<stockholm/krebs>
<stockholm/krebs/2configs>
<stockholm/krebs/2configs/secret-passwords.nix>
@@ -163,10 +164,6 @@
services.logind.lidSwitchExternalPower = "ignore";
- services.udev.extraRules = ''
- SUBSYSTEM=="net", ATTR{address}=="8c:70:5a:b2:84:58", NAME="wl0"
- SUBSYSTEM=="net", ATTR{address}=="3c:97:0e:07:b9:14", NAME="et0"
- '';
environment.systemPackages = [ pkgs.zsh ];
@@ -179,5 +176,4 @@
isNormalUser = true;
shell = "/run/current-system/sw/bin/zsh";
};
- networking.firewall.allowedTCPPorts = [ 5901 ];
}
diff --git a/krebs/1systems/puyak/net.nix b/krebs/1systems/puyak/net.nix
new file mode 100644
index 000000000..4cb8d247c
--- /dev/null
+++ b/krebs/1systems/puyak/net.nix
@@ -0,0 +1,23 @@
+let
+ ext-if = "enp0s25";
+ shack-ip = "10.42.22.184";
+ shack-gw = "10.42.20.1";
+in {
+ services.udev.extraRules = ''
+ SUBSYSTEM=="net", ATTR{address}=="8c:70:5a:b2:84:58", NAME="wl0"
+ SUBSYSTEM=="net", ATTR{address}=="3c:97:0e:07:b9:14", NAME="et0"
+ '';
+ networking = {
+ firewall.enable = false;
+ firewall.allowedTCPPorts = [ 8088 8086 8083 5901 ];
+ interfaces."${ext-if}".ipv4.addresses = [
+ {
+ address = shack-ip;
+ prefixLength = 20;
+ }
+ ];
+
+ defaultGateway = shack-gw;
+ nameservers = [ "10.42.0.100" "10.42.0.200" ];
+ };
+}