Files
fruix/docs/reports/phase7-operating-system-model-freebsd.md

2.7 KiB

Phase 7.1: Minimal Fruix operating-system model for FreeBSD

Date: 2026-04-01

Summary

This step introduces the first declarative Fruix operating-system model for the FreeBSD track. The goal is not full upstream Guix System integration yet, but a coherent Fruix-owned system description that can drive later closure and rootfs generation work.

Added files:

  • modules/fruix/system/freebsd.scm
  • tests/system/phase7-minimal-operating-system.scm
  • tests/system/validate-phase7-operating-system.scm
  • tests/system/run-phase7-operating-system-model.sh

Updated file:

  • modules/fruix/packages/freebsd.scm

Validation command

Run command:

METADATA_OUT=/tmp/phase7-os-model-metadata.txt \
./tests/system/run-phase7-operating-system-model.sh

What the model describes

The new module defines records and constructors for:

  • users
  • groups
  • file systems
  • a FreeBSD-oriented operating-system object

The minimal system description currently covers:

  • host identity
  • kernel package
  • bootloader package
  • base packages
  • users/groups
  • file-system declarations
  • generated /etc files
  • a generated activation script
  • a generated Shepherd configuration payload
  • a declared init mode of:
    • freebsd-init+rc.d-shepherd

Observed results

Observed metadata included:

  • host_name=fruix-freebsd
  • kernel_package=freebsd-kernel
  • bootloader_package=freebsd-bootloader
  • base_packages=freebsd-runtime,freebsd-userland,freebsd-libc,freebsd-rc-scripts,freebsd-sh,freebsd-bash
  • users=root,operator
  • groups=wheel,operator
  • file_system_count=3
  • services=shepherd,ready-marker
  • generated_files=boot/loader.conf,etc/rc.conf,etc/fstab,etc/hosts,etc/passwd,etc/group,etc/shells,etc/motd,activate,shepherd/init.scm
  • init_mode=freebsd-init+rc.d-shepherd
  • ready_marker=/var/lib/fruix/ready

Important findings

  • the FreeBSD track now has a concrete declarative system object rather than only ad hoc package lists and shell prototypes
  • the model is explicitly Fruix-owned and FreeBSD-oriented; it does not attempt a premature blanket rename or premature full Guix System integration
  • the package layer was extended with additional system-oriented prototype packages needed by later Phase 7 work, including:
    • freebsd-bootloader
    • freebsd-rc-scripts
    • freebsd-runtime
    • %freebsd-system-packages
  • the chosen first init strategy is now explicit in the model:
    • FreeBSD init with declaratively generated rc.d launch of Shepherd

Conclusion

Phase 7.1 is satisfied on the current FreeBSD prototype track:

  • a minimal Fruix operating-system model now exists for FreeBSD
  • that model evaluates into a coherent system-closure specification
  • the next step is to materialize that specification into a real system closure under /frx/store