feat: better handling if ip and networking
This commit is contained in:
parent
c2e4fde98d
commit
3d2efa3b8a
1 changed files with 32 additions and 7 deletions
|
@ -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 = [
|
||||
|
|
Loading…
Reference in a new issue