This commit is contained in:
Robin Appelman 2025-06-02 21:21:11 +02:00
commit a3818da108
6 changed files with 42 additions and 41 deletions

View file

@ -4,8 +4,8 @@ Trigger webhooks from rss/atom feeds.
Send a `POST` request to a webhook every time an rss/atom feed changes. Send a `POST` request to a webhook every time an rss/atom feed changes.
Note that this will only detect changes made while the program is running, it is not able to detect changes made to Note that this will only detect changes made while the program is running, it is
the feeds on program start. not able to detect changes made to the feeds on program start.
### Configuration ### Configuration

View file

@ -1,6 +1,6 @@
{ dockerTools {
, rss-webhook-trigger dockerTools,
, rss-webhook-trigger,
}: }:
dockerTools.buildLayeredImage { dockerTools.buildLayeredImage {
name = "icewind1991/rss-webhook-trigger"; name = "icewind1991/rss-webhook-trigger";

View file

@ -10,13 +10,14 @@
inputs.flakelight.follows = "flakelight"; inputs.flakelight.follows = "flakelight";
}; };
}; };
outputs = { mill-scale, ... }: mill-scale ./. { outputs = {mill-scale, ...}:
mill-scale ./. {
nixosModules = {outputs, ...}: { nixosModules = {outputs, ...}: {
default = default = {
{ pkgs pkgs,
, config config,
, lib lib,
, ... ...
}: { }: {
imports = [./nix/module.nix]; imports = [./nix/module.nix];
config = lib.mkIf config.services.rss-webhook-trigger.enable { config = lib.mkIf config.services.rss-webhook-trigger.enable {

View file

@ -1,7 +1,8 @@
{ config {
, lib config,
, pkgs lib,
, ... pkgs,
...
}: }:
with lib; let with lib; let
cfg = config.services.rss-webhook-trigger; cfg = config.services.rss-webhook-trigger;
@ -9,8 +10,7 @@ with lib; let
configFile = format.generate "trigger.toml" { configFile = format.generate "trigger.toml" {
feed = cfg.hooks; feed = cfg.hooks;
}; };
in in {
{
options.services.rss-webhook-trigger = { options.services.rss-webhook-trigger = {
enable = mkEnableOption "Enables the rss-webhook-trigger service"; enable = mkEnableOption "Enables the rss-webhook-trigger service";

View file

@ -1,7 +1,7 @@
{ rustPlatform {
, lib rustPlatform,
}: lib,
let }: let
inherit (lib.sources) sourceByRegex; inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile; inherit (builtins) fromTOML readFile;
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"]; src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];