mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
0412bde942
Add missing type information to manually specified enable options or replace them by mkEnableOption where appropriate.
32 lines
609 B
Nix
32 lines
609 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.xserver.desktopManager.kodi;
|
|
in
|
|
|
|
{
|
|
options = {
|
|
services.xserver.desktopManager.kodi = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Enable the kodi multimedia center.";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.xserver.desktopManager.session = [{
|
|
name = "kodi";
|
|
start = ''
|
|
LIRC_SOCKET_PATH=/run/lirc/lircd ${pkgs.kodi}/bin/kodi --standalone &
|
|
waitPID=$!
|
|
'';
|
|
}];
|
|
|
|
environment.systemPackages = [ pkgs.kodi ];
|
|
};
|
|
}
|