1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-13 20:41:07 +01:00
home-manager/tests/modules/programs/starship/settings.nix

58 lines
1.2 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, ... }:
{
programs.starship = {
enable = true;
settings = lib.mkMerge [
{
add_newline = false;
format = lib.concatStrings [
"$line_break"
"$package"
"$line_break"
"$character"
];
scan_timeout = 10;
character = {
success_symbol = "";
error_symbol = "";
};
package.disabled = true;
memory_usage.threshold = -1;
aws.style = "bold blue";
battery = {
charging_symbol = "";
display = [
{
threshold = 10;
style = "bold red";
}
];
};
}
{
aws.disabled = true;
battery.display = [
{
threshold = 30;
style = "bold yellow";
}
];
}
];
};
nmt.script = ''
sessionVarsFile=home-path/etc/profile.d/hm-session-vars.sh
assertFileExists $sessionVarsFile
assertFileContains $sessionVarsFile \
'export STARSHIP_CONFIG="/home/hm-user/.config/starship.toml"'
assertFileContent \
home-files/.config/starship.toml \
${./settings-expected.toml}
'';
}