Skip to content

Services

Izunim edited this page Feb 27, 2026 · 3 revisions

Services

Track your enabled systemd services alongside your dotfiles. Synx snapshots which services are enabled so you can re-enable them on a new machine.

Note: This feature requires systemctl (systemd-based systems). On other systems, synx svc will show a clear error and all other synx commands continue to work normally.

Commands

Command Description
synx svc sync Snapshot currently enabled services
synx svc status Show services added or removed since last snapshot
synx svc restore Enable missing services from the saved list
synx svc list Display the saved service list

How It Works

synx svc sync captures two lists from systemctl:

File Source Contents
~/.config/synx/services.system systemctl list-unit-files --state=enabled System-level enabled units
~/.config/synx/services.user systemctl --user list-unit-files --state=enabled User-level enabled units

These files are automatically backed up to .synx/ in your dotfiles repo during a regular synx sync, and restored during synx -r.

Typical Workflow

# After setting up your system
synx svc sync                  # Save current service state

# Later, check what changed
synx svc status                # Shows added/removed services

# On a new machine after synx -r
synx svc restore               # Enable all missing services

Restore Behavior

  • System services are enabled via sudo systemctl enable
  • User services are enabled via systemctl --user enable
  • Services are only enabled, not started — a reboot (or manual start) activates them

Example Output

╭───────────────────────╮
│ ⚙ SYNX - Service Sync │
╰───────────────────────╯

→ Capturing enabled services...

─────────────────────────────────────
34 system  │  7 user
─────────────────────────────────────

  ✓ Service state saved

Integration

  • Doctor checks whether a saved service state exists
  • Service lists are backed up during synx and restored during synx -r
  • Works alongside Profiles — each profile can have its own service set. To track services specifically for a profile, run synx --add services.system and/or synx --add services.user while the profile is active.

Clone this wiki locally