From 0ffffc4bb881a5e2f59681ce8e190912e0290d82 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Mon, 29 Apr 2024 20:41:00 +0200 Subject: [PATCH] Add starship theming --- home-manager/shared/default.nix | 1 + home-manager/shared/shell/starship.nix | 50 ++++++++++++++++++++++++++ home-manager/shared/shell/zsh.nix | 6 ---- 3 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 home-manager/shared/shell/starship.nix diff --git a/home-manager/shared/default.nix b/home-manager/shared/default.nix index 80c814e..b82b547 100644 --- a/home-manager/shared/default.nix +++ b/home-manager/shared/default.nix @@ -10,6 +10,7 @@ ./shell/helix.nix ./shell/zellij.nix ./shell/zsh.nix + ./shell/starship.nix ]; home = { username = "lillian"; diff --git a/home-manager/shared/shell/starship.nix b/home-manager/shared/shell/starship.nix new file mode 100644 index 0000000..e07cd6b --- /dev/null +++ b/home-manager/shared/shell/starship.nix @@ -0,0 +1,50 @@ +{ + lib, + pkgs, + ... +}: { + programs.starship = let + flavour = "macchiato"; # One of `latte`, `frappe`, `macchiato`, or `mocha` + in { + enable = true; + settings = + { + add_newline = true; + format = lib.concatStrings [ + "$sudo" + "$all" + ]; + character.success_symbol = "[➜](bold purple)"; + package.disabled = true; + sudo = { + symbol = "witch "; + style = "bold blue"; + format = "[$symbol]($style)"; + disabled = false; + }; + hostname = { + ssh_only = false; + format = "[$hostname](bold yellow)[$ssh_symbol](bold blue):"; + trim_at = ""; + disabled = false; + }; + username = { + show_always = true; + format = "[$user]($style)@"; + }; + git_branch.style = "bold blue"; + directory.style = "bold blue"; + direnv.disabled = false; + palette = "catppuccin_${flavour}"; + } + // builtins.fromTOML (builtins.readFile + (pkgs.fetchFromGitHub + { + owner = "catppuccin"; + repo = "starship"; + rev = "5629d23"; # Replace with the latest commit hash + sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0="; + } + + /palettes/${flavour}.toml)); + }; +} diff --git a/home-manager/shared/shell/zsh.nix b/home-manager/shared/shell/zsh.nix index c595187..aab67f2 100644 --- a/home-manager/shared/shell/zsh.nix +++ b/home-manager/shared/shell/zsh.nix @@ -6,12 +6,6 @@ pkgs, ... }: { - # Enable starship - programs.starship = { - enable = true; - catppuccin.enable = true; - }; - programs.zoxide = { enable = true; };