Created
March 19, 2018 17:19
-
-
Save coreyoconnor/776f64f43b7a7ea7bc7a1435dcefb7f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{config, pkgs, lib, ...}: | |
with lib; | |
{ | |
systemd.services.update-freemyip = | |
{ | |
description = "Updates FreeMyIP"; | |
path = [ pkgs.curl ]; | |
serviceConfig = | |
{ | |
Type = "oneshot"; | |
User = "nobody"; | |
}; | |
script = '' | |
set -ex | |
curl https://freemyip.com/update?token=$TOKEN | |
''; | |
}; | |
systemd.timers.update-freemyip = | |
{ | |
wantedBy = [ "timers.target" ]; | |
timerConfig = | |
{ | |
OnCalendar = "*:0/30"; | |
Persistent = "yes"; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment