forked from foxora/nix
i need butterfly's help ;-;
This commit is contained in:
parent
21cb58686e
commit
861b05b042
3 changed files with 61 additions and 24 deletions
28
snow.nix
28
snow.nix
|
|
@ -47,9 +47,19 @@ cerulean.mkNexus ./. (self: {
|
|||
|
||||
networking.hostName = "home-assistant";
|
||||
|
||||
boot.kernelParams = ["console=ttyS0" "console=ttyS1" "8250.nr_uarts=2"];
|
||||
systemd.services."serial-getty@ttyS1".enable = true;
|
||||
|
||||
microvm = {
|
||||
hypervisor = "qemu";
|
||||
|
||||
# needed to get interface working
|
||||
qemu.extraArgs = [
|
||||
"-monitor" "unix:/var/lib/microvms/home-assistant/monitor.sock,server,nowait"
|
||||
"-chardev" "socket,id=serial1,path=/var/lib/microvms/home-assistant/serial.sock,server=on,wait=off"
|
||||
"-serial" "chardev:serial1"
|
||||
];
|
||||
|
||||
# memory cannot be 2GB so i doubled it and used 4GB:
|
||||
# https://github.com/microvm-nix/microvm.nix/issues/171
|
||||
# TODO: can be fixed by turning off acpi in qemu
|
||||
|
|
@ -73,15 +83,15 @@ cerulean.mkNexus ./. (self: {
|
|||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
interfaces.eth0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "10.16.1.127";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
systemd.network.enable = true;
|
||||
systemd.network.networks."20-lan" = {
|
||||
matchConfig.Type = "ether";
|
||||
networkConfig = {
|
||||
Address = ["10.16.1.127"];
|
||||
Gateway = "10.16.1.1";
|
||||
DNS = ["10.16.1.1"];
|
||||
IPv6AcceptRA = true;
|
||||
DHCP = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue