comodoro: add module
This commit is contained in:
parent
194086df82
commit
e0034971f9
11 changed files with 193 additions and 0 deletions
35
tests/modules/programs/comodoro/comodoro.nix
Normal file
35
tests/modules/programs/comodoro/comodoro.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.comodoro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
test-preset = {
|
||||
cycles = [
|
||||
{
|
||||
name = "Work";
|
||||
duration = 1500;
|
||||
}
|
||||
{
|
||||
name = "Rest";
|
||||
duration = 500;
|
||||
}
|
||||
];
|
||||
|
||||
tcp-host = "localhost";
|
||||
tcp-port = 8080;
|
||||
|
||||
on-server-start = "echo server started";
|
||||
on-timer-stop = "echo timer stopped";
|
||||
on-work-begin = "echo work cycle began";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.comodoro = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/comodoro/config.toml
|
||||
assertFileContent home-files/.config/comodoro/config.toml ${./expected.toml}
|
||||
'';
|
||||
}
|
||||
1
tests/modules/programs/comodoro/default.nix
Normal file
1
tests/modules/programs/comodoro/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ comodoro-program = ./comodoro.nix; }
|
||||
13
tests/modules/programs/comodoro/expected.toml
Normal file
13
tests/modules/programs/comodoro/expected.toml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[test-preset]
|
||||
on-server-start = "echo server started"
|
||||
on-timer-stop = "echo timer stopped"
|
||||
on-work-begin = "echo work cycle began"
|
||||
tcp-host = "localhost"
|
||||
tcp-port = 8080
|
||||
[[test-preset.cycles]]
|
||||
duration = 1500
|
||||
name = "Work"
|
||||
|
||||
[[test-preset.cycles]]
|
||||
duration = 500
|
||||
name = "Rest"
|
||||
Loading…
Add table
Add a link
Reference in a new issue