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 = {
|
||||
interfaces.net0 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "172.31.17.161";
|
||||
prefixLength = 25;
|
||||
}
|
||||
networking.useDHCP = false;
|
||||
|
||||
services.cloud-init = {
|
||||
enable = true;
|
||||
network.enable = true;
|
||||
|
||||
# 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" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue