29-JUL-2024

1748

Over the weekend, I mostly refactored and tweaked things, and got DOP + it’s VMs up and netbooting.

I ran into an issue where building a bridge over a VLAN-split bond connection didn’t seem to work. I spent almost no time debugging in it favor of getting the lab back to a working state; and just pulled an interface to dedicate to it. I suspect this is mostly a switching problem (enabling trunk ports or w/e), but I want to converge both the WiFi and LAN networks eventually and split everything via VLAN instead, so there’s no point in spending time on it now when I’m just going to radically change it later.

barge and pinky are both building but need a bit of work on their networking setup, eventually I’ll pull that config into laurelin as a module; I’m thinking about how I want to organize the domains and get more of the libvirt config ported back into nix; but the idea is hazy right now, I think ideally the individual networks per domain will have some nix representation that I can pass in, so the function’d be something like:

laurelin = {
    networks = [
        { link = self.domains."foo.bar".networks."foo-net"; ip = "1.2.3.4"; }
        { link = self.domains."foo.bar".networks."foo-net2"; ip = "1.2.3.5"; }
        { link = self.domains."foo.bar".networks."foo-net3"; ip = "1.2.3.6"; }
    ];
};

This would then use the content of the foo-net attrset to populate all the networking config. It should be possible to re-use this model for ‘real’ networks, but I’ll probably limit it to virtual networks to start. Ideally I can work out my abovementioned issue in virtuo and then port back.

I can do a similar thing for the domain side of things, have a few ‘standard’ domains, then set a key in laurelin just for data’s sake, to be used when deploying the config to a particular host.

Unrelated to that, I started working on setting up neotest and want to start trying to get more of the workflow into vim so I need to jump between fewer windows. tmux makes it hurt less, but I want to have the lab integrated into the editor so I can more fluently manage, e.g., rebuilds and so on. I think that comes on the back of setting up a laminar server and moving some of the build/deploy stuff there. That also means moving towards purity/no more --impure builds, which is it’s own can of worms.

Finally, I need to get some way to provide DNS includes, maybe creating a more abstract ‘reverse proxy’ module that both configures an nginx service but also generates a zone-file w/ appropriate CNAMEs would work here? Something like:

laurelin = {
    services = {
        reverse-proxy = {
            "parent.domain" = {
                "subdomain" = {
                    frontendPort = 80;
                    backendPort = 8080;
                }
            };
            # ...
        };
    };
};

Then I would have that generate both an nginxconfig and a key that could then be pulled by the show-dns function in the flake? Ideally this would allow the ‘parent’ to exist as hostname.canon, then have it populate hostname.parent.domain as a CNAME to hostname.canon and then have the others similarly populate based on the desired subdomain.

1850

I may be getting slightly ahead of myself w/ barge, I think I need to write a more general ‘docker container’ module that I then feed additional items into, perhaps?

I also need a dev machine that isn’t this poor old laptop.