diff --git a/iso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf b/iso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf new file mode 100644 index 0000000..143e98e --- /dev/null +++ b/iso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf @@ -0,0 +1,6 @@ +[Service] +# Override getty to autologin the minecrarch user without password. +# This is intentional for an appliance-style system (ADR-0006: no desktop, +# no login screen — boot goes directly to Gamescope session). +ExecStart= +ExecStart=-/sbin/agetty --autologin minecrarch --noclear %I $TERM diff --git a/iso/airootfs/etc/systemd/user/default.target.wants/gamescope-session.service b/iso/airootfs/etc/systemd/user/default.target.wants/gamescope-session.service new file mode 120000 index 0000000..4b7fa72 --- /dev/null +++ b/iso/airootfs/etc/systemd/user/default.target.wants/gamescope-session.service @@ -0,0 +1 @@ +../gamescope-session.service \ No newline at end of file diff --git a/iso/airootfs/etc/systemd/user/gamescope-session.service b/iso/airootfs/etc/systemd/user/gamescope-session.service new file mode 100644 index 0000000..f920a74 --- /dev/null +++ b/iso/airootfs/etc/systemd/user/gamescope-session.service @@ -0,0 +1,25 @@ +[Unit] +Description=Gamescope Session (Minecrarch) +Documentation=https://github.com/ValveSoftware/gamescope +After=dbus.service +Wants=dbus.service + +[Service] +Type=simple +# Gamescope runs the shell as a nested Wayland compositor. +# --fullscreen: take ownership of the display +# --xwayland-count 1: spawn one XWayland instance for compatibility +# --: separator; everything after is the child process (the shell) +ExecStart=gamescope \ + --fullscreen \ + --xwayland-count 1 \ + -- \ + /usr/bin/minecrarch-shell +Restart=on-failure +RestartSec=3s +# If Gamescope crashes repeatedly, stop trying (prevents boot loop) +StartLimitBurst=3 +StartLimitIntervalSec=60 + +[Install] +WantedBy=default.target diff --git a/iso/airootfs/etc/systemd/user/minecrarch-logging.service b/iso/airootfs/etc/systemd/user/minecrarch-logging.service new file mode 100644 index 0000000..9bc540a --- /dev/null +++ b/iso/airootfs/etc/systemd/user/minecrarch-logging.service @@ -0,0 +1,19 @@ +[Unit] +Description=Minecrarch Logging Service +Documentation=https://github.com/Count-I/MinecrarchOS +After=dbus.service +Requires=dbus.service + +[Service] +Type=dbus +BusName=org.minecrarch.Logging +ExecStart=/usr/bin/minecrarch-logging +Restart=on-failure +RestartSec=2s +StandardOutput=journal +StandardError=journal +SyslogIdentifier=minecrarch-logging +Environment=MINECRARCH_COMPONENT=logging + +[Install] +WantedBy=default.target diff --git a/iso/airootfs/etc/systemd/user/minecrarch-modpack-manager.service b/iso/airootfs/etc/systemd/user/minecrarch-modpack-manager.service new file mode 100644 index 0000000..71fbab9 --- /dev/null +++ b/iso/airootfs/etc/systemd/user/minecrarch-modpack-manager.service @@ -0,0 +1,23 @@ +[Unit] +Description=Minecrarch Modpack Manager +Documentation=https://github.com/Count-I/MinecrarchOS +After=minecrarch-logging.service +Requires=dbus.service +After=dbus.service + +[Service] +Type=dbus +BusName=org.minecrarch.ModpackManager +ExecStart=/usr/bin/minecrarch-modpack-manager +Restart=on-failure +RestartSec=2s +# Maximum 5 restarts in 60s before giving up +StartLimitBurst=5 +StartLimitIntervalSec=60 +StandardOutput=journal +StandardError=journal +SyslogIdentifier=minecrarch-modpack-manager +Environment=MINECRARCH_COMPONENT=modpack-manager + +[Install] +WantedBy=default.target diff --git a/iso/airootfs/etc/systemd/user/minecrarch-overlay.service b/iso/airootfs/etc/systemd/user/minecrarch-overlay.service new file mode 100644 index 0000000..470493b --- /dev/null +++ b/iso/airootfs/etc/systemd/user/minecrarch-overlay.service @@ -0,0 +1,19 @@ +[Unit] +Description=Minecrarch Overlay Service +Documentation=https://github.com/Count-I/MinecrarchOS +After=dbus.service minecrarch-logging.service +Requires=dbus.service + +[Service] +Type=dbus +BusName=org.minecrarch.Overlay +ExecStart=/usr/bin/minecrarch-overlay +Restart=on-failure +RestartSec=2s +StandardOutput=journal +StandardError=journal +SyslogIdentifier=minecrarch-overlay +Environment=MINECRARCH_COMPONENT=overlay + +[Install] +WantedBy=default.target diff --git a/iso/airootfs/etc/systemd/user/minecrarch-shell.service b/iso/airootfs/etc/systemd/user/minecrarch-shell.service new file mode 100644 index 0000000..1ab7caa --- /dev/null +++ b/iso/airootfs/etc/systemd/user/minecrarch-shell.service @@ -0,0 +1,21 @@ +[Unit] +Description=Minecrarch Shell +Documentation=https://github.com/Count-I/MinecrarchOS +# Shell starts after critical services are registered on D-Bus +After=minecrarch-logging.service minecrarch-modpack-manager.service +Requires=minecrarch-modpack-manager.service +# Shell is managed by Gamescope — not installed directly +# (gamescope-session.service launches the shell as its child process) + +[Service] +Type=simple +ExecStart=/usr/bin/minecrarch-shell +Restart=on-failure +RestartSec=2s +StandardOutput=journal +StandardError=journal +SyslogIdentifier=minecrarch-shell +Environment=MINECRARCH_COMPONENT=shell + +[Install] +WantedBy=default.target diff --git a/iso/airootfs/etc/systemd/user/minecrarch-updater.service b/iso/airootfs/etc/systemd/user/minecrarch-updater.service new file mode 100644 index 0000000..44918f0 --- /dev/null +++ b/iso/airootfs/etc/systemd/user/minecrarch-updater.service @@ -0,0 +1,19 @@ +[Unit] +Description=Minecrarch Update Orchestrator +Documentation=https://github.com/Count-I/MinecrarchOS +After=dbus.service minecrarch-logging.service +Requires=dbus.service + +[Service] +Type=dbus +BusName=org.minecrarch.Updater +ExecStart=/usr/bin/minecrarch-updater +Restart=on-failure +RestartSec=5s +StandardOutput=journal +StandardError=journal +SyslogIdentifier=minecrarch-updater +Environment=MINECRARCH_COMPONENT=updater + +[Install] +WantedBy=default.target