helm/profiles/sync/website/default.nix

28 lines
568 B
Nix
Raw Normal View History

2022-03-24 06:06:10 -07:00
{ pkgs, ... }:
2021-11-29 04:11:58 -08:00
{
2022-06-22 06:14:35 -07:00
systemd.services.website-deploy = {
2021-11-29 04:11:58 -08:00
serviceConfig.Type = "oneshot";
path = [
2022-03-24 06:06:10 -07:00
pkgs.git
2022-06-14 06:27:01 -07:00
pkgs.coreutils
2022-03-24 06:06:10 -07:00
];
2021-11-29 04:11:58 -08:00
script = ''
2022-06-22 06:14:35 -07:00
cd /etc/nixos/
nix develop
nix flake lock --update-input poonam
deploy .#cube --hostname lakhwara.com
2022-06-14 06:27:01 -07:00
exit 0
2022-03-24 06:06:10 -07:00
'';
2022-06-14 06:27:01 -07:00
serviceConfig = {
User = "anish";
};
2021-11-29 04:11:58 -08:00
};
2022-06-22 06:14:35 -07:00
systemd.timers.website-deploy = {
after = [ "kitaab-sync.timer" ];
2021-11-29 04:11:58 -08:00
wantedBy = [ "timers.target" ];
2022-06-22 06:14:35 -07:00
partOf = [ "website-deploy.service" ];
2022-06-14 06:27:01 -07:00
timerConfig.OnCalendar = [ "daily" ];
2021-11-29 04:11:58 -08:00
};
}