comodoro: add module

This commit is contained in:
Clément DOUIN 2023-04-14 23:41:51 +02:00 committed by Robert Helgesson
parent 194086df82
commit e0034971f9
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
11 changed files with 193 additions and 0 deletions

View 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}
'';
}

View file

@ -0,0 +1 @@
{ comodoro-program = ./comodoro.nix; }

View 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"