summaryrefslogtreecommitdiff
path: root/nixos/hosts/ev/kodi.nix
blob: 3862dfebbbfff10cdf08fefe888513d8c1c834ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ config, pkgs, ... }:

let
  kodi-package = pkgs.kodi-wayland.withPackages (kodiPkgs: with kodiPkgs; [
    joystick
  ]);
in
{
  config = {
    users.users.kodi = {
      isNormalUser = true;
      extraGroups = ["audio"];
    };

    services = {
      cage = {
        enable = true;
        user = "kodi";
        program = "${kodi-package}/bin/kodi-standalone";
      };

      pipewire = {
        enable = true;
        alsa.enable = true;
        alsa.support32Bit = true;
        pulse.enable = true;
      };
    };
  };
}