nix/snow.nix

115 lines
2.6 KiB
Nix

{cerulean, ...} @ inputs:
cerulean.mkNexus ./. (self: {
nexus = {
args = {inherit inputs;};
modules = with inputs; [];
base = inputs.nixpkgs;
groups = {
servers = {};
};
nodes = let
inherit
(self.nexus)
groups
;
in {
nixarawrui = {
system = "x86_64-linux";
base = inputs.nixpkgs-unstable;
modules = with inputs; [
sddm-silent.nixosModules.default
];
};
arcturus = {
system = "x86_64-linux";
groups = [
groups.servers
];
modules = with inputs; [
microvm.nixosModules.host
{
microvm.vms = {
home-assistant = {
autostart = true;
config = {
imports = [./vms/home-assistant/default.nix];
networking.hostName = "home-assistant";
microvm = {
hypervisor = "qemu";
# 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
mem = 4096; # 4GB
vcpu = 2;
interfaces = [
{
type = "tap";
id = "vm-hass";
mac = "0a:00:a0:70:01:01";
}
];
volumes = [
{
image = "/var/lib/microvms/home-assistant/data.img";
mountPoint = "/var/lib/hass";
size = 16384; # 16GB
}
];
};
networking = {
interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [
{
address = "10.16.1.127";
prefixLength = 24;
}
];
};
};
};
};
};
}
];
deploy.ssh = {
host = "10.16.1.163";
port = 2222;
user = "foxora";
};
};
lyra = {
system = "x86_64-linux";
groups = [
groups.servers
];
deploy.ssh = {
host = "10.16.1.58";
port = 2222;
user = "foxora";
};
};
};
};
})