29 lines
681 B
Nix
29 lines
681 B
Nix
{ lib, ... }:
|
|
|
|
let
|
|
# Path to your Starship config inside the flake
|
|
starshipAssets = ../../../assets/system/conf/starship.toml;
|
|
|
|
# Read and parse the TOML file as a symbolic value
|
|
starshipConfig = lib.importTOML starshipAssets;
|
|
|
|
# Toggle on/off
|
|
enableStarship = true;
|
|
in
|
|
{
|
|
# Declare an enable option
|
|
options.enableStarship = lib.mkEnableOption "Enable Starship prompt";
|
|
|
|
# Wrap all configuration safely
|
|
config = lib.mkIf enableStarship {
|
|
# Symbolic attributes only — fully self-contained
|
|
myStarship = {
|
|
enable = true;
|
|
assetsDir = ../../../assets/system/conf;
|
|
files = {
|
|
"starship.toml" = starshipConfig;
|
|
};
|
|
};
|
|
};
|
|
}
|