|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| == Enable LIRC support in the kernel ==
| | [https://www.lirc.org/ LIRC] allows to receive and send infrared signals. The lirc package is part of nixpkgs. It can be configured via options. |
| Currently (2018-07-23) the NixOS kernel is not compiled with LIRC support, therefore no <code>/dev/lirc0</code> will appear when you add an IR receiver.
| |
| To enable LIRC support for NixOS you will need to recompile your kernel with <code>CONFIG_LIRC=y</code>.
| |
| | |
| With NixOS the <code>boot.kernelPatches</code> option can be used:
| |
| <syntaxHighlight lang=nix>
| |
| { lib, ... }:
| |
| | |
| {
| |
| boot.kernelPatches = lib.singleton {
| |
| name = "enable-lirc";
| |
| patch = null;
| |
| extraConfig = ''
| |
| LIRC y
| |
| '';
| |
| };
| |
| }
| |
| </syntaxHighlight>
| |
| | |
| == LIRC Service ==
| |
| As of right now, no lirc service is provided by NixOS, You can start the LIRC Daemon manually like this:
| |
| <syntaxHighlight lang=console>
| |
| $ lircd --listen -n -P /var/run/lircd.pid -o /var/run/lirc.sock -d /dev/lirc0
| |
| </syntaxHighlight>
| |
| You can build upon this to create your own service with <code>sytemd.services</code>.
| |
| == References ==
| |
| * [https://discourse.nixos.org/t/the-correct-way-to-override-the-latest-kernel-config/533/2 Discourse Discussion]
| |
|
| |
|
| [[Category:Applications]] | | [[Category:Applications]] |
| | [[Category:Hardware]] |
Latest revision as of 21:12, 1 October 2024
LIRC allows to receive and send infrared signals. The lirc package is part of nixpkgs. It can be configured via options.