gonix

module
v0.0.0-...-6cb71f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: MIT

README

GoNIX - a UNIX-like Operating System with a mostly Go Userspace

GoNix Logo

gonix is a UNIX-like Operating System (based on the Linux Kernel) with a Userland mostly written in Go including Networking, Services, Device Management and an integrated SSH service.

Quick Start

Building GoNIX requires Docker (the build runs in an Alpine toolchain container). The ergonomic entrypoint is:

make image              # amd64 (default): builds artefacts/boot.iso
make image ARCH=arm64   # arm64: builds artefacts-arm64/{Image,rootfs.gz}

Run it under QEMU:

./test.sh               # boot the amd64 ISO (SSH forwarded to :2222)
ARCH=arm64 ./test.sh    # boot arm64 (native under hvf on Apple Silicon)

Then SSH in with ssh -p 2222 root@localhost (the default password is gonix).

Supported Platforms

GoNIX targets virtual machines and cloud instances rather than bare-metal hardware: the kernel is built with just the device drivers needed by common hypervisors (with virtio as the preferred, fastest path) plus loadable modules disabled (everything is built in for the initramfs boot). Two architectures are supported:

Architecture Boot method Runs on
amd64 (x86-64) BIOS-booted ISO (artefacts/boot.iso) QEMU/KVM, VirtualBox, VMware, and most cloud providers
arm64 (aarch64) Direct kernel + initramfs (-kernel) QEMU virt machine — native under hvf on Apple Silicon
amd64 (x86-64)

A BIOS-booted ISO that runs on essentially any x86-64 hypervisor or cloud instance. Device support:

  • Network: virtio-net (preferred), and Intel e100 / e1000 / e1000e (the default emulated NIC on QEMU, VirtualBox and VMware).
  • Storage: virtio-blk (preferred), SATA (AHCI) and IDE (PIIX) disks, and ATAPI CD-ROM (ISO9660) — so it boots from a CD/ISO and can use a virtio, SATA or IDE data disk.
  • Console: VGA text console (tty0) and serial (ttyS0), so both graphical and headless/serial setups get kernel output and a login.
  • Guest extras: KVM paravirt guest support and a hardware RTC.

An optional persistent overlay root and the baseline firewall can be baked into the ISO at build time, e.g. make image PERSIST=/dev/vda FIREWALL=1.

arm64 (aarch64)

Targets the QEMU virt board, booted directly via -kernel/-initrd (no BIOS/ISO). On an Apple Silicon host this runs natively under the hvf accelerator, so boots take seconds. Device support is deliberately minimal — virtio only:

  • Network/Storage/Console: virtio-net, virtio-blk, virtio-console, virtio-rng, with the PL011 UART as the serial console.
  • Platform: generic PCIe host bridge and GICv3 interrupt controller (the virt board); no SoC-vendor or physical-hardware drivers are included.

Enable the persistent overlay root and/or firewall on the kernel cmdline by attaching a data disk and/or setting FIREWALL=1:

DISK=disk.img FIREWALL=1 ARCH=arm64 ./test.sh

Services

Background services (the SSH server, DHCP client, web server, …) run under a supervisor in init and are managed at runtime with the sv command:

sv status            # list services and their state
sv restart sshd      # start / stop / restart a service

Services are defined by simple unit files in /etc/rc.d/. See docs/services.md for the sv commands and the unit format.

Packages

Software is managed with pkg, a CRUX-style package manager. Install binary packages (with automatic dependency resolution) from a repository, or build from source with a Pkgfile:

pkg update           # refresh the repository index
pkg install <name>   # install a package and its dependencies
pkg upgrade          # upgrade installed packages

See docs/packages.md for the full guide, including building packages and publishing a repository.

Configuration

System configuration lives in /etc/rc.conf (hostname, firewall), the kernel command line (persistence, firewall), and /etc/rc.local (boot script). See docs/configuration.md for the full guide, including networking, users/SSH, and what persists with a persistent root.

License

GoNix is licensed under the terms of the MIT License

Directories

Path Synopsis
cmd
cefbrowser command
The default browser frontend: the pure-Go Wayland backend (wlui).
The default browser frontend: the pure-Go Wayland backend (wlui).
cefhost command
Without -tags cef there is no CEF to host; this stub keeps the package buildable (so `go build ./...` works without the CEF toolchain/libs).
Without -tags cef there is no CEF to host; this stub keeps the package buildable (so `go build ./...` works without the CEF toolchain/libs).
coreutils command
crond command
Command crond is GoNIX's cron daemon: a minimal, dependency-free scheduler.
Command crond is GoNIX's cron daemon: a minimal, dependency-free scheduler.
edit command
Command edit is a pure-Go, software-rendered Wayland text editor for the GoNIX desktop, built on internal/wlui, its text layer and the shared ui theme.
Command edit is a pure-Go, software-rendered Wayland text editor for the GoNIX desktop, built on internal/wlui, its text layer and the shared ui theme.
imgview command
Command imgview is a pure-Go, software-rendered Wayland image viewer for the GoNIX desktop.
Command imgview is a pure-Go, software-rendered Wayland image viewer for the GoNIX desktop.
init command
pkg command
Command pkg is GoNIX's package manager: a Go reimplementation of the CRUX- style `pkg` (and the ports/repogen/prtcreate helpers), kept compatible with the existing Pkgfile format, binary package layout (name#version-release.tar.gz) and database (/var/db/pkg/<name>/{manifest,version,depends}).
Command pkg is GoNIX's package manager: a Go reimplementation of the CRUX- style `pkg` (and the ports/repogen/prtcreate helpers), kept compatible with the existing Pkgfile format, binary package layout (name#version-release.tar.gz) and database (/var/db/pkg/<name>/{manifest,version,depends}).
sendmail command
Command sendmail is GoNIX's send-only SMTP relay: an ssmtp/msmtp-style sendmail replacement.
Command sendmail is GoNIX's send-only SMTP relay: an ssmtp/msmtp-style sendmail replacement.
startgui command
Command startgui launches the GoNIX desktop: the labwc compositor with a wallpaper (wbg), a panel (yambar) and a foot terminal.
Command startgui launches the GoNIX desktop: the labwc compositor with a wallpaper (wbg), a panel (yambar) and a foot terminal.
syslogd command
Command syslogd is GoNIX's syslog daemon: a minimal, dependency-free log collector.
Command syslogd is GoNIX's syslog daemon: a minimal, dependency-free log collector.
txtview command
Command txtview is a pure-Go, software-rendered Wayland text-file viewer for the GoNIX desktop — a graphical pager.
Command txtview is a pure-Go, software-rendered Wayland text-file viewer for the GoNIX desktop — a graphical pager.
applets/cloudinit
Package cloudinit is a minimal cloud-init for GoNIX: at boot it discovers the instance's SSH keys, hostname and user-data from the platform and applies them, so a fresh image becomes a configured server with no baked-in secrets.
Package cloudinit is a minimal cloud-init for GoNIX: at boot it discovers the instance's SSH keys, hostname and user-data from the platform and applies them, so a fresh image becomes a configured server with no baked-in secrets.
applets/datadisk
Package datadisk mounts the optional persistent data disk as a supervised one-shot service (started from /etc/rc.d/datadisk, Provides: data).
Package datadisk mounts the optional persistent data disk as a supervised one-shot service (started from /etc/rc.d/datadisk, Provides: data).
applets/killall
Package killall implements killall: send a signal to all processes matching a name exactly (by comm, as in the traditional psmisc tool).
Package killall implements killall: send a signal to all processes matching a name exactly (by comm, as in the traditional psmisc tool).
applets/network
Package network configures eth0 as a supervised service (started from /etc/rc.d/network): a static address when /etc/rc.conf sets IP, otherwise a DHCP client.
Package network configures eth0 as a supervised service (started from /etc/rc.d/network): a static address when /etc/rc.conf sets IP, otherwise a DHCP client.
applets/nohup
Package nohup implements nohup: run a program immune to hangups, with output redirected to nohup.out when stdout is a terminal.
Package nohup implements nohup: run a program immune to hangups, with output redirected to nohup.out when stdout is a terminal.
applets/pgrep
Package pgrep implements pgrep and pkill: find (and optionally signal) processes by name.
Package pgrep implements pgrep and pkill: find (and optionally signal) processes by name.
applets/setsid
Package setsid implements setsid: run a program in a new session, detached from the controlling terminal.
Package setsid implements setsid: run a program in a new session, detached from the controlling terminal.
applets/sshd
Package sshd runs the GoNIX SSH server as a standalone, supervised service (started from /etc/rc.d/sshd), rather than a goroutine inside init.
Package sshd runs the GoNIX SSH server as a standalone, supervised service (started from /etc/rc.d/sshd), rather than a goroutine inside init.
applets/strace
go-strace only implements its syscall arg/ret decoding for amd64, so the real strace applet is amd64-only; strace_unsupported.go provides a stub elsewhere.
go-strace only implements its syscall arg/ret decoding for amd64, so the real strace applet is amd64-only; strace_unsupported.go provides a stub elsewhere.
applets/sv
Package sv implements the `sv` service-control client: a thin front-end to the supervisor PID 1 runs, reached over the /run/sv.sock control socket.
Package sv implements the `sv` service-control client: a thin front-end to the supervisor PID 1 runs, reached over the /run/sv.sock control socket.
applets/wg
Package wg is a small WireGuard control applet for GoNIX.
Package wg is a small WireGuard control applet for GoNIX.
cefhost
Package cefhost is the shared CEF (Chromium) offscreen-rendering host used by both browser host roles:
Package cefhost is the shared CEF (Chromium) offscreen-rendering host used by both browser host roles:
cefipc
Package cefipc is the shared transport contract between the GoNIX/macOS browser shell and its CEF rendering host: a memory-mapped frame buffer plus the constants both sides agree on.
Package cefipc is the shared transport contract between the GoNIX/macOS browser shell and its CEF rendering host: a memory-mapped frame buffer plus the constants both sides agree on.
gui
Package gui is a tiny, backend-agnostic windowing contract: a resizable software framebuffer (an *image.RGBA painted by the application) plus pointer, keyboard and scroll input and a run loop.
Package gui is a tiny, backend-agnostic windowing contract: a resizable software framebuffer (an *image.RGBA painted by the application) plus pointer, keyboard and scroll input and a run loop.
wlui
Package wlui is a minimal, pure-Go, software-rendered Wayland window toolkit.
Package wlui is a minimal, pure-Go, software-rendered Wayland window toolkit.
wlui/swizzle
Package swizzle provides functions for converting between RGBA pixel formats.
Package swizzle provides functions for converting between RGBA pixel formats.
wlui/text
Package text is a minimal pure-Go text-rendering layer for wlui apps.
Package text is a minimal pure-Go text-rendering layer for wlui apps.
wlui/ui
Package ui provides shared theming and drawing helpers for GoNIX GUI apps built on wlui — the small, home-grown beginnings of a widget layer.
Package ui provides shared theming and drawing helpers for GoNIX GUI apps built on wlui — the small, home-grown beginnings of a widget layer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL