1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-21 17:59:39 +01:00

eza: add theme option (#6850)

This commit is contained in:
awwpotato 2025-04-19 22:24:26 -07:00 committed by GitHub
parent f6d295cee3
commit e8b68f99c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,7 @@
}:
let
inherit (lib) mkOption optionalAttrs types;
yamlFormat = pkgs.formats.yaml { };
in
{
imports =
@ -102,6 +103,16 @@ in
};
package = lib.mkPackageOption pkgs "eza" { nullable = true; };
theme = mkOption {
type = yamlFormat.type;
default = { };
description = ''
Written to {file}`$XDG_CONFIG_HOME/eza/theme.yml`
See <https://github.com/eza-community/eza#custom-themes>
'';
};
};
config =
@ -146,6 +157,10 @@ in
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile."eza/theme.yml" = lib.mkIf (cfg.theme != { }) {
source = yamlFormat.generate "eza-theme" cfg.theme;
};
programs.bash.shellAliases = optionsAlias // optionalAttrs cfg.enableBashIntegration aliases;
programs.zsh.shellAliases = optionsAlias // optionalAttrs cfg.enableZshIntegration aliases;