feat: shpool

This commit is contained in:
2026-02-01 09:25:51 +08:00
parent b2860d63c5
commit bdddabcd52
6 changed files with 118 additions and 33 deletions

View File

@@ -5,17 +5,26 @@ in
{
options.my.cli.shell.starship = {
enable = lib.mkEnableOption "starship prompt";
};
config = lib.mkIf cfg.enable {
my.hm = {
programs.starship = {
enable = true;
settings = lib.recursiveUpdate (with builtins; fromTOML (readFile ./starship-preset.toml)) {
add_newline = false;
nix_shell.disabled = true;
};
};
format = lib.mkOption {
type = with lib.types; listOf singleLineStr;
};
};
config = lib.mkMerge [
{
my.cli.shell.starship.format = lib.mkOrder 0 [ "$all" ];
}
(lib.mkIf cfg.enable {
my.hm = {
programs.starship = {
enable = true;
settings = lib.recursiveUpdate (with builtins; fromTOML (readFile ./starship-preset.toml)) {
add_newline = false;
nix_shell.disabled = true;
format = lib.concatStringsSep "" cfg.format;
};
};
};
})
];
}