1
0
mirror of https://github.com/nix-community/home-manager synced 2024-07-02 19:38:32 +02:00
home-manager/tests/modules/programs/starship/settings.nix
Robert Helgesson acf106ced0
starship: give settings option more specific type
This more readily allows merging configurations.

Fixes #1023
2020-02-29 22:17:47 +01:00

50 lines
1.0 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.

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.starship = {
enable = true;
settings = mkMerge [
{
add_newline = false;
prompt_order = [ "line_break" "package" "line_break" "character" ];
scan_timeout = 10;
character.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";
}];
}
];
};
nixpkgs.overlays = [
(self: super: { starship = pkgs.writeScriptBin "dummy-starship" ""; })
];
nmt.script = ''
assertFileContent \
home-files/.config/starship.toml \
${./settings-expected.toml}
'';
};
}