{ lib, config, pkgs, ... }: with lib; let cfg = config.progs.xplr; in { options.progs.xplr = { enable = mkOption { type = types.bool; default = false; description = "Add and configure xplr, a terminal UI based file explorer"; }; }; config = mkIf cfg.enable { home.packages = with pkgs; [ xplr # a terminal UI based file explorer ]; xdg.configFile = { "xplr/init.lua".source = ./init.lua; }; }; }