mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 00:59: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.
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
config = {
|
|
programs.ncmpcpp = {
|
|
enable = true;
|
|
mpdMusicDir = "/home/user/music";
|
|
|
|
settings = {
|
|
user_interface = "alternative";
|
|
display_volume_level = false;
|
|
playlist_disable_highlight_delay = 0;
|
|
};
|
|
|
|
bindings = [
|
|
{
|
|
key = "j";
|
|
command = "scroll_down";
|
|
}
|
|
{
|
|
key = "k";
|
|
command = "scroll_up";
|
|
}
|
|
{
|
|
key = "J";
|
|
command = [ "select_item" "scroll_down" ];
|
|
}
|
|
{
|
|
key = "K";
|
|
command = [ "select_item" "scroll_up" ];
|
|
}
|
|
{
|
|
key = "x";
|
|
command = "delete_playlist_items";
|
|
}
|
|
{
|
|
key = "x";
|
|
command = "delete_browser_items";
|
|
}
|
|
{
|
|
key = "x";
|
|
command = "delete_stored_playlist";
|
|
}
|
|
];
|
|
};
|
|
|
|
test.stubs.ncmpcpp = { };
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.config/ncmpcpp/config \
|
|
${./ncmpcpp-example-settings-expected-config}
|
|
|
|
assertFileContent \
|
|
home-files/.config/ncmpcpp/bindings \
|
|
${./ncmpcpp-example-settings-expected-bindings}
|
|
'';
|
|
};
|
|
}
|