nix-config/microvms/music/default.nix

41 lines
787 B
Nix
Raw Normal View History

2023-01-24 20:40:41 +01:00
{ pkgs, lib, config, ... }: {
imports = [
./navidrome.nix
./oxaproxy.nix
2023-01-30 23:07:18 +01:00
./upload-user.nix
2023-01-24 20:40:41 +01:00
];
microvm = {
hypervisor = "qemu";
mem = 4 * 1024;
vcpu = 3;
shares = [{
source = "/nix/store";
mountPoint = "/nix/.ro-store";
tag = "store";
proto = "virtiofs";
socket = "store.socket";
}] ++ map
(dir: {
source = "/var/lib/microvms/${config.networking.hostName}/${dir}";
mountPoint = "/${dir}";
tag = dir;
proto = "virtiofs";
socket = "${dir}.socket";
}) [ "etc" "var" "home" ];
interfaces = [{
type = "tap";
id = "vm-music";
2023-05-28 16:50:25 +02:00
mac = "02:00:00:00:00:01";
2023-01-24 20:40:41 +01:00
}];
};
networking = {
hostName = "music";
};
system.stateVersion = "22.11";
}