move sync into submodules

This commit is contained in:
Anish L 2022-06-22 23:14:35 +10:00
parent e8151a418c
commit ccf57f5984
4 changed files with 28 additions and 1 deletions

View file

@ -18,7 +18,7 @@
User = "anish";
};
};
systemd.timers.kitaab-timer = {
systemd.timers.kitaab-sync = {
wantedBy = [ "timers.target" ];
partOf = [ "kitaab-sync.service" ];
timerConfig.OnCalendar = [ "daily" ];

View file

@ -0,0 +1,27 @@
{ pkgs, ... }:
{
systemd.services.website-deploy = {
serviceConfig.Type = "oneshot";
path = [
pkgs.git
pkgs.coreutils
];
script = ''
cd /etc/nixos/
nix develop
nix flake lock --update-input poonam
deploy .#cube --hostname lakhwara.com
exit 0
'';
serviceConfig = {
User = "anish";
};
};
systemd.timers.website-deploy = {
after = [ "kitaab-sync.timer" ];
wantedBy = [ "timers.target" ];
partOf = [ "website-deploy.service" ];
timerConfig.OnCalendar = [ "daily" ];
};
}