diff --git a/README.md b/README.md index 13ac754..14d07fc 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,18 @@ Initialy created 'with secrets' but stripped out the git/agenix in favor of sops Refactored the configuration to remove nixos but keep the shared modules and Darwin host setup, with no NixOS trees or Linux app targets. +## Inkscape extensions + +Home Manager installs Hatch Fill and the pinned ASK Pen Plotter G-code export +extension. The latter defaults to pen up `G21 G90 G53 G0 Z2`, pen down +`G21 G90 G53 G0 Z0`, and travel speed `2000` mm/min. Inkscape may retain +previously used extension settings, so check these values before plotting. + +Before applying the configuration, move any existing unmanaged +`penplotter_gcode.inx` and `penplotter_gcode.py` files out of Inkscape's user +extensions folder to avoid Home Manager file conflicts. Restart Inkscape after +applying; the extension is under **Extensions > ASK Pen Plotter > Export Gcode**. + ## Emacs and binary caches The Emacs overlay is a flake input pinned in `flake.lock`. Keep the lock file diff --git a/modules/darwin/files.nix b/modules/darwin/files.nix index 17e8417..72ed4ad 100644 --- a/modules/darwin/files.nix +++ b/modules/darwin/files.nix @@ -14,6 +14,17 @@ let url = "https://gitlab.com/moini_ink/hatch_fill/-/archive/master/hatch_fill-master.tar.gz"; sha256 = "1m3qhvf158dngg7shwd33xhn3bawn9yxw2srv2k8qjn889wjvi82"; }; + penPlotterSource = pkgs.fetchzip { + url = "https://github.com/abdulshakoorkakar/Inkscape-ASK-Pen-Plotter-Gcode-Export/archive/b5f1476b4f4f1c5f4e818e066a05bfaf6d2b860d.tar.gz"; + sha256 = "18ssw051qi5znkwrxx9y4mbjsq61whahmsk7f20mrqdr9ccbi5m6"; + }; + penPlotterInx = pkgs.runCommand "penplotter_gcode.inx" { } '' + cp ${penPlotterSource}/penplotter_gcode.inx "$out" + substituteInPlace "$out" \ + --replace-fail 'gui-text="Pen up command:">M3 S0' 'gui-text="Pen up command:">G21 G90 G53 G0 Z2' \ + --replace-fail 'gui-text="Pen down command:">M3 S180' 'gui-text="Pen down command:">G21 G90 G53 G0 Z0' \ + --replace-fail 'gui-text="Travel speed, pen up (mm/min):">4000' 'gui-text="Travel speed, pen up (mm/min):">2000' + ''; in { @@ -63,4 +74,6 @@ in "${inkscapeExtensionsHome}/hatch_fill.inx".source = "${hatchFillSource}/hatch_fill.inx"; "${inkscapeExtensionsHome}/hatch_fill.py".source = "${hatchFillSource}/hatch_fill.py"; + "${inkscapeExtensionsHome}/penplotter_gcode.inx".source = penPlotterInx; + "${inkscapeExtensionsHome}/penplotter_gcode.py".source = "${penPlotterSource}/penplotter_gcode.py"; }