starship: init (#995)

Closes: https://github.com/danth/stylix/issues/301
Link: https://github.com/danth/stylix/pull/995

Reviewed-by: awwpotato <153149335+awwpotato@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
Chet Luther 2025-03-19 13:37:25 -04:00 committed by GitHub
parent 6e9927413f
commit 968f13d470
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 117 additions and 1 deletions

79
modules/starship/hm.nix Normal file
View file

@ -0,0 +1,79 @@
# Starship configuration documentation: https://starship.rs/config/
{
config,
lib,
...
}:
{
options.stylix.targets.starship.enable =
config.lib.stylix.mkEnableTarget "Starship" true;
config =
lib.mkIf (config.stylix.enable && config.stylix.targets.starship.enable)
{
programs.starship.settings = {
palette = "base16";
palettes.base16 = with config.lib.stylix.colors.withHashtag; {
black = base00;
bright-black = base03;
white = base05;
bright-white = base07;
# There's just one yellow.
bright-yellow = yellow;
# 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-orange
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
;
};
};
};
}

View file

@ -0,0 +1,4 @@
{ lib, ... }:
{
maintainers = [ lib.maintainers.cluther ];
}

View file

@ -0,0 +1,26 @@
{ lib, pkgs, ... }:
{
stylix.testbed.application = {
enable = true;
name = "Alacritty";
package = pkgs.alacritty;
};
home-manager.sharedModules = lib.singleton {
programs = {
alacritty = {
enable = true;
package = pkgs.alacritty;
};
bash = {
enable = true;
package = pkgs.bashInteractive;
};
starship = {
enable = true;
package = pkgs.starship;
enableBashIntegration = true;
};
};
};
}

View file

@ -5,4 +5,11 @@
# are expected to follow the same format as described in [1].
#
# [1]: https://github.com/NixOS/nixpkgs/blob/1da63e6cc622a0cb6fd5b86d49923e4eb1e33b70/maintainers/maintainer-list.nix
{ }
{
cluther = {
name = "Chet Luther";
email = "chet.luther@gmail.com";
github = "cluther";
githubId = 86579;
};
}