Use ghostty, starship and remove powerlevel 10k
This commit is contained in:
25
modules/shell/starship.nix
Normal file
25
modules/shell/starship.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.samfelag.modules.shell.starship;
|
||||
in
|
||||
{
|
||||
options.samfelag.modules.shell.starship = {
|
||||
enable = lib.mkEnableOption "A prompt for any shell";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
hm.programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
|
||||
# character = {
|
||||
# success_symbol = "[➜](bold green)";
|
||||
# error_symbol = "[➜](bold red)";
|
||||
# };
|
||||
|
||||
# package.disabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -11,7 +11,6 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh
|
||||
zsh-powerlevel10k
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
@@ -24,11 +23,6 @@ in
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
initContent = let
|
||||
zshConfigBeforeCompInit = lib.mkOrder 550 ''
|
||||
# p10k instant prompt
|
||||
P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
[[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT"
|
||||
'';
|
||||
zshConfig = lib.mkOrder 1000 ''
|
||||
# Source generic (bash) configuration
|
||||
if [ -d $HOME/.config/shell/sh ]; then
|
||||
@@ -46,7 +40,6 @@ in
|
||||
'';
|
||||
in
|
||||
lib.mkMerge [
|
||||
zshConfigBeforeCompInit
|
||||
zshConfig
|
||||
];
|
||||
|
||||
@@ -59,11 +52,6 @@ in
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
name = "powerlevel10k";
|
||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
@@ -74,10 +62,14 @@ in
|
||||
sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "vi-mode";
|
||||
src = pkgs.zsh-vi-mode;
|
||||
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
hm.xdg.configFile."zsh/.p10k.zsh".source = ../../config/zsh/.p10k.zsh;
|
||||
|
||||
samfelag.modules.shell.starship.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user