some testing
This commit is contained in:
parent
7b13770c94
commit
44fc5f9792
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
myData,
|
myData,
|
||||||
@ -6,6 +7,13 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
nvme = "/dev/disk/by-id/nvme-WD_PC_SN810_SDCQNRY-1T00-1201_23234W800017";
|
nvme = "/dev/disk/by-id/nvme-WD_PC_SN810_SDCQNRY-1T00-1201_23234W800017";
|
||||||
|
timelapseScript = pkgs.writeShellApplication {
|
||||||
|
name = "timelapse-test";
|
||||||
|
text = ''
|
||||||
|
date >> /tmp/timelapse-test
|
||||||
|
sleep 5m
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@ -53,6 +61,18 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
timers.timelapse-test = {
|
||||||
|
timerConfig.onCalendar = "*-*-* *:*:30";
|
||||||
|
};
|
||||||
|
services.timelapse-test.serviceConfig = {
|
||||||
|
ExecStart = lib.getExe timelapseScript;
|
||||||
|
StateDirectory = "timelapse-test";
|
||||||
|
Type = "simple";
|
||||||
|
RuntimeMaxSec = "30s";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "${nvme}-part2";
|
device = "${nvme}-part2";
|
||||||
|
@ -61,7 +61,7 @@ in
|
|||||||
StateDirectory = "timelapse-r11";
|
StateDirectory = "timelapse-r11";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
RuntimeMaxSecs = "45s";
|
RuntimeMaxSec = "45s";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user