diff --git a/hosts/bicep/services/matrix/hookshot/default.nix b/hosts/bicep/services/matrix/hookshot/default.nix index 4c64494f..259477d1 100644 --- a/hosts/bicep/services/matrix/hookshot/default.nix +++ b/hosts/bicep/services/matrix/hookshot/default.nix @@ -3,7 +3,7 @@ let cfg = config.services.matrix-hookshot; webhookListenAddress = "127.0.0.1"; - webhookListenPort = 9000; + webhookListenPort = 8435; in { imports = [ @@ -28,7 +28,7 @@ in settings = { bridge = { bindAddress = "127.0.0.1"; - domain = "pvv.ntnu,no"; + domain = "pvv.ntnu.no"; url = "https://matrix.pvv.ntnu.no"; mediaUrl = "https://matrix.pvv.ntnu.no"; port = 9993; @@ -48,10 +48,43 @@ in generic = { enabled = true; outbound = true; + urlPrefix = "https://hookshot.pvv.ntnu.no/webhook/"; + userIdPrefix = "_webhooks_"; + allowJsTransformationFunctions = false; + waitForComplete = false; }; feeds = { enabled = true; + pollIntervalSeconds = 600; }; + + serviceBots = [ + { localpart = "bot_feeds"; + displayname = "Aya"; + avatar = ./feeds.png; + prefix = "!aya"; + service = "feeds"; + } + ]; + + permissions = [ + # Users of the PVV Server + { actor = "pvv.ntnu.no"; + services = [ { service = "*"; level = "commands"; } ]; + } + # Members of Medlem space (for people with their own hs) + { actor = "!pZOTJQinWyyTWaeOgK:pvv.ntnu.no"; + services = [ { service = "*"; level = "commands"; } ]; + } + # Members of Drift + { actor = "!eYgeufLrninXxQpYml:pvv.ntnu.no"; + services = [ { service = "*"; level = "admin"; } ]; + } + # Dan bootstrap + { actor = "@dandellion:dodsorf.as"; + services = [ { service = "*"; level = "admin"; } ]; + } + ]; }; }; diff --git a/hosts/bicep/services/matrix/hookshot/feeds.png b/hosts/bicep/services/matrix/hookshot/feeds.png new file mode 100644 index 00000000..239d57bd Binary files /dev/null and b/hosts/bicep/services/matrix/hookshot/feeds.png differ diff --git a/secrets/bicep/matrix.yaml b/secrets/bicep/matrix.yaml index 9216900b..a8c3e57a 100644 --- a/secrets/bicep/matrix.yaml +++ b/secrets/bicep/matrix.yaml @@ -8,7 +8,7 @@ mjolnir: access_token: ENC[AES256_GCM,data:ERFqZjK7MRD0xWt91FNCIxP1YC6Qj54QgnckHlCTtcQVLWaM1h2h9lHS+K8=,iv:1d7vmFkXAPcsmumzlmOT31amdrKLWtL5sJiS8G9g+LE=,tag:2l0vWzJ6P12ofuBdf5CCWw==,type:str] registrations: mx-puppet-discord: ENC[AES256_GCM,data:FleyXxgOmc05nTP6M2DBJlacufN3p/05eZm4kB8+K4ci0k24o3zli988wlM/kyeZmxu4pgQlJ3lNLte4uip2hBXHWG5t5Ldzmr7bNCUD+r7nM+I1lfNkrDROPZ54bHysmn9O5CHpEa16rSo6RJgncIPqsLJxTwjC7qZlkOpzqvMhkq/MHCVOpvg0M/6AUR+AlSZoggujBMoXLznQNQapN13foEsbuo/QxjszM/ObGmhYMVyaS+TDBXzQLA8Yuj50Q/gZCIINWZ4G2qmgsGxxNR4I+usUQml/jxCtIXS4zn/ettXfL9G4Fdm2F9u1v11DehtTGa5xoxDq94M9rIxOqeJpvgEQEyyKAyFUIrlINfGl7tAj4Zu7+9Z8JTRAnppjM1q8iInwn/Z2L9KgB0YFi/Go1whgXly+TH6hpreo7m5klXV/ff/aV3ghOgFCGA8nBrZFqE8Uw268q9tV1s1dxCb6TbpGf19V5c9MD6BsCIVeoq+j9I/I8iZpzg2Reb4IlHhMDwbwsL2w2ks30wiZ9XO/CFrXDY4uBlI=,iv:3vvkGvldS8Raibg6tzlV8VY1O9NCLxSuNX/lwi1QgiA=,tag:D/noIsE3xlOiYM6Pk+cc8Q==,type:str] - matrix-hookshot: ENC[AES256_GCM,data:7gwMGvp06eztKxj0/5GUPj1UcnBeFtZiQDnqJJ/Ak4ZjeQY9C/WxR261chyvXdzu65iQdT881/5vhBktGLggA+Wzqq3w6Q4PiajRcs49AEVqBp1aEVRkhoA3FTctK+E5kynsY3uXnYwcI7cmx7W+6RngibDism5A356U0/ycniUArQzcRfQDZjtHTmKNwwDkSUJfF1JBr4UM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P3euiAx5M9BWvgvCnA/US/5klpk8MtlreNFA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-10-13T04:02:47Z" - mac: ENC[AES256_GCM,data:e9UTv8AbchriDXpfWjTKb6QdtqXiTMI9JsoA829eTjbVeoo0Mu5JmYorqORAtLvpsIOICRRR/DvQ4RDV/QZSpRUKWuZ6YKBm10C3eGwmX+CaRkgk8rxQn77XG5M1jFNtmALYp8/ssp145Akp8hNP9Ew+s/hX/Pw6PqPArlyoPdM=,iv:aRcuwbEIM0dLCMzoAwFi7K2w8GjYaWyNby+bSmm8/tY=,tag:Ku8dpZt0kgDH7qpfqSpw0Q==,type:str] + lastmodified: "2024-10-13T05:04:30Z" + mac: ENC[AES256_GCM,data:Qtw6ZPxUIp28fw1xFR72Utt+aZZXcXOOJO9lwCsZEsqMKPCtxwNw2NumB4aEBuv16dL14boy/FRtwq0mu/DyA6zgnOeeEzxlcxtFAkqK2A03ZMGEIGYTdB3sBDb2Rm7gnK7J9ypoxb0EP40x18lErk7Cn54B28DPlCkY/tj4B/0=,iv:MRXfroBOUCeWKknjDTfUNNHH91cCkf3vUFAAP+UIN7Y=,tag:awdtYAtmMP2Y72m8PlmgwA==,type:str] pgp: - created_at: "2024-08-04T00:03:46Z" enc: |-