helm/hosts/profiles/sync/website/default.nix

36 lines
784 B
Nix
Raw Normal View History

2022-12-06 08:01:17 -08:00
{ pkgs, ... }:
2022-09-18 15:13:50 -07:00
{
systemd.services.website-deploy = {
serviceConfig.Type = "oneshot";
path = [
pkgs.git
pkgs.coreutils
pkgs.nixUnstable
pkgs.openssh
2022-12-06 08:01:17 -08:00
pkgs.deploy
2022-09-18 15:13:50 -07:00
];
script = ''
cd /etc/nixos/ # TODO make variable
nix flake lock --update-input poonam
nix flake lock --update-input basant
# TODO
# git add flake.lock
# git commit -m "update website"
# git push
2022-12-06 20:38:29 -08:00
deploy .#cube
2022-09-18 15:13:50 -07:00
exit 0
'';
serviceConfig = {
User = "anish";
};
};
systemd.timers.website-deploy = {
after = [ "kitaab-sync.timer" ];
wantedBy = [ "timers.target" ];
partOf = [ "website-deploy.service" ];
timerConfig.OnCalendar = [ "daily" ];
timerConfig.persistent = "true";
};
}