From 1e01d44f2f4ad3be7ca9b5eaac26e84cc7ae61e4 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sat, 8 Mar 2025 14:46:39 -0800 Subject: [PATCH] wip --- machines/boxy/configuration.nix | 10 +++++++--- roles/desktop/gaming.nix | 1 + roles/kodi/default.nix | 35 +++++++-------------------------- 3 files changed, 15 insertions(+), 31 deletions(-) diff --git a/machines/boxy/configuration.nix b/machines/boxy/configuration.nix index 462ee4a..9114891 100644 --- a/machines/boxy/configuration.nix +++ b/machines/boxy/configuration.nix @@ -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. # diff --git a/roles/desktop/gaming.nix b/roles/desktop/gaming.nix index c0e25c0..48bc55c 100644 --- a/roles/desktop/gaming.nix +++ b/roles/desktop/gaming.nix @@ -10,6 +10,7 @@ in environment.systemPackages = with pkgs; [ steam lutris + moonlight ]; # Possibly other gaming specific services or settings diff --git a/roles/kodi/default.nix b/roles/kodi/default.nix index 4423cb6..92fa302 100644 --- a/roles/kodi/default.nix +++ b/roles/kodi/default.nix @@ -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 {}; }; }