1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

tomat: init service (#8138)

This commit is contained in:
Johan Larsson 2025-11-06 17:44:08 +01:00 committed by GitHub
parent ba15db2a15
commit 2907788315
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 127 additions and 0 deletions

View file

@ -0,0 +1,5 @@
{ lib, pkgs, ... }:
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
tomat-service = ./tomat.nix;
}

View file

@ -0,0 +1,3 @@
[timer]
break = 10
work = 60

View file

@ -0,0 +1,11 @@
[Install]
WantedBy=default.target
[Service]
ExecStart=@tomat@/bin/tomat daemon run
Restart=always
RestartSec=5
[Unit]
After=graphical.target
Description=Tomat Pomodoro server

View file

@ -0,0 +1,25 @@
{
services.tomat = {
enable = true;
settings = {
timer = {
break = 10;
work = 60;
};
};
};
nmt.script =
let
serviceFile = "home-files/.config/systemd/user/tomat.service";
configFile = "home-files/.config/tomat/config.toml";
in
''
assertFileExists "${serviceFile}"
assertFileExists "${configFile}"
assertFileContent "${serviceFile}" ${./expected.service}
assertFileContent "${configFile}" ${./expected-config.toml}
'';
}