# Mac Mini HTPC A power-efficient computer worth running full time in your media center Created: 2023_06_28 18:20 Tags: [[HTPC]] [[Technology]] [[Project]] I know that Apple doesn't really sell the Mini as a powerful server or TV computer anymore, but I think it still serves the job well, especially the M1 model, because of it's power efficiency / cost. While this setup may not be for everyone, I think that it is good enough to share. ## Hardware - 16GB M2 Mac Mini - I sprung for the 16GB model because I knew I would run a lot of containers on it - Flirc IR receiver - Receives IR signals from any IR remote (e.g. universal remotes) and translating them to keyboard presses on the computer it is plugged into - Skip 1S (optional, could be any remote) - Controls the TV, peripherals and the Mac itself via the Flirc ## Software - Orbstack - An alternative option for running containers on macOS. - Tailscale - To access the Mac Mini from outside the home - Stremio - For streaming and discovery of content - Orion browser - This is an awesome browser based on Webkit, which is even faster and more efficient than Safari. - Brave browser - It is a reliable alternative to Google Chrome, and I use it as a backup when Orion doesn't work well. ## Configuration On the Mac Mini, I run several Portainer managed docker services which you can read more about in my [[Home Server]] section. It has several ways to stream media, primarily Stremio and Youtube are my poisons of choice. ## Remote -> Mac For just watching something on the TV, it is annoying to have to whip out a keyboard and mouse just to watch something. So instead, let's set up the Flirc to receive IR signals from a remote. ![[flirc_remote_skhd.excalidraw.svg]] 1. Configure the Flirc IR reciever such that when the remote sends a button press, it interprets that as a set of key presses 2. Using a hotkey daemon called [skhd](https://github.com/koekeishiya/skhd), to listen for key presses 2. Configure skhd to bind a set of keys to a shell script to execute This proves to be a powerful combination where you can totally control how remote buttons can be interpreted by the Mac. But I wasn't done yet, I wanted the commands to do precisely what I wanted which was to launch Youtube TV in fullscreen mode, here is how I did it: - I installed a Chrome extension in my browser that allows me to use [the Youtube TV interface](https://chrome.google.com/webstore/detail/youtube-for-tv/gmmbpchnelmlmndfnckechknbohhjpge), which is normally available only on Smart TVs. - I wrote [a command (well I had ChatGPT help)](https://github.com/nperez0111/nixos-config/blob/main/darwin/default.nix#L18-L19) that opens the browser in fullscreen, waits for the extension to load and opens Youtube TV in that fullscreen mode - I wrote [a command that does something similar for Stremio](https://github.com/nperez0111/nixos-config/blob/main/darwin/default.nix#L22-L23) These changes allow me to access Youtube or Stremio on the TV with just one click of a remote. ## Time Machine Backups I have a large external 2.5-inch drive as a backup drive just in case anything were to happen to the machine. But one annoying thing I dealt with is that Time Machine by default wants for the backups to happen every hour, causing the disk to spin up at random intervals even when unused for hours. It was annoying me enough that I ended up installing a manual backup scheduler [TimeMachineEditor](https://tclementdev.com/timemachineeditor/) which works on the M-Series & Sonoma to schedule Time Machine backups at any interval you like. So now I don't have to have the disks spin up for no reason. ## References -