finix/demo.nix
A small finix machine whose whole userland is Fil-C: finit as PID 1, mdevd, sysklogd, dhcpcd, OpenSSH, the shell and the tools are Fil-C builds; only the kernel and the exceptions in lib/native-exceptions.nix are not. Try it:
nix run .#finixConfigurations.filc-demo.config.system.build.vm
and log in as root (no password) on the console, or ssh -p 2222 demo@localhost with password "demo". Ctrl-a x quits QEMU. finix/test.nix boots it and checks that its processes are Fil-C.
λconfig, lib, pkgs, modules, …
let
QEMU runs on the host, so it is the native build.
in
true
"console=ttyS0,115200n8"
The root file system is a tmpfs; the Nix store is the host's, over 9p.
true
The VM runs with -nographic: the login prompt is on the serial console.
"ttyS0" "tty1"
true
true
true
true
finix's lix-daemon module, when imported (its test driver imports every module), would make Lix the default; Lix is partly Rust.
true
""
with pkgs; bashInteractive coreutils findutils gnugrep gnused gawk less nano curl procps iproute2
2048
2