{ config, lib, pkgs, ... }: let cfg = config.features.gui.desktops.niri.parts.iota-maker; inboxDirectory = "~/Sync/vault/inbox"; in { options.features.gui.desktops.niri.parts.iota-maker.enable = lib.mkEnableOption "iota maker"; config = lib.mkIf cfg.enable { home.packages = [ (pkgs.writers.writeNuBin "iota-maker" '' let iota_text = fuzzel -d -l 0 -p "" -x 8 -y 8 -w 40 let iota_name = date now | format date "%s" let iota_path = ("${inboxDirectory}" + "/" + $iota_name + ".md") | path expand $iota_text | save $iota_path '') ]; }; }