2023-05-17 17:10:18 +01:00
|
|
|
{pkgs, ...}: {
|
2023-05-16 13:54:05 +01:00
|
|
|
systemd.timers."nixos-pull-config" = {
|
2023-05-17 17:10:18 +01:00
|
|
|
wantedBy = ["timers.target"];
|
2023-05-16 13:54:05 +01:00
|
|
|
description = "Timer to update /etc/nixos/config/ repository";
|
|
|
|
timerConfig = {
|
|
|
|
OnBootSec = "5m";
|
|
|
|
OnUnitActiveSec = "5m";
|
|
|
|
Unit = "hello-world.service";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
systemd.services."nixos-pull-config" = {
|
|
|
|
script = ''
|
|
|
|
${pkgs.git}/bin/git pull -C /etc/nixos/config/ --ff-only --no-edit
|
|
|
|
'';
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
User = "root";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|