Update fastfetch.nix
This commit is contained in:
parent
daaea80dd1
commit
42691f6f40
1 changed files with 16 additions and 16 deletions
|
|
@ -1,11 +1,16 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Install fastfetch
|
# Install fastfetch and nerd fonts
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
fastfetch
|
fastfetch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Install Nerd Fonts for icon support
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
(nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" "Meslo" ]; })
|
||||||
|
];
|
||||||
|
|
||||||
# Create the fastfetch config file with unicode icons
|
# Create the fastfetch config file with unicode icons
|
||||||
environment.etc."fastfetch/config.jsonc".text = ''
|
environment.etc."fastfetch/config.jsonc".text = ''
|
||||||
{
|
{
|
||||||
|
|
@ -122,25 +127,15 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Set up bash with fastfetch and a nice prompt
|
# Set up bash with fastfetch and a nice prompt
|
||||||
programs.bash.interactiveShellInit = ''
|
programs.bash.promptInit = ''
|
||||||
# Run fastfetch on terminal start (but not in non-interactive shells)
|
# Stylish prompt with icons
|
||||||
if [[ $- == *i* ]]; then
|
|
||||||
${pkgs.fastfetch}/bin/fastfetch --config /etc/fastfetch/config.jsonc
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Color definitions
|
# Color definitions
|
||||||
RESET="\[\033[0m\]"
|
RESET="\[\033[0m\]"
|
||||||
BOLD="\[\033[1m\]"
|
|
||||||
|
|
||||||
# Colors
|
|
||||||
CYAN="\[\033[0;36m\]"
|
CYAN="\[\033[0;36m\]"
|
||||||
BLUE="\[\033[0;34m\]"
|
BLUE="\[\033[0;34m\]"
|
||||||
PURPLE="\[\033[0;35m\]"
|
PURPLE="\[\033[0;35m\]"
|
||||||
GREEN="\[\033[0;32m\]"
|
GREEN="\[\033[0;32m\]"
|
||||||
YELLOW="\[\033[0;33m\]"
|
YELLOW="\[\033[0;33m\]"
|
||||||
RED="\[\033[0;31m\]"
|
|
||||||
|
|
||||||
# Bold colors
|
|
||||||
BCYAN="\[\033[1;36m\]"
|
BCYAN="\[\033[1;36m\]"
|
||||||
BBLUE="\[\033[1;34m\]"
|
BBLUE="\[\033[1;34m\]"
|
||||||
BPURPLE="\[\033[1;35m\]"
|
BPURPLE="\[\033[1;35m\]"
|
||||||
|
|
@ -151,9 +146,14 @@
|
||||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stylish prompt with icons
|
# Set the prompt
|
||||||
# Shows: ╭─ user@host ~/current/directory (git-branch)
|
|
||||||
# ╰─❯
|
|
||||||
PS1="''${RESET}''${BCYAN}╭─''${RESET} ''${BPURPLE}\u''${RESET}''${CYAN}@''${RESET}''${BBLUE}\h''${RESET} ''${BGREEN} \w''${RESET}''${YELLOW}\$(parse_git_branch)''${RESET}\n''${BCYAN}╰─''${BPURPLE}❯''${RESET} "
|
PS1="''${RESET}''${BCYAN}╭─''${RESET} ''${BPURPLE}\u''${RESET}''${CYAN}@''${RESET}''${BBLUE}\h''${RESET} ''${BGREEN} \w''${RESET}''${YELLOW}\$(parse_git_branch)''${RESET}\n''${BCYAN}╰─''${BPURPLE}❯''${RESET} "
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
programs.bash.interactiveShellInit = ''
|
||||||
|
# Run fastfetch on terminal start
|
||||||
|
if [[ $- == *i* ]]; then
|
||||||
|
${pkgs.fastfetch}/bin/fastfetch --config /etc/fastfetch/config.jsonc
|
||||||
|
fi
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue