nixpkgs/nixos/modules/services/x11/desktop-managers/kodi.nix
Profpatsch 44c12dc0ff desktopManagerHandlesLidAndPower default false`
Changes the option and explicitely sets it for each desktopManager.

Reasoning: Currently,
services.xserver.displayManager.desktopManagerHandlesLidAndPower is set
to true by default. This creates a problem for users without desktop
environments activated, since lid management simply doesn't work
(and they have to be lucky to find this option).

See issue #9671
2015-09-01 12:14:44 +02:00

32 lines
680 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xserver.desktopManager.kodi;
in
{
options = {
services.xserver.desktopManager.kodi = {
enable = mkOption {
default = false;
example = true;
description = "Enable the kodi multimedia center.";
};
};
};
config = mkIf cfg.enable {
services.xserver.desktopManager.session = [{
name = "kodi";
start = ''
${pkgs.kodi}/bin/kodi --lircdev /var/run/lirc/lircd --standalone &
waitPID=$!
'';
}];
services.xserver.displayManager.desktopManagerHandlesLidAndPower = true;
environment.systemPackages = [ pkgs.kodi ];
};
}