Files
RedBear-OS/config/base.toml
T
vasilito 61e1a1335c Migrate all init scripts from legacy format to .service TOML units
Convert 14 config files from the legacy init script format (plain-text
commands) to the systemd-style TOML .service format. The init daemon
supports both formats; this eliminates the legacy path entirely so that
all services use the richer, more structured TOML unit format.

Key changes per config:
- base.toml: split 00_base into 00_base.service (tmpdir) + 00_sudo.service
  (sudo daemon); remove redundant 00_drivers and 10_net (handled by
  existing .service files from the base recipe)
- minimal.toml: split 30_console into 29_activate_console.service +
  30_console.service + 31_debug_console.service
- desktop-minimal.toml: convert 20_display and 30_console to .service,
  add 29_activate_console and 31_debug_console overrides
- x11.toml: convert 10_dbus, 10_xenv, 20_orbital, 30_console
- redoxer.toml: split 10_net into 10_smolnetd.service + 10_dhcpd.service,
  convert 30_redoxer
- redbear-legacy-*.toml: update override references to .service paths
- acid.toml, auto-test.toml, os-test.toml, sys-build.toml: direct conversions
2026-04-25 12:20:09 +01:00

321 lines
4.6 KiB
TOML

# Base configuration: This configuration is meant to be included by
# other configurations rather than use directly. It is the greatest
# common divisor of all other configurations and misses several
# parts necessary to create a bootable system.
# General settings
[general]
# Do not prompt if settings are not defined
prompt = false
[packages]
base = {}
base-initfs = {}
bootloader = {}
kernel = {}
libgcc = {}
libstdcxx = {}
netdb = {}
netutils = {}
relibc = {}
userutils = {}
uutils = {}
## Configuration files
[[files]]
path = "/usr/lib/init.d/00_base.service"
data = """
[unit]
description = "Base environment setup (tmpdir)"
[service]
cmd = "ion"
args = ["-c", "rm -rf /tmp; mkdir -m a=rwxt /tmp"]
type = "oneshot"
"""
[[files]]
path = "/usr/lib/init.d/00_sudo.service"
data = """
[unit]
description = "Sudo privilege daemon"
[service]
cmd = "sudo"
args = ["--daemon"]
type = "oneshot_async"
"""
[[files]]
path = "/etc/login_schemes.toml"
data = """
[user_schemes.root]
schemes = ["*"]
[user_schemes.user]
schemes = [
# Kernel schemes
"debug",
"event",
"memory",
"pipe",
"serio",
"irq",
"time",
"sys",
# Base schemes
"rand",
"null",
"zero",
"log",
# Network schemes
"ip",
"icmp",
"tcp",
"udp",
# IPC schemes
"shm",
"chan",
"uds_stream",
"uds_dgram",
# File schemes
"file",
# Display schemes
"display.vesa",
"display*",
# Other schemes
"pty",
"sudo",
"audio",
]
"""
[[files]]
path = "/etc/hostname"
data = "redbear"
## Default net configuration (optimized for QEMU)
[[files]]
path = "/etc/net/dns"
data = """
9.9.9.9
"""
[[files]]
path = "/etc/net/ip"
data = """
10.0.2.15
"""
[[files]]
path = "/etc/net/ip_router"
data = """
10.0.2.2
"""
[[files]]
path = "/etc/net/ip_subnet"
data = """
255.255.255.0
"""
# https://www.freedesktop.org/software/systemd/man/latest/os-release.html
[[files]]
path = "/usr/lib/os-release"
data = """
PRETTY_NAME="Red Bear OS 0.1.0"
NAME="Red Bear OS"
VERSION_ID="0.1.0"
VERSION="0.1.0"
ID="redbear-os"
ID_LIKE="redox-os"
HOME_URL="https://github.com/vasilito/Red-Bear-OS-3"
DOCUMENTATION_URL="https://doc.redox-os.org/"
SUPPORT_URL="https://github.com/vasilito/Red-Bear-OS-3/issues"
"""
# FIXME maybe add VARIANT= and VARIANT_ID= keys depending on the chosen configuration?
[[files]]
path = "/etc/os-release"
data = "../usr/lib/os-release"
symlink = true
[[files]]
path = "/etc/pkg.d/50_redox"
data = "https://static.redox-os.org/pkg"
## /usr and symlinks for usrmerge
[[files]]
path = "/usr"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/usr/bin"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/bin"
data = "usr/bin"
symlink = true
[[files]]
path = "/usr/include"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/include"
data = "usr/include"
symlink = true
[[files]]
path = "/usr/lib"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/lib"
data = "usr/lib"
symlink = true
[[files]]
path = "/usr/libexec"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/usr/share"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/share"
data = "usr/share"
symlink = true
[[files]]
path = "/ui"
data = "usr/share/ui"
symlink = true
## legacy display font directory
[[files]]
path = "/usr/share/ui/fonts"
data = "/usr/share/fonts"
symlink = true
## legacy display icon directory
[[files]]
path = "/usr/share/ui/icons"
data = "/usr/share/icons"
symlink = true
## /var
[[files]]
path = "/var"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/var/cache"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/var/lib"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/var/lock"
data = ""
directory = true
mode = 0o1777
[[files]]
path = "/var/log"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/var/run"
data = ""
directory = true
mode = 0o755
[[files]]
path = "/var/tmp"
data = ""
directory = true
mode = 0o1777
## Device file symlinks
[[files]]
path = "/dev/null"
data = "/scheme/null"
symlink = true
[[files]]
path = "/dev/random"
data = "/scheme/rand"
symlink = true
[[files]]
path = "/dev/urandom"
data = "/scheme/rand"
symlink = true
[[files]]
path = "/dev/zero"
data = "/scheme/zero"
symlink = true
[[files]]
path = "/dev/tty"
data = "libc:tty"
symlink = true
[[files]]
path = "/dev/stdin"
data = "libc:stdin"
symlink = true
[[files]]
path = "/dev/stdout"
data = "libc:stdout"
symlink = true
[[files]]
path = "/dev/stderr"
data = "libc:stderr"
symlink = true
# User settings
[users.root]
password = "password"
uid = 0
gid = 0
shell = "/usr/bin/ion"
[users.user]
# Password is unset
password = ""
shell = "/usr/bin/ion"
# Group settings
[groups.sudo]
gid = 1
members = ["user"]