38 lines
1.5 KiB
Nix
38 lines
1.5 KiB
Nix
{pkgs, ...}: let
|
|
# load the configuration that we was generated the first
|
|
# time zsh were loaded with powerlevel enabled.
|
|
# Make sure to comment this part (and the sourcing part below)
|
|
# before you ran powerlevel for the first time or if you want to run
|
|
# again 'p10k configure'. Then, copy the generated file as:
|
|
# $ mv ~/.p10k.zsh p10k-config/p10k.zsh
|
|
configThemeNormal = ./p10k-config/p10k.zsh;
|
|
configThemeTTY = ./p10k-config/p10k_tty.zsh;
|
|
in {
|
|
fonts.fontconfig.enable = true;
|
|
home.packages = with pkgs; [
|
|
# Meslo Nerd Font patched for Powerlevel10k
|
|
# Restart Konsole and configure it (profile) to choose MesloLGS NF
|
|
meslo-lgs-nf
|
|
];
|
|
programs.zsh = {
|
|
initExtra = ''
|
|
# It would be hella cool if something were to work, but alas
|
|
# The powerlevel theme I'm using is distgusting in TTY, let's default
|
|
# to something else
|
|
# See https://github.com/romkatv/powerlevel10k/issues/325
|
|
# Instead of sourcing this file you could also add another plugin as
|
|
# this, and it will automatically load the file for us
|
|
# (but this way it is not possible to conditionally load a file)
|
|
# {
|
|
# name = "powerlevel10k-config";
|
|
# src = lib.cleanSource ./p10k-config;
|
|
# file = "p10k.zsh";
|
|
# }
|
|
if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then
|
|
[[ ! -f ${configThemeNormal} ]] || source /home/kdb424/.zsh/plugins/powerlevel10k
|
|
else
|
|
[[ ! -f ${configThemeTTY} ]] || source ${configThemeTTY}
|
|
fi
|
|
'';
|
|
};
|
|
}
|