feat: shpool
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user