44c12dc0ff
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
32 lines
680 B
Nix
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 ];
|
|
};
|
|
}
|