mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 08:49:44 +01:00
cb09a968e9
This option provides a more convenient way to overlay dummy packages. It also adds a function `config.lib.test.mkStubPackage` that can, e.g., be used for `package` options.
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
||
|
||
with lib;
|
||
|
||
{
|
||
config = {
|
||
programs.starship = {
|
||
enable = true;
|
||
|
||
settings = mkMerge [
|
||
{
|
||
add_newline = false;
|
||
format = 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";
|
||
}];
|
||
}
|
||
];
|
||
};
|
||
|
||
test.stubs.starship = { };
|
||
|
||
nmt.script = ''
|
||
assertFileContent \
|
||
home-files/.config/starship.toml \
|
||
${./settings-expected.toml}
|
||
'';
|
||
};
|
||
}
|