marleyos/modules/home/programs/figlet/default.nix

31 lines
531 B
Nix
Raw Normal View History

2024-11-16 14:57:04 -08:00
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
2024-11-16 14:57:04 -08:00
cfg = config.marleyos.programs.figlet;
2024-11-16 14:57:04 -08:00
in
{
2024-11-16 23:53:46 -08:00
options.marleyos.programs.figlet.enable = mkEnableOption "figlet";
2024-11-16 14:57:04 -08:00
config = mkIf cfg.enable {
home.packages = with pkgs; [
marleyos.figlet-xero-fonts
2024-11-16 14:57:04 -08:00
];
programs.fish.functions = lib.mkIf config.programs.fish.enable {
figlet = {
wraps = "figlet";
body = # fish
''
command figlet -f "ANSI Shadow" $argv
'';
};
};
};
}