Add script to send push notification to my phone to all hosts

This commit is contained in:
Charlotte Van Petegem 2023-06-17 10:53:43 +02:00
parent b26bb71d28
commit 79b5707656
No known key found for this signature in database
GPG key ID: 019E764B7184435A
4 changed files with 35 additions and 0 deletions

View file

@ -7,6 +7,7 @@
./mail
./network
./nix
./phone-push
./smartd
./ssh
./sshd

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ...}:
let
phone-push = pkgs.writeShellScriptBin "phone-push" ''
curl $(cat ${config.age.secrets."files/services/phone-push-url".path}) -d "$(hostname): $@"
'';
in
{
environment.systemPackages = [ phone-push ];
age.secrets."files/services/phone-push-url" = {
file = ../../../secrets/files/services/phone-push-url.age;
owner = "charlotte";
};
}