This commit is contained in:
2025-03-08 14:46:39 -08:00
parent 39dbe6644c
commit 1e01d44f2f
3 changed files with 15 additions and 31 deletions

View File

@@ -14,9 +14,15 @@ with lib;
roles = {
audio.enable = true;
desktop = {
enable = true;
gaming = true;
kde = true;
wayland = true;
};
kodi = {
enable = true;
autologin = true;
autologin = false;
wayland = true;
};
users.enable = true;
@@ -30,8 +36,6 @@ with lib;
hardware.graphics.enable = true;
services.displayManager.enable = mkForce false;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#

View File

@@ -10,6 +10,7 @@ in
environment.systemPackages = with pkgs; [
steam
lutris
moonlight
];
# Possibly other gaming specific services or settings

View File

@@ -21,7 +21,6 @@ in
kodiBasePkg = if cfg.wayland then pkgs.kodi-wayland else pkgs.kodi;
kodiPkg = kodiBasePkg.withPackages (pkgs: with pkgs; [
jellyfin
moonlight-embedded
steam-launcher
steam-library
youtube
@@ -35,38 +34,18 @@ in
allowedUDPPorts = [ 8080 ];
};
services = if cfg.autologin then mkMerge [
(mkIf cfg.wayland {
cage = mkIf cfg.wayland {
user = "kodi";
program = "${kodiPkg}/bin/kodi-standalone";
enable = true;
};
xserver = {
enable = false;
autorun = false;
};
})
environment.systemPackages = with pkgs; [
kodiPkg
wget
];
(mkIf (!cfg.wayland) {
xserver = {
enable = true;
desktopManager.kodi = {
enable = true;
package = kodiPkg;
};
displayManager.lightdm = {
enable = true;
greeter.enable = false;
};
};
services = if cfg.autologin then {
displayManager = {
autoLogin.enable = true;
autoLogin.user = "kodi";
defaultSession = "kodi";
sessionData.autologinSession = "kodi";
sessionData.autologinSession = "plasma";
};
})
] else {};
} else {};
};
}