44 days ago · Tech · 0 comments

As I’ve mentioned before on this blog, I really like using Nix and NixOS to manage and deploy my systems. Now that I’m doing more projects than ever, I’ve started experiencing some friction with the monolithic deployment model of NixOS—I have multiple git repositories in which I’m developing various projects and I don’t want to constantly redeploy my main DigitalOcean droplet NixOS config every time I make a small change. NixOS uses systemd which provides a great lightweight container tool called systemd-nspawn. When you run a container with systemd-nspawn it registers it with systemd-machined which makes it integrate well with the rest of the system: systemctl --recursive status will show the full service tree including services inside containers. Automatic resolution of the container name to its IP address through nss-mymachines. systemd-run -M <container> -- command will execute a command inside the container. journalctl -M <container> -u service shows the logs of a service running…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.