Files
nixos/Droidnix/generated/parked/terminals/starship.nix
T
2026-03-21 19:47:47 +00:00

33 lines
802 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 a top-level module option
options.starship = {
enable = lib.mkEnableOption "Enable Starship prompt";
configFiles = lib.mkOption {
type = lib.types.attrsOf lib.types.any;
default = {};
description = "Symbolic Starship configuration files";
};
};
# Populate the option safely
config = lib.mkIf enableStarship {
starship.enable = true;
starship.configFiles = {
"starship.toml" = starshipConfig;
assetsDir = ../../../assets/system/conf;
};
};
}