Add a kodi role
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ inputs, pkgs, ... }:
|
{ inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
@@ -11,6 +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; })
|
||||||
../../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
|
||||||
|
|||||||
@@ -7,9 +7,8 @@
|
|||||||
options = "caps:escape";
|
options = "caps:escape";
|
||||||
};
|
};
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.displayManager = {
|
services.xserver.displayManager = {
|
||||||
sddm.enable = true;
|
lightdm.enable = true;
|
||||||
sddm.wayland.enable = !x11Only;
|
|
||||||
};
|
};
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
|
|||||||
26
roles/kodi/default.nix
Normal file
26
roles/kodi/default.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ autologin ? false, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.xserver.desktopManager.kodi = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.kodi.withPackages (pkgs: with pkgs; [
|
||||||
|
jellyfin
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 8080 ];
|
||||||
|
allowedUDPPorts = [ 8080 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.displayManager = if autologin then {
|
||||||
|
autoLogin.enable = true;
|
||||||
|
autoLogin.user = "kodi";
|
||||||
|
defaultSession = "kodi";
|
||||||
|
} else {};
|
||||||
|
services.xserver.displayManager = if autologin then {
|
||||||
|
lightdm.enable = true;
|
||||||
|
lightdm.greeter.enable = false;
|
||||||
|
} else {};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user