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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue