mirror of
https://github.com/davegallant/nix-config
synced 2025-08-07 00:58:16 +00:00
21 lines
520 B
Nix
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}";
|
|
};
|
|
};
|
|
|
|
}
|