Skip to content

Commit b13cc4f

Browse files
committed
update
1 parent 9851abd commit b13cc4f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/services/commit-notifier.nix

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@
2626
environment = {
2727
RUST_LOG = "info";
2828
};
29-
postStart = "mkdir -p /var/lib/commit-notifier/chats/696869490";
30-
script = ''
31-
export TELOXIDE_TOKEN=$(cat "/secret/telegram-bot-token")
32-
export GITHUB_TOKEN=$(cat "/secret/github-no-premission")
33-
${pkgs.commit-notifier}/bin/commit-notifier --working-dir /var/lib/commit-notifier --cron "0 * * * * *" --admin-chat-id=696869490
34-
'';
35-
serviceConfig.StateDirectory = "commit-notifier";
29+
30+
serviceConfig = {
31+
Type = "oneshot";
32+
EnvironmentFile = "/secret/commit-notifier";
33+
StateDirectory = "commit-notifier";
34+
ExecStart = "${pkgs.commit-notifier}/bin/commit-notifier --working-dir /var/lib/commit-notifier --cron "0 * * * * *" --admin-chat-id=696869490";
35+
ExecStartPost="mkdir -p /var/lib/commit-notifier/chats/696869490";
36+
};
37+
3638
wants = [ "network-online.target" ];
3739
after = [ "network-online.target" ];
3840
wantedBy = [ "multi-user.target" ];

0 commit comments

Comments
 (0)