The Complete Computing Environment

NixOS Set Top Box

LifeTechEmacsTopicsArcology

I want a machine I can hook to a TV that has a web browser which can play YouTube at high resolution, an ad blocker, and kodi. I'd like to not do that for a thousand dollars.

Past Attempts

Thinkpad t480s

This is a work computer that got "lost" from asset tracking and anyways they told me they'd just e-waste it. I ran kodi on it until the CPU fan died.

Intel NUC

This piece of shit stopped booting one day. They're expensive, noisy, and full screen videos tear when there is moderate CPU load even with the i5 model. I ran kodi on it until the CPU fan died

aborted attempts for Linux on ODROID N2+ with hardware acceleration

ODROID N2 is a pretty powerful ARM Single Board Computer. It comes without an OS out of the box, and has some pretty poor support for OS images – right now it runs Android TV on it and can't stream 1080p from the NAS upstairs.

Basically all I want to work on it is KODI and Firefox

AndroidTV on the ODROID N2+

That thing mostly worked decently and i used it for a while between experiments above. Kodi couldn't stream and play 1080p video. I thought it was Android's fault, but as you can see above it's more a limitation of the hardware's unsupported/undersupported graphics hardware.

Back to the "thinkpad until the CPU fan dies"

Tres Ebow is a computer which I unfortunately had a lot of bad luck with. I guess the CPU fan will die eventually. I've already replaced it once.

Building a simple Set Top box with Arroyo NixOS Generator

{ pkgs, lib, ... }:

let
  endpointCfg = ./default.nix; # this file
in
rec {
  imports = [    ./hardware-configuration.nix ./generated.nix ]  # (ref:imports)
            ++ [
              <<arroyo_nixos_imports()>>
            ];

  environment.etc."nixos/configuration.nix".source = endpointCfg;
}
(->>
 (arroyo-nixos-imports "settop")
     (--map (format "../../%s" it))
     (s-join "\n"))
../../nixos/laptop.nix
../../nixos/audio.nix
../../nixos/fonts.nix
../../nixos/settop.nix
../../nixos/tailscale.nix
../../nixos/nix-path.nix
../../nixos/gnupg-pam.nix
../../nixos/nixpkgs.nix
../../nixos/syncthing.nix
../../nixos/ssh_client.nix
../../nixos/boot.nix
../../nixos/home-manager.nix
../../nixos/mopidy.nix
../../nixos/cachix.nix
../../nixos/location.nix
../../nixos/zfs.nix
../../nixos/ccache.nix
../../nixos/rrix.nix

Set Top Box Arroyo NixOS module

{ pkgs, ... }:

{
  services.xserver.desktopManager.kodi = {
    enable = true;
  };
  services.xserver.desktopManager.plasma5 = {
    enable = true;
  };

  users.groups.humans = {
    name = "humans";
    gid = 1000;
  };
  users.users.doomguy = {
    isNormalUser = true;
    home = "/home/doomguy";
    description = "Doom Guy";
    extraGroups = [ "audio" "wheel" "networkmanager" "adbusers" "systemd-journal" ];
    uid = 1001;
    group = "humans";
    initialPassword = "doomguyjohnson";
    openssh.authorizedKeys.keys = pkgs.lib.publicKeys.rrix; 
  };
  users.users.root.openssh.authorizedKeys.keys = pkgs.lib.publicKeys.rrix;

  services.xserver.enable = true;
  services.xserver.displayManager = {
    autoLogin.enable = true;
    autoLogin.user = "doomguy";
    defaultSession = "plasma";
    lightdm.enable = true;
  };

  services.ntp.enable = true;

  environment.systemPackages = with pkgs; [
    htop
    pavucontrol
    firefox
  ];

  programs.kdeconnect.enable = true;
}

Footnotes


  1. this was not true.↩︎

  2. love to install random software builds lol. it's a settop box for ublock'd youtube and lichess, idc.↩︎

  3. this is taken verbatim from My NixOS configuration↩︎