Skip to content

Commit 99b01be

Browse files
committed
fix evaluation under lix
1 parent af7bd60 commit 99b01be

File tree

1 file changed

+27
-29
lines changed

1 file changed

+27
-29
lines changed

host/permafrost/default.nix

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -211,37 +211,35 @@ in
211211
];
212212

213213
# TODO: Upload from zfs snapshot
214-
systemd = {
215-
services.upload =
216-
let
217-
hc-id = "1766fc92-dd2b-46b0-afe8-a692118e8ab0";
218-
in
219-
{
220-
description = "Upload backups to remote";
221-
after = [ "network.target" ];
222-
environment = {
223-
HOME = "/root";
224-
};
225-
unitConfig = {
226-
ConditionPathExists =
227-
map
228-
(user: "${user.home}/config")
229-
(filter
230-
(user: hasPrefix "/backup/" user.home)
231-
(attrValues config.users.users)
232-
);
233-
};
234-
script = ''
235-
${pkgs.curl}/bin/curl -fs -m 10 --retry 5 -o /dev/null https://hc-ping.com/${hc-id}/start
236-
${pkgs.rclone}/bin/rclone sync -vv --track-renames --exclude-from /backup/.rcloneignore /backup jotta-archive:permafrost
237-
${pkgs.curl}/bin/curl -fs -m 10 --retry 5 -o /dev/null https://hc-ping.com/${hc-id}/$?
238-
'';
214+
systemd.services.upload =
215+
let
216+
hc-id = "1766fc92-dd2b-46b0-afe8-a692118e8ab0";
217+
in
218+
{
219+
description = "Upload backups to remote";
220+
after = [ "network.target" ];
221+
environment = {
222+
HOME = "/root";
223+
};
224+
unitConfig = {
225+
ConditionPathExists =
226+
map
227+
(user: "${user.home}/config")
228+
(filter
229+
(user: hasPrefix "/backup/" user.home)
230+
(attrValues config.users.users)
231+
);
239232
};
240-
timers.upload = {
241-
wantedBy = [ "timers.target" ];
242-
partOf = [ "upload.service" ];
243-
timerConfig.OnCalendar = "*-*-* 02:00:00";
233+
script = ''
234+
${pkgs.curl}/bin/curl -fs -m 10 --retry 5 -o /dev/null https://hc-ping.com/${hc-id}/start
235+
${pkgs.rclone}/bin/rclone sync -vv --track-renames --exclude-from /backup/.rcloneignore /backup jotta-archive:permafrost
236+
${pkgs.curl}/bin/curl -fs -m 10 --retry 5 -o /dev/null https://hc-ping.com/${hc-id}/$?
237+
'';
244238
};
239+
systemd.timers.upload = {
240+
wantedBy = [ "timers.target" ];
241+
partOf = [ "upload.service" ];
242+
timerConfig.OnCalendar = "*-*-* 02:00:00";
245243
};
246244

247245
system.stateVersion = "23.05";

0 commit comments

Comments
 (0)