mob next [ci-skip] [ci skip] [skip ci]

lastFile:modules/clan/phonebox/default.nix
This commit is contained in:
2025-12-29 11:54:48 +07:00
parent f41f48d40b
commit 074a117feb

View File

@@ -81,15 +81,14 @@
createContactListTiff = createContactListTiff =
let let
contactTXT = lib.concatStringsSep "\n" ( contactTXT = lib.concatStringsSep "\n" (
builtins.map (contact: "${contact.name}: ${contact.number}") contactList builtins.map (contact: "${contact.number}\t\t: \t\t${contact.name}") contactList
); );
in in
pkgs.writeShellApplication { pkgs.writeShellApplication {
name = "create-contact-tiff"; name = "create-contact-tiff";
text = '' text = ''
magick -background white -fill black \ magick -background white -fill black -pointsize 20 -font DejaVu-Sans label:"${contactTXT}" "$1"
-pointsize 20 -font DejaVu-Sans \ magick "$1" -border 50x50 -bordercolor white "$1"
label:"${contactTXT}" "$1"
magick "$1" -resize 1728x -units PixelsPerInch -compress Group4 -density 204x196 -monochrome -depth 1 "$1" magick "$1" -resize 1728x -units PixelsPerInch -compress Group4 -density 204x196 -monochrome -depth 1 "$1"
''; '';
runtimeInputs = [ pkgs.imagemagick ]; runtimeInputs = [ pkgs.imagemagick ];
@@ -342,7 +341,7 @@
same => n,Set(FAXFILE=${faxDir}/contact.tiff) same => n,Set(FAXFILE=${faxDir}/contact.tiff)
same => n,System(${lib.getExe createContactListTiff} ''${FAXFILE}) same => n,System(${lib.getExe createContactListTiff} ''${FAXFILE})
same => n,Set(FAXECHO=true) same => n,Set(FAXECHO=true)
same => n,Playback(hello-world) same => n,Playback(vm-goodbye)
same => n,Wait(3) same => n,Wait(3)
exten => h,1,GotoIf($[''${FAXECHO}]?sendfax) exten => h,1,GotoIf($[''${FAXECHO}]?sendfax)