{ lib, pkgs, ... }: { imports = [ ../../common ../../profiles/rpi.nix ../../profiles/headless.nix ]; kyouma.deployment.targetHost = "192.168.178.171"; networking = { hostName = "lain"; dhcpcd.enable = lib.mkForce true; networkmanager.enable = true; useDHCP = lib.mkForce true; }; systemd.network.enable = lib.mkForce false; nixpkgs.overlays = [ (self: super: { kodi-wayland = super.kodi-wayland.overrideAttrs { doInstallCheck = false; }; }) ]; systemd.sockets."cec-client" = { after = [ "dev-vchiq.device" ]; bindsTo = [ "dev-vchiq.device" ]; wantedBy = [ "sockets.target" ]; socketConfig = { ListenFIFO = "/run/cec.fifo"; SocketGroup = "video"; SocketMode = "0660"; }; }; systemd.services."cec-client" = { after = [ "dev-vchiq.device" ]; bindsTo = [ "dev-vchiq.device" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1''; ExecStop = ''/bin/sh -c "echo q > /run/cec.fifo"''; StandardInput = "socket"; StandardOutput = "journal"; Restart="no"; }; }; services.cage = { enable = true; environment = { WLR_NO_HARDWARE_CURSORS = "1"; }; program = "${pkgs.kodi-wayland}/bin/kodi-standalone"; user = "kodi"; }; services.udev.extraRules = '' # allow access to raspi cec device for video group (and optionally register it as a systemd device, used below) KERNEL=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq" ''; users = { mutableUsers = lib.mkForce true; users.kodi.extraGroups = [ "video" ]; extraUsers.kodi.isNormalUser = true; }; }