move starship configuration to home/modules.

This commit is contained in:
ulic-youthlic 2025-01-11 20:36:27 +08:00
parent da06f1018e
commit d412f2641d
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
6 changed files with 38 additions and 17 deletions

View file

@ -0,0 +1,36 @@
{ lib, config, ... }:
let
cfg = config.youthlic.programs.starship;
in
{
options = {
youthlic.programs.starship = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
whether enable starship
'';
};
};
};
config = lib.mkIf cfg.enable {
programs.starship = lib.mkMerge [
{
enable = true;
settings =
let
config-file = builtins.readFile ./config.toml;
in
builtins.fromTOML config-file;
}
(lib.mkIf config.youthlic.programs.fish.enable {
enableFishIntegration = true;
})
(lib.mkIf config.youthlic.programs.bash.enable {
enableBashIntegration = true;
})
];
};
}