Modular, context-aware and aspect-oriented dendritic Nix configurations.
Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/
den.oeiuwq.com
configurations
den
dendritic
nix
aspect
oriented
1# Copied from MicroVM flake template.
2#
3# This is just a normal NixOS configuration that happes to include microvm.nix module.
4# No special Den classes nor context pipeline here. It's all just a single NixOS conf.
5# Den support: ./microvm-runners.nix
6#
7{
8 inputs,
9 den,
10 lib,
11 ...
12}:
13{
14
15 den.hosts.x86_64-linux.runnable-microvm = {
16 intoAttr = [
17 "microvms"
18 "runnable-microvm"
19 ]; # example not intended to be used from nixosConfigurations
20 };
21
22 den.aspects.runnable-microvm = {
23 nixos = {
24 imports = [ inputs.microvm.nixosModules.microvm ];
25 users.users.root.password = "";
26
27 # There's not much need to have a forwarding microvm class for runnable vms
28 microvm = {
29 volumes = [
30 {
31 mountPoint = "/var";
32 image = "var.img";
33 size = 256;
34 }
35 ];
36 shares = [
37 {
38 # use proto = "virtiofs" for MicroVMs that are started by systemd
39 proto = "9p";
40 tag = "ro-store";
41 # a host's /nix/store will be picked up so that no
42 # squashfs/erofs will be built for it.
43 source = "/nix/store";
44 mountPoint = "/nix/.ro-store";
45 }
46 ];
47
48 # "qemu" has 9p built-in!
49 hypervisor = "qemu";
50 socket = "control.socket";
51 };
52 };
53 };
54}