+20
packetmix/systems/teal/patisserie-autoupdate.nix
+20
packetmix/systems/teal/patisserie-autoupdate.nix
···
···
1
+
{ pkgs }: {
2
+
systemd.services."patisserie-autoupdate" = {
3
+
startAt = "00:00:00";
4
+
script = let
5
+
jj = "${pkgs.jujutsu}/bin/jj";
6
+
npins = "${pkgs.npins}/bin/npins";
7
+
in ''
8
+
GIT_SSH_COMMAND="ssh -i /etc/ssh/ssh_host_ed25519_key"
9
+
${jj} git fetch
10
+
${jj} new main@origin
11
+
${npins} update
12
+
${jj} desc -m "chore(packetmix): Auto update packages"
13
+
${jj} bookmark s auto/npins-update
14
+
${jj} git push --force
15
+
'';
16
+
serviceConfig.WorkingDirectory = "/root/patisserie";
17
+
};
18
+
19
+
clicks.storage.impermanance.persist.directories = [ "/root/patisserie" ];
20
+
}