Jump to content

NixOS on ARM/Raspberry Pi 4: Difference between revisions

m
fix more angle brackets in code sample
imported>Christoph-heiss
m (fix angle brackets in code sample)
imported>Christoph-heiss
m (fix more angle brackets in code sample)
Line 229: Line 229:


   # optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
   # optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
   # scan for devices: `echo 'scan' > /run/cec.fifo ; journalctl -u cec-client.service`
   # scan for devices: `echo 'scan' </nowiki>><nowiki> /run/cec.fifo ; journalctl -u cec-client.service`
   # set pi as active source: `echo 'as' > /run/cec.fifo`
   # set pi as active source: `echo 'as' </nowiki>><nowiki> /run/cec.fifo`
   systemd.sockets."cec-client" = {
   systemd.sockets."cec-client" = {
     after = [ "dev-vchiq.device" ];
     after = [ "dev-vchiq.device" ];
Line 247: Line 247:
     serviceConfig = {
     serviceConfig = {
       ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
       ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
       ExecStop = ''/bin/sh -c "echo q > /run/cec.fifo"'';
       ExecStop = ''/bin/sh -c "echo q </nowiki>><nowiki> /run/cec.fifo"'';
       StandardInput = "socket";
       StandardInput = "socket";
       StandardOutput = "journal";
       StandardOutput = "journal";