Add script to send push notification to my phone to all hosts
This commit is contained in:
parent
b26bb71d28
commit
79b5707656
4 changed files with 35 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
./mail
|
||||
./network
|
||||
./nix
|
||||
./phone-push
|
||||
./smartd
|
||||
./ssh
|
||||
./sshd
|
||||
|
|
15
modules/base/phone-push/default.nix
Normal file
15
modules/base/phone-push/default.nix
Normal 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";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue