41 lines
896 B
Nix
41 lines
896 B
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
|
|
|
|
services.xserver = {
|
|
enable = true;
|
|
autorun = true;
|
|
desktopManager = {
|
|
kodi.enable = true;
|
|
default = "kodi";
|
|
xterm.enable = false;
|
|
};
|
|
displayManager.lightdm = {
|
|
enable = true;
|
|
autoLogin.enable = true;
|
|
autoLogin.user = config.users.users.kodi.name;
|
|
|
|
# todo test it
|
|
# if kodi crashes restart the whole xsession to trigger the login
|
|
extraConfig = ''
|
|
session-cleanup-script=service lightdm restart
|
|
'';
|
|
};
|
|
};
|
|
|
|
users = {
|
|
# mutableUsers = true;
|
|
users.kodi= {
|
|
isNormalUser = true;
|
|
name = "kodi";
|
|
uid = 1338;
|
|
initialPassword = lib.fileContents <secrets/kodi/password>;
|
|
};
|
|
};
|
|
|
|
# allow everybody in the net to access the wifi
|
|
networking.firewall = {
|
|
allowedTCPPorts = [ 8080 ];
|
|
allowedUDPPorts = [ 8080 ];
|
|
};
|
|
}
|