From d02941e2dec88eddde5040a04998b2b366fdc65a Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Thu, 19 Mar 2026 08:39:16 +0000 Subject: [PATCH] Working on reshuffling --- Droidnix/README.org | 30 ++++++++++++------- .../generated/modules/terminals/starship.nix | 30 ++++++++++++------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/Droidnix/README.org b/Droidnix/README.org index a30e68207..940fa6f32 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -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 diff --git a/Droidnix/generated/modules/terminals/starship.nix b/Droidnix/generated/modules/terminals/starship.nix index 06f1e5725..c49846fb0 100644 --- a/Droidnix/generated/modules/terminals/starship.nix +++ b/Droidnix/generated/modules/terminals/starship.nix @@ -1,16 +1,24 @@ -{ - 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; + }; }; }