options follow my.schema to avoid conflicts
This commit is contained in:
26
modules/systemd-user/tasks.nix
Normal file
26
modules/systemd-user/tasks.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
jawzTasks =
|
||||
pkgs.writeScriptBin "tasks" (builtins.readFile ../../scripts/tasks.sh);
|
||||
description = "Run a tasks script which keeps a lot of things organized";
|
||||
in {
|
||||
systemd.user = {
|
||||
services.tasks = {
|
||||
restartIfChanged = true;
|
||||
description = description;
|
||||
wantedBy = [ "default.target" ];
|
||||
path = [ pkgs.bash pkgs.nix jawzTasks ];
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
ExecStart = "${jawzTasks}/bin/tasks";
|
||||
};
|
||||
};
|
||||
timers.tasks = {
|
||||
enable = true;
|
||||
description = description;
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = { OnCalendar = "*:0/10"; };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user