aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-22 11:47:48 +0000
committertv <tv@krebsco.de>2026-11-22 15:08:37 +0000
commit47c370f495a4b092fdca05f25683d2f7024e89fb (patch)
tree97a8ad37cb25deb35a117821378ac5467e99b704 /README.md
parent5d92f09978a2e7b5f40becb5215a28f2407f4bb4 (diff)
base/systemd.nix: a slimmer systemd, optional
nixpkgs' systemd comes with much a guest has no use for: importd (with gnupg and openldap), cryptsetup, TPM2, FIDO2, homed, repart, sysupdate, portabled, machined, nspawn and vmspawn, journal-remote (microhttpd, gnutls), coredump (elfutils), BPF (libbpf), qrencode, pwquality, AppArmor. And dbus brings in a second systemd, systemd-minimal (23M), X11's libraries, and AppArmor, too. Leaving all that out means building systemd, dbus and dbus-broker (which links libsystemd) from source, on every nixpkgs bump, so it's a base module (--arg base '[ base/systemd.nix ]'), for whoever thinks that's worth it. NixOS leaves out the units of what the package lacks; coredump the base system turns off already, and the module takes systemd-bsod out of the initrd (where NixOS has it unconditionally), as systemd builds it only with qrencode.
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9746906..3210c9e 100644
--- a/README.md
+++ b/README.md
@@ -208,6 +208,15 @@ nix-build pkgs/run-firecracker-vm \
--arg base '[ base/kernel.nix ]'
```
+And for a slimmer systemd (no importd, homed, machined, nspawn,
+cryptsetup, TPM2, FIDO2, journal-remote, ...), built from source, with
+dbus and dbus-broker against it:
+
+```sh
+nix-build pkgs/run-firecracker-vm \
+ --arg base '[ base/kernel.nix base/systemd.nix ]'
+```
+
## Egress
The guests resolve every name to the host, and all their HTTPS goes to
@@ -287,6 +296,7 @@ the list its own VM uses.
- `pkgs/run-firecracker-vm/default.nix`: the guest's NixOS configuration,
the Firecracker configuration, and the `run-firecracker-vm` script.
- `base/kernel.nix`: the cut-down kernel, for `base`.
+- `base/systemd.nix`: a slimmer systemd, for `base`.
- `layers/nix.nix`: nix, as a layer.
- `layers/console.nix`: a shell on the serial console, to import into a layer.
- `modules/host/default.nix`: the host's side: network, DHCP/DNS, egress