Working on reshuffling
This commit is contained in:
+19
-11
@@ -1303,20 +1303,28 @@ This file sets up Kitty terminal
|
||||
** =generated/modules/terminals/starship.nix=
|
||||
This file sets up starship prompt
|
||||
#+BEGIN_SRC nix :tangle generated/modules/terminals/starship.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
flakeRoot,
|
||||
...
|
||||
}:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
starshipConfig = lib.importTOML (flakeRoot + "/assets/system/conf/starship.toml");
|
||||
# Absolute path to the Starship config in the flake
|
||||
starshipAssets = ../../../assets/system/conf/starship.toml;
|
||||
|
||||
# Read the TOML file (or import if you need structured content)
|
||||
starshipConfig = lib.importTOML starshipAssets;
|
||||
|
||||
# Toggle for enabling Starship
|
||||
enableStarship = true;
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = starshipConfig;
|
||||
# Declare an option so this module is configurable
|
||||
options.enableStarship = lib.mkEnableOption "Enable Starship prompt";
|
||||
|
||||
# All runtime config goes under `config`
|
||||
config = lib.mkIf enableStarship {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = starshipConfig;
|
||||
};
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
Reference in New Issue
Block a user