33 lines
535 B
Nix
33 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
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|