Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

DIY & Making — 3D Printing and Maker Tooling

Purpose

The purpose.diy Home-Manager modules provide tooling and configuration for hardware tinkering, 3D printing, and related maker activities.

Entry Point

Architecture / Services / Scope

Printing

The printing module installs 3D-printing software and wires up persistent storage so that settings survive reboots on impermanence-based systems.

Options

purpose.diy.printing.enable

Typeboolean
Defaultfalse
Exampletrue

Whether to enable Enable 3D printing support.


purpose.diy.printing.gitSync.enable

Typeboolean
Defaultfalse
Exampletrue

Whether to enable Auto-commit OrcaSlicer settings changes to a local git repository.


purpose.diy.printing.gitSync.remoteUrl

Typenull or string
Defaultnull

Optional remote URL to push commits to. If set, the git sync service will attempt to push commits to this remote after creating them.

The remote must be configured with appropriate credentials (e.g. via SSH keys) for non-interactive authentication.


purpose.diy.printing.gitSync.repoPath

Typestring
Default"${config.home.homeDirectory}/.config/OrcaSlicer/user/default"

Absolute path to the directory that will be tracked as a git repository. The directory is initialised automatically the first time the watcher service starts, so it does not need to exist at activation time.

Defaults to the standard OrcaSlicer per-user profile directory so that filament, process, and machine profiles are all captured without any additional configuration.


Git Sync

The gitSync sub-module adds a long-running systemd user service backed by the packaged orca-slicer-git-sync helper. It watches the OrcaSlicer profile directory and automatically creates a git commit every time a profile file is added, changed, or removed. This gives a full revision history of slicer settings with zero manual effort.

Commit Message Convention

Commit messages are generated automatically based on the type of filesystem event and the location of the file within the repository:

EventCommit message format
File added / createdfeat(<type>): added <name>
File modifiedrefactor(<type>): updated <name>
File deletedchore(<type>): removed <name>

Where:

  • <type> is the name of the first directory component under the repo root (e.g. filament, process, machine). Files placed directly at the root level use the fallback type config.
  • <name> is the filename stripped of its extension (e.g. a file named Prusament_PLA.json yields the name Prusament_PLA).

Examples:

feat(filament): added Prusament_PLA
refactor(process): updated Standard_0.2mm_Quality
chore(machine): removed Prusa_MK4S
How It Works
  1. A systemd user service is started at login and kept alive by systemd.
  2. The service uses inotifywait (from inotify-tools) in one-shot mode inside a loop to detect any filesystem event under the repo path (excluding the .git directory).
  3. After an event is received the watcher sleeps for a short debounce period to absorb rapid bursts of writes (e.g. when OrcaSlicer rewrites multiple files at once).
  4. All pending changes are staged and committed once per batch. The commit message is derived from the first changed path in that batch, using the same profile-aware naming convention documented above.
  5. If the watched directory does not yet exist (e.g. OrcaSlicer has never been run), the service polls until it appears, then initialises the repository and starts watching.

Usage Example

{ ... }: {
  purpose.diy.enable = true;

  purpose.diy.printing = {
    enable = true;

    gitSync = {
      enable = true;
      # Optional: use a custom path outside the OrcaSlicer config directory
      # repoPath = "/home/alice/slicer-profiles";
    };
  };
}

Operational Notes / Assumptions

  • The git repository is initialised with git init and an initial commit the first time the service starts if no .git directory exists.
  • The service is set to restart on failure so transient errors do not leave settings un-tracked.
  • Because the watcher operates on the live OrcaSlicer profile directory, no separate mirroring or rsync step is needed.