2023-10-30 00:31:58 +01:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
2023-09-10 00:34:14 +02:00
|
|
|
|
imports = [
|
|
|
|
|
../hardware/intel-nuc.nix
|
|
|
|
|
];
|
2023-10-30 14:33:03 +01:00
|
|
|
|
config = let
|
|
|
|
|
hashes = builtins.import ../hashes.nix;
|
|
|
|
|
in {
|
2023-09-10 00:34:14 +02:00
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
networking.hostName = "cerithium-telescopium";
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
|
|
users.extraUsers.kodi.isNormalUser = true;
|
|
|
|
|
|
2023-10-26 19:43:58 +02:00
|
|
|
|
services.logind.extraConfig = "IdleAction=ignore";
|
|
|
|
|
|
2023-09-10 21:34:46 +02:00
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
services.xserver.desktopManager.kodi.enable = true;
|
2023-10-26 19:43:58 +02:00
|
|
|
|
services.xserver.displayManager.setupCommands = ''
|
|
|
|
|
/run/current-system/sw/bin/xset -dpms
|
|
|
|
|
/run/current-system/sw/bin/xset s off
|
|
|
|
|
'';
|
|
|
|
|
services.xserver.desktopManager.kodi.package = let
|
|
|
|
|
REpo-AiO = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "Collabsvito";
|
|
|
|
|
repo = "REpo-AiO";
|
2023-10-30 14:33:03 +01:00
|
|
|
|
inherit (hashes.REpo-AiO) rev hash;
|
2023-10-26 19:43:58 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
rtlGroupPlugin = pkgs.kodiPackages.buildKodiAddon rec {
|
|
|
|
|
pname = "rtl+";
|
|
|
|
|
namespace = "plugin.video.rtlgroup.de";
|
2023-10-30 14:33:03 +01:00
|
|
|
|
version = hashes.rtlGroupPlugin.version;
|
2023-10-26 19:43:58 +02:00
|
|
|
|
|
|
|
|
|
src = pkgs.fetchzip {
|
|
|
|
|
url = "file://${REpo-AiO}/MATRIX/${namespace}/${namespace}-${version}+matrix.1.zip";
|
2023-10-30 14:33:03 +01:00
|
|
|
|
hash = hashes.rtlGroupPlugin.hash;
|
2023-10-26 19:43:58 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
|
sed 's/Cryptodome/Crypto/g' -i resources/lib/common.py
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
netflixPlugin = pkgs.kodiPackages.netflix.overrideAttrs rec {
|
2023-10-30 14:33:03 +01:00
|
|
|
|
inherit (hashes.netflixPlugin) version;
|
2023-10-26 19:43:58 +02:00
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "CastagnaIT";
|
|
|
|
|
repo = "plugin.video.netflix";
|
|
|
|
|
rev = "v${version}";
|
2023-10-30 14:33:03 +01:00
|
|
|
|
inherit (hashes.netflixPlugin) hash;
|
2023-10-26 19:43:58 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
pkgs.kodi.passthru.withPackages (kodiPkgs:
|
|
|
|
|
with kodiPkgs; [
|
|
|
|
|
youtube
|
|
|
|
|
inputstream-adaptive
|
|
|
|
|
rtlGroupPlugin
|
|
|
|
|
netflixPlugin
|
|
|
|
|
joystick
|
|
|
|
|
# Amazon VOD
|
|
|
|
|
# Arte Mediathek
|
|
|
|
|
# Disney+
|
|
|
|
|
# media.ccc.de
|
|
|
|
|
# RocketBeansTV
|
|
|
|
|
# twitch
|
|
|
|
|
# ZDF Mediathek
|
|
|
|
|
]);
|
2023-09-10 21:34:46 +02:00
|
|
|
|
services.xserver.displayManager.autoLogin.enable = true;
|
|
|
|
|
services.xserver.displayManager.autoLogin.user = "kodi";
|
|
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [8080];
|
|
|
|
|
|
|
|
|
|
# This may be needed to force Lightdm into 'autologin' mode.
|
|
|
|
|
# Setting an integer for the amount of time lightdm will wait
|
|
|
|
|
# between attempts to try to autologin again.
|
|
|
|
|
services.xserver.displayManager.lightdm.autoLogin.timeout = 3;
|
|
|
|
|
|
|
|
|
|
# services.cage = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
# program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
|
|
|
|
|
# user = "kodi";
|
|
|
|
|
# };
|
2023-09-10 00:34:14 +02:00
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
|
|
|
};
|
|
|
|
|
}
|