Working on reshuffling
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{ 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user