marleyos/modules/home/programs/figlet/default.nix
2024-11-16 19:38:12 -08:00

32 lines
535 B
Nix

{
lib,
config,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.figlet;
in
{
options = mkEnableModule "programs.figlet";
config = mkIf cfg.enable {
home.packages = with pkgs; [
figlet
];
programs.fish.functions = lib.mkIf config.programs.fish.enable {
figlet = {
wraps = "figlet";
body = # fish
''
command figlet -f "ANSI Shadow" $argv
'';
};
};
};
}