added custom header option

This commit is contained in:
Ellis Rahhal 2025-04-20 23:40:53 -07:00
parent 413651f285
commit 6a2b1631f2
2 changed files with 20 additions and 9 deletions

View file

@ -12,7 +12,13 @@
enable-startify-cowsay = lib.mkOption { enable-startify-cowsay = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
description = "Enable startify"; description = "Enable startify cowsay";
};
startify-header = lib.mkOption {
type = lib.types.nullOr (lib.types.listOf lib.types.str);
default = null;
description = "Startify text/ascii image, if cowsay disabled";
}; };
}; };
} }

View file

@ -1,16 +1,21 @@
{ config, ... }: { config, lib, ... }:
let
header-space = " ";
in
{ {
programs.nixvim = { programs.nixvim = {
plugins.startify = { plugins.startify = {
enable = true; enable = true;
settings = { settings = {
custom_header = if config.nixvim-config.enable-startify-cowsay then null else [ custom_header = if config.nixvim-config.enable-startify-cowsay then null
''. _______ ____ ____.___ _____'' else if config.nixvim-config.startify-header != null
''. \ \ ____ ___\ \ / /| | / \'' then config.nixvim-config.startify-header else [
''. / | \_/ __ \/ _ \ Y / | |/ \ / \'' ''${header-space} _______ ____ ____.___ _____''
''. / | \ ___( <_> ) / | / Y \'' ''${header-space} \ \ ____ ___\ \ / /| | / \''
''. \____|__ /\___ >____/ \___/ |___\____|__ /'' ''${header-space} / | \_/ __ \/ _ \ Y / | |/ \ / \''
''. \/ \/ \/'' ''${header-space}/ | \ ___( <_> ) / | / Y \''
''${header-space}\____|__ /\___ >____/ \___/ |___\____|__ /''
''${header-space} \/ \/ \/''
]; ];
}; };
}; };