btop: add module
This commit is contained in:
parent
960c009ce0
commit
de079ec371
10 changed files with 140 additions and 0 deletions
4
tests/modules/programs/btop/default.nix
Normal file
4
tests/modules/programs/btop/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
btop-example-settings = ./example-settings.nix;
|
||||
btop-empty-settings = ./empty-settings.nix;
|
||||
}
|
||||
11
tests/modules/programs/btop/empty-settings.nix
Normal file
11
tests/modules/programs/btop/empty-settings.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.btop.enable = true;
|
||||
|
||||
test.stubs.btop = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/btop
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
disks_filter = "exclude=/foo/bar"
|
||||
io_graph_combined = True
|
||||
io_graph_speeds = ""
|
||||
log_level = "DEBUG"
|
||||
show_io_stat = False
|
||||
update_ms = 1000
|
||||
|
||||
clock_format = "%H:%M"
|
||||
|
||||
34
tests/modules/programs/btop/example-settings.nix
Normal file
34
tests/modules/programs/btop/example-settings.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
|
||||
settings = {
|
||||
# Integer
|
||||
update_ms = 1000;
|
||||
|
||||
# Boolean
|
||||
show_io_stat = false;
|
||||
io_graph_combined = true;
|
||||
|
||||
# String
|
||||
disks_filter = "exclude=/foo/bar";
|
||||
log_level = "DEBUG";
|
||||
|
||||
# Empty string
|
||||
io_graph_speeds = "";
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
clock_format = "%H:%M"
|
||||
'';
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/btop/btop.conf \
|
||||
${./example-settings-expected.conf}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue