mjolnir: use cloud-init for network configuration and move to new net.
Switch to cloud-init to align with the Ansible infra. Also move to new network and hostname.
This commit is contained in:
parent
971274b473
commit
c9e27a5bb6
2 changed files with 18 additions and 12 deletions
|
|
@ -1,18 +1,24 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking.useDHCP = false;
|
||||||
interfaces.net0 = {
|
|
||||||
ipv4.addresses = [
|
services.cloud-init = {
|
||||||
{
|
enable = true;
|
||||||
address = "172.31.17.161";
|
network.enable = true;
|
||||||
prefixLength = 25;
|
|
||||||
}
|
# Version without ssh of:
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/3c9db02515ef1d9b6b709fc60ba9a540957f661c/nixos/modules/services/system/cloud-init.nix#L145
|
||||||
|
# So we don't get ssh hostkey regenerations.
|
||||||
|
settings.cloud_config_modules = [
|
||||||
|
"disk_setup"
|
||||||
|
"mounts"
|
||||||
|
"ssh-import-id"
|
||||||
|
"set-passwords"
|
||||||
|
"timezone"
|
||||||
|
"disable-ec2-metadata"
|
||||||
|
"runcmd"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
defaultGateway = "172.31.17.129";
|
|
||||||
nameservers = [ "212.12.50.158" "192.76.134.90" ];
|
|
||||||
search = [ "hamburg.ccc.de" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.network.links."10-net0" = {
|
systemd.network.links."10-net0" = {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
"targetHostname": "forgejo-actions-runner-intern.hamburg.ccc.de"
|
"targetHostname": "forgejo-actions-runner-intern.hamburg.ccc.de"
|
||||||
},
|
},
|
||||||
"mjolnir": {
|
"mjolnir": {
|
||||||
"targetHostname": "mjolnir-intern.hamburg.ccc.de"
|
"targetHostname": "mjolnir.hosts.hamburg.ccc.de"
|
||||||
},
|
},
|
||||||
"woodpecker": {
|
"woodpecker": {
|
||||||
"targetHostname": "woodpecker-intern.hamburg.ccc.de"
|
"targetHostname": "woodpecker-intern.hamburg.ccc.de"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue