{ config, lib, pkgs, ... }: { imports = [ ]; options.me = { kodi.enable = lib.mkOption { type = lib.types.bool; default = false; example = true; description = "Whether we want to install kodi."; }; }; config = lib.mkIf config.me.kodi.enable ( lib.mkMerge [ { environment.systemPackages = with pkgs; [ ]; } (lib.mkIf config.me.graphical { users.extraUsers.kodi.isNormalUser = true; services.cage.user = "kodi"; services.cage.program = "${pkgs.kodi-wayland}/bin/kodi-standalone"; services.cage.enable = true; }) ] ); }