[kodi] Add wayland option
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../roles/common/default.nix
|
../../roles/common/default.nix
|
||||||
../../roles/nix/default.nix
|
../../roles/nix/default.nix
|
||||||
(import ../../roles/kodi/default.nix { autologin = true; inherit lib; inherit pkgs; })
|
(import ../../roles/kodi/default.nix { autologin = true; wayland = true; inherit lib; inherit pkgs; })
|
||||||
(import ../../roles/users/default.nix { extraGroups = []; })
|
(import ../../roles/users/default.nix { extraGroups = []; })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
../../roles/common/default.nix
|
../../roles/common/default.nix
|
||||||
(import ../../roles/desktop/default.nix { x11Only = true; inherit inputs; inherit pkgs; })
|
(import ../../roles/desktop/default.nix { x11Only = true; inherit inputs; inherit pkgs; })
|
||||||
../../roles/kids/default.nix
|
../../roles/kids/default.nix
|
||||||
(import ../../roles/kodi/default.nix { autologin = false; inherit lib; inherit pkgs; })
|
(import ../../roles/kodi/default.nix { autologin = false; wayland = false; inherit lib; inherit pkgs; })
|
||||||
../../roles/nfs-mounts/default.nix
|
../../roles/nfs-mounts/default.nix
|
||||||
../../roles/nix/default.nix
|
../../roles/nix/default.nix
|
||||||
../../roles/printing/default.nix
|
../../roles/printing/default.nix
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
{ autologin ? false, pkgs, ... }:
|
{ autologin ? false, wayland ? false, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
with lib;
|
||||||
services.xserver.enable = true;
|
|
||||||
services.xserver.desktopManager.kodi = {
|
let
|
||||||
enable = true;
|
kodiBasePkg = if wayland then pkgs.kodi-wayland else pkgs.kodi;
|
||||||
package = pkgs.kodi.withPackages (pkgs: with pkgs; [
|
kodiPkg = kodiBasePkg.withPackages (pkgs: with pkgs; [
|
||||||
jellyfin
|
jellyfin
|
||||||
|
steam-launcher
|
||||||
|
steam-library
|
||||||
|
youtube
|
||||||
]);
|
]);
|
||||||
};
|
in
|
||||||
|
{
|
||||||
users.extraUsers.kodi.isNormalUser = true;
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
@@ -15,14 +19,29 @@
|
|||||||
allowedUDPPorts = [ 8080 ];
|
allowedUDPPorts = [ 8080 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.displayManager = if autologin then {
|
services = mkIf autologin {
|
||||||
|
cage = mkIf wayland {
|
||||||
|
user = "kodi";
|
||||||
|
program = "${kodiPkg}/bin/kodi-standalone";
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xserver = mkIf (!wayland) {
|
||||||
|
enable = true;
|
||||||
|
desktopManager.kodi = {
|
||||||
|
enable = true;
|
||||||
|
package = kodiPkg;
|
||||||
|
};
|
||||||
|
displayManager.lightdm = {
|
||||||
|
enable = true;
|
||||||
|
greeter.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
displayManager = mkIf (!wayland) {
|
||||||
autoLogin.enable = true;
|
autoLogin.enable = true;
|
||||||
autoLogin.user = "kodi";
|
autoLogin.user = "kodi";
|
||||||
defaultSession = "kodi";
|
defaultSession = "kodi";
|
||||||
sessionData.autologinSession = "kodi";
|
sessionData.autologinSession = "kodi";
|
||||||
} else {};
|
};
|
||||||
services.xserver.displayManager = if autologin then {
|
};
|
||||||
lightdm.enable = true;
|
|
||||||
lightdm.greeter.enable = false;
|
|
||||||
} else {};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user