Add Kodi desktop-manager
This commit is contained in:
parent
8d1657b463
commit
5b1c9417a8
@ -19,7 +19,7 @@ in
|
||||
# E.g., if KDE is enabled, it supersedes xterm.
|
||||
imports = [
|
||||
./none.nix ./xterm.nix ./xfce.nix ./kde4.nix
|
||||
./e19.nix ./gnome3.nix ./xbmc.nix
|
||||
./e19.nix ./gnome3.nix ./xbmc.nix ./kodi.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
31
nixos/modules/services/x11/desktop-managers/kodi.nix
Normal file
31
nixos/modules/services/x11/desktop-managers/kodi.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ 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=$!
|
||||
'';
|
||||
}];
|
||||
|
||||
environment.systemPackages = [ pkgs.kodi ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user