marleyos/modules/home/programs/figlet/default.nix
2024-11-16 23:57:21 -08:00

30 lines
511 B
Nix

{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.marleyos.programs.figlet;
in
{
options.marleyos.programs.figlet.enable = mkEnableOption "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
'';
};
};
};
}