diff --git a/machines/agentjones.nix b/machines/agentjones.nix index 7af9c23..60b38af 100644 --- a/machines/agentjones.nix +++ b/machines/agentjones.nix @@ -1,25 +1,50 @@ -{ pkgs, lib, nodes, ... }: { +{ pkgs, lib, nodes, ... }: +let + # ip = "193.1.99.72"; + ip = "192.168.1.157"; + ip_priv = "172.20.20.1"; + # hostname = "agentjones.skynet.ie"; + hostname = "192.168.1.157"; + +in { imports = [ # applications for this particular server ../applications/firewall.nix ]; deployment = { - #targetHost = "agentjones.skynet.ie"; - # wont have dns to start with - #targetHost = "193.1.99.72"; - targetHost = "192.168.1.157"; + targetHost = hostname; targetPort = 22; targetUser = "root"; }; + # this has to be defined for any physical servers + # vms are defined by teh vm host + networking.interfaces = { + eth0 = { + ipv4.addresses = [ + { + address = "${ip}/32"; + prefixLength = 24; + } + ]; + }; + priv0 = { + ipv4.addresses = [ + { + address = "${ip_priv}/32"; + prefixLength = 24; + } + ]; + }; + }; + # this server is teh firewall skynet_firewall = { # always good to know oneself own = { - #ip = "193.1.99.72"; - ip = "192.168.1.157"; + ip = ip; ports = { tcp = [