Files
nix-config/common/changedetection.io/default.nix
2021-08-13 21:15:45 -04:00

21 lines
520 B
Nix

{ config, pkgs, ... }:
let
changedetectionDir = "/var/lib/changedetection.io/";
in
{
systemd.services.changedetection = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
preStart = ''
mkdir -p ${changedetectionDir}/datastore
'';
serviceConfig = {
Type = "forking";
ExecStart = "${pkgs.changedetection.io}/bin/changedetection.py -d ${changedetectionDir}/datastore";
Restart = "on-failure";
WorkingDirectory = "${changedetectionDir}";
};
};
}