feat(home): Figlet
This commit is contained in:
parent
774e2cf818
commit
0c1105b2da
4 changed files with 44 additions and 26 deletions
|
@ -21,6 +21,7 @@ in
|
|||
cheat = enabled;
|
||||
curl = enabled;
|
||||
eza = enabled;
|
||||
figlet = enabled;
|
||||
fish = enabled;
|
||||
journalctl = enabled;
|
||||
neo = enabled;
|
||||
|
|
32
modules/home/programs/figlet/default.nix
Normal file
32
modules/home/programs/figlet/default.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
11
overlays/figlet/default.nix
Normal file
11
overlays/figlet/default.nix
Normal 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";
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue