Last active
February 18, 2021 04:28
-
-
Save InternetUnexplorer/32afbf1c1cc862c62c7107ff10cb069f to your computer and use it in GitHub Desktop.
Systemd timer/service file and hooks for nix-channel-watcher
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
#! /usr/bin/env bash | |
REPOSITORY=InternetUnexplorer/kwin-lowlatency-overlay | |
set -eu | |
source .secrets | |
curl -X POST \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token $GITHUB_TOKEN" \ | |
-d "{\"event_type\": \"Build: $1@${3:0:10}\", \"client_payload\": {\"channel\": \"$1\"}}" \ | |
https://api.github.com/repos/$REPOSITORY/dispatches |
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
[Unit] | |
Description=check for Nix channel updates | |
[Service] | |
Type=oneshot | |
User=nix-channel-watcher | |
ExecStart=/var/lib/nix-channel-watcher/channel-watcher.py | |
WorkingDirectory=/var/lib/nix-channel-watcher | |
TimeoutSec=30 |
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
[Unit] | |
Description=check for Nix channel updates every two minutes | |
[Timer] | |
OnCalendar=*:0/2 | |
AccuracySec=15 | |
[Install] | |
WantedBy=timers.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment