feat: fixed how sometimes updating servers mean that ye had to reset teh MAC address in Proxmox.
Some checks failed
Build_Deploy / build (push) Successful in 3m40s
Build_Deploy / linter (push) Successful in 5m19s
Build_Deploy / deploy_dns (push) Failing after 2m59s
Build_Deploy / deploy_active (active) (push) Has been skipped
Build_Deploy / deploy_active (active-core) (push) Has been skipped
Build_Deploy / deploy_active (active-ext) (push) Has been skipped
Some checks failed
Build_Deploy / build (push) Successful in 3m40s
Build_Deploy / linter (push) Successful in 5m19s
Build_Deploy / deploy_dns (push) Failing after 2m59s
Build_Deploy / deploy_active (active) (push) Has been skipped
Build_Deploy / deploy_active (active-core) (push) Has been skipped
Build_Deploy / deploy_active (active-ext) (push) Has been skipped
This is done by letting each server manage its own network interface.
This commit is contained in:
parent
4fc1071225
commit
5ca3265cc1
6 changed files with 35 additions and 41 deletions
|
@ -42,6 +42,16 @@ in {
|
|||
type = types.str;
|
||||
default = "${cfg.host.name}.skynet.ie";
|
||||
};
|
||||
interface = mkOption {
|
||||
type = types.str;
|
||||
description = "Will most likely be ``eno1`` for physical servers.";
|
||||
default = "eth0";
|
||||
};
|
||||
cidr = mkOption {
|
||||
type = types.int;
|
||||
description = "Most of our servers are /26, ";
|
||||
default = 26;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -60,6 +70,20 @@ in {
|
|||
}
|
||||
];
|
||||
|
||||
# set
|
||||
networking = {
|
||||
hostName = cfg.host.name;
|
||||
defaultGateway.interface = lib.mkForce cfg.host.interface;
|
||||
|
||||
# needs to have an address statically assigned
|
||||
interfaces."${cfg.host.interface}".ipv4.addresses = [
|
||||
{
|
||||
address = cfg.host.ip;
|
||||
prefixLength = cfg.host.cidr;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
# for every server unless explisitly defined redirect the ip to skynet.ie
|
||||
|
|
|
@ -35,7 +35,11 @@ in {
|
|||
|
||||
config = {
|
||||
# if its a lxc enable
|
||||
proxmoxLXC.enable = cfg.lxc;
|
||||
proxmoxLXC = {
|
||||
enable = cfg.lxc;
|
||||
manageNetwork = true;
|
||||
manageHostName = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
|
|
|
@ -21,6 +21,7 @@ Notes: Used to have Agent Smith as a partner but it died (Ironically)
|
|||
ip = ip_pub;
|
||||
name = name;
|
||||
hostname = hostname;
|
||||
interface = "en01";
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
|
@ -44,19 +45,6 @@ in {
|
|||
# keep the wired usb connection alive (front panel)
|
||||
# networking.interfaces.enp0s29u1u5u2.useDHCP = true;
|
||||
|
||||
networking.hostName = name;
|
||||
# this has to be defined for any physical servers
|
||||
# vms are defined by teh vm host
|
||||
networking = {
|
||||
defaultGateway.interface = lib.mkForce "eno1";
|
||||
interfaces.eno1.ipv4.addresses = [
|
||||
{
|
||||
address = ip_pub;
|
||||
prefixLength = 26;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# this server is teh firewall
|
||||
skynet_firewall = {
|
||||
# always good to know oneself
|
||||
|
|
|
@ -22,25 +22,13 @@ Notes:
|
|||
ip = ip_pub;
|
||||
name = name;
|
||||
hostname = hostname;
|
||||
interface = "en01";
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
./hardware/RM007.nix
|
||||
];
|
||||
|
||||
networking.hostName = name;
|
||||
# this has to be defined for any physical servers
|
||||
# vms are defined by teh vm host
|
||||
networking = {
|
||||
defaultGateway.interface = lib.mkForce "eno1";
|
||||
interfaces.eno1.ipv4.addresses = [
|
||||
{
|
||||
address = ip_pub;
|
||||
prefixLength = 26;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
deployment = {
|
||||
targetHost = hostname;
|
||||
targetPort = 22;
|
||||
|
|
|
@ -23,6 +23,8 @@ Notes: Does not host offical sites
|
|||
ip = ip_pub;
|
||||
name = name;
|
||||
hostname = hostname;
|
||||
interface = "eth1";
|
||||
cidr = 28;
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
|
|
|
@ -22,14 +22,14 @@ Notes: Using the server that used to be called Earth
|
|||
ip = ip_pub;
|
||||
name = name;
|
||||
hostname = hostname;
|
||||
# only required for physical servers
|
||||
interface = "en01";
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
./hardware/RM002.nix
|
||||
];
|
||||
|
||||
networking.hostName = name;
|
||||
|
||||
deployment = {
|
||||
targetHost = ip_pub;
|
||||
targetPort = 22;
|
||||
|
@ -38,18 +38,6 @@ in {
|
|||
tags = ["active-dns" "dns"];
|
||||
};
|
||||
|
||||
networking = {
|
||||
# needs to have an address statically assigned
|
||||
|
||||
defaultGateway.interface = lib.mkForce "eno1";
|
||||
interfaces.eno1.ipv4.addresses = [
|
||||
{
|
||||
address = "193.1.99.120";
|
||||
prefixLength = 26;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.skynet = {
|
||||
host = host;
|
||||
backup.enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue