{ lib, ... }: let # Load the Starship TOML config starshipAssets = ../../../assets/system/conf/starship.toml; starshipConfig = lib.importTOML starshipAssets; enableStarship = true; # toggle on/off in { # Declare an enable option options.enableStarship = lib.mkEnableOption "Enable Starship prompt"; # Wrap everything safely in `config` to avoid undefined `programs` config = lib.mkIf enableStarship { programs.starship = { enable = true; assetsDir = ../../../assets/system/conf; files = { "starship.toml" = starshipConfig; }; }; }; }