nixos-config/configs/porani/kodi.nix
2019-12-14 18:15:37 +13:00

36 lines
751 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>;
};
};
}