{ pkgs, lib, osConfig, ... }: let cfg = osConfig.modules.services.cliphist; exec = pkgs.writers.writeBash "rofi-cliphist" { makeWrapperArgs = [ "--prefix" "PATH" ":" "${lib.makeBinPath [ pkgs.cliphist ]}" ]; } "cliphist-rofi-img"; in { config = lib.mkIf cfg.enable { programs.rofi = { enable = true; extraConfig.modes = [ "clipboard:${exec}" ]; }; }; }