mirror of
https://github.com/nix-community/home-manager
synced 2024-12-13 05:19:50 +01:00
acf106ced0
This more readily allows merging configurations. Fixes #1023
49 lines
1 KiB
Nix
49 lines
1 KiB
Nix
{ 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}
|
||
'';
|
||
};
|
||
}
|