feat(home): Figlet

This commit is contained in:
punkfairie 2024-11-16 14:57:04 -08:00
parent 774e2cf818
commit 0c1105b2da
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
4 changed files with 44 additions and 26 deletions

View file

@ -21,6 +21,7 @@ in
cheat = enabled;
curl = enabled;
eza = enabled;
figlet = enabled;
fish = enabled;
journalctl = enabled;
neo = enabled;

View file

@ -0,0 +1,32 @@
{
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
'';
};
};
};
}

View file

@ -1,26 +0,0 @@
{
flake,
pkgs,
lib,
config,
...
}:
let
inherit (flake.inputs) self;
in
{
home.packages = with pkgs; [
# Could not get overlays or overrides to work.
(callPackage "${self}/derivations/figlet-with-fonts.nix" { })
];
programs.fish.functions = lib.mkIf config.programs.fish.enable {
figlet = {
wraps = "figlet";
body = # fish
''
command figlet -f "ANSI Shadow" $argv
'';
};
};
}

View file

@ -0,0 +1,11 @@
{ _ }:
final: prev: {
figlet = prev.figlet.overrideAttrs (old: {
contributed = prev.fetchFromGitHub {
owner = "xero";
repo = "figlet-fonts";
rev = "a6d2db1a3ee88bec3518214e851825fc4495ac84";
hash = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY";
};
});
}