NIXOS MODULES + OPERATIONS

ANQ Server Deploy

Private game services with explicit updates, saved-state snapshots, and recovery checks on an existing NixOS host.

  • NixOS
  • systemd
  • Bash
  • Python

Local v1 · NixOS VM tested

A NixOS tooling project, with fixture-based VM verification.

AN EXPLICIT UPDATE

  1. 01Stop cleanly
  2. 02Snapshot saved state
  3. 03Fetch the update
  4. 04Restart after success

Failed updates remain stopped for inspection.

Understandable services on an existing NixOS host

This remake replaces a broader deployment script with NixOS modules and on-host operations for Palworld, Enshrouded, and V Rising. Each service has its own user, private state directory, resource limits, and runtime settings loaded through systemd credentials. Starting on boot and opening firewall ports are opt-in.

The module targets existing x86_64 NixOS hosts. It does not install disks, activate the workstation, or turn the Ubuntu publishing VPS into a game host.

Starting a service does not update it

Updates are deliberate operations. A per-game lock prevents overlapping work. The tool stops the service cleanly, snapshots existing saved state and settings, validates the archive, and only then fetches an update through an unprivileged SteamCMD unit.

Successful updates preserve whether the service was running or stopped. A failed fetch leaves it stopped for inspection because binaries may already have changed. If the backup fails before fetching, the unchanged service restarts when it was previously running.

Recovery has a precise meaning

Snapshots are local, root-only archives with checksum sidecars. Restore checks reject traversal paths, links, special files, and existing or live destinations, then extract into a new directory for inspection.

These snapshots cover saved state and settings. They do not roll back Steam binaries or guarantee compatibility with older save schemas. They are unencrypted, with no automatic off-host delivery or retention policy in this release. Service status and listeners are not game-protocol health checks.

What was checked — and what remains

All flake checks passed: module evaluation and invalid-setting assertions, ShellCheck, package build, ten operational failure-path tests, and an actual NixOS VM using systemd. The VM started all three launch paths, checked private settings and ownership, took snapshots, extracted saved-state bytes, and exercised successful updates, failed fetches, and deliberate recovery.

SteamCMD, native launch support, Wine, and the games were fixture executables in that VM. Real game downloads, native or Wine compatibility, client joins, and actual world recovery remain deployment acceptance work. This is a local module and operations v1, not a claim of production game compatibility.

This is an AI-assisted remake of my earlier tooling. The archived original remains preserved.