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:
parent
f6d295cee3
commit
e8b68f99c6
1 changed files with 15 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption optionalAttrs types;
|
inherit (lib) mkOption optionalAttrs types;
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
|
@ -102,6 +103,16 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "eza" { nullable = true; };
|
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 =
|
config =
|
||||||
|
|
@ -146,6 +157,10 @@ in
|
||||||
|
|
||||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
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.bash.shellAliases = optionsAlias // optionalAttrs cfg.enableBashIntegration aliases;
|
||||||
|
|
||||||
programs.zsh.shellAliases = optionsAlias // optionalAttrs cfg.enableZshIntegration aliases;
|
programs.zsh.shellAliases = optionsAlias // optionalAttrs cfg.enableZshIntegration aliases;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue