# Home Manager module: installs PdfCraft and its command-line tool. # # The package puts both `pdfcraft` (the desktop app) and `pdfcraft-cli` (headless runner and # opt-in MCP server) on PATH, and its icons, desktop entry and AppStream metadata in # $out/share, which a NixOS system profile or an XDG_DATA_DIRS that covers ~/.nix-profile/share # shows in the application launcher. { config, lib, pkgs, ... }: let cfg = config.programs.pdfcraft; in { options.programs.pdfcraft = { enable = lib.mkEnableOption "PdfCraft PDF workbench and its pdfcraft-cli tool"; package = lib.mkOption { type = lib.types.package; # The flake's overlay keeps its packages under the `millerson-nix-overlay` namespace. default = pkgs.millerson-nix-overlay.pdfcraft or pkgs.pdfcraft; defaultText = lib.literalExpression "pkgs.millerson-nix-overlay.pdfcraft or pkgs.pdfcraft"; description = "The pdfcraft package to use."; }; }; config = lib.mkIf cfg.enable { home.packages = [ cfg.package ]; }; }