From 41d2200b2eb5cf759802aa708327e12d7421a890 Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Fri, 24 Oct 2025 09:57:05 +0530 Subject: [PATCH] refactor(git): update configuration to use centralized email setting refactor(starship): enhance config with palette and external TOML file --- home/programs/git.nix | 9 +++++---- home/programs/starship.nix | 32 ++++++++++++++++++++------------ 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/home/programs/git.nix b/home/programs/git.nix index 697bdf63..d345857e 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -1,14 +1,15 @@ { pkgs, - lib, - device, + config, ... }: { programs.git = { enable = true; lfs.enable = true; - userName = "uttarayan21"; - userEmail = "email@uttarayan.me"; + settings = { + user.name = "uttarayan21"; + user.email = config.accounts.email.accounts.fastmail.address; + }; extraConfig = { color.ui = true; core.editor = "nvim"; diff --git a/home/programs/starship.nix b/home/programs/starship.nix index 38006abb..61ff3e8e 100644 --- a/home/programs/starship.nix +++ b/home/programs/starship.nix @@ -4,21 +4,29 @@ device, ... }: { + stylix.targets.starship.enable = false; programs.starship = { enable = true; enableFishIntegration = true; enableNushellIntegration = true; - settings = { - format = "$all$character"; - character = { - success_symbol = "[[OK](bold green) ❯](maroon)"; - error_symbol = "[❯](red)"; - vimcmd_symbol = "[❮](green)"; - }; - directory = { - truncation_length = 4; - style = "bold lavender"; - }; - }; + settings = let + flavour = "mocha"; # Replace with your preferred palette + in + { + # Check https://starship.rs/config/#prompt + format = "$all$character"; + palette = "catppuccin_${flavour}"; + character = { + success_symbol = "[[OK](bold green) ❯](maroon)"; + error_symbol = "[❯](red)"; + vimcmd_symbol = "[❮](green)"; + }; + directory = { + truncation_length = 4; + style = "bold lavender"; + }; + } + // builtins.fromTOML (builtins.readFile + (pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml)); }; }