Optionalize mkTarget's 'humanName' and 'name' arguments by inferring 'humanName' from the 'name' attribute in the /modules/<MODULE>/meta.nix file, and 'name' from the /modules/<NAME>/ directory name. Inferring the 'humanName' and 'name' arguments ensures consistency and reduces boilerplate. The 'humanName' and 'name' arguments are optionalized instead of removed because complex modules generating target derivations need to distinguish between them. Closes: https://github.com/nix-community/stylix/issues/1661
69 lines
1.5 KiB
Nix
69 lines
1.5 KiB
Nix
# Starship configuration documentation: https://starship.rs/config
|
|
{ mkTarget, ... }:
|
|
mkTarget {
|
|
config =
|
|
{ colors }:
|
|
{
|
|
programs.starship.settings = {
|
|
palette = "base16";
|
|
palettes.base16 = with colors.withHashtag; {
|
|
black = base00;
|
|
bright-black = base03;
|
|
white = base05;
|
|
bright-white = base07;
|
|
|
|
# Starship calls magenta purple.
|
|
purple = magenta;
|
|
bright-purple = bright-magenta;
|
|
|
|
inherit
|
|
# Set Starship's standard normal color names.
|
|
red
|
|
orange
|
|
yellow
|
|
green
|
|
cyan
|
|
blue
|
|
magenta
|
|
brown
|
|
|
|
# Set Starship's standard bright color names.
|
|
bright-red
|
|
bright-yellow
|
|
bright-green
|
|
bright-cyan
|
|
bright-blue
|
|
bright-magenta
|
|
|
|
# Add base16 names to the template for custom usage.
|
|
base00
|
|
base01
|
|
base02
|
|
base03
|
|
base04
|
|
base05
|
|
base06
|
|
base07
|
|
base08
|
|
base09
|
|
base0A
|
|
base0B
|
|
base0C
|
|
base0D
|
|
base0E
|
|
base0F
|
|
|
|
# Add base24 names to the template for custom usage.
|
|
base10
|
|
base11
|
|
base12
|
|
base13
|
|
base14
|
|
base15
|
|
base16
|
|
base17
|
|
;
|
|
};
|
|
};
|
|
};
|
|
}
|