This is an automated archive made by the Lemmit Bot.

The original was posted on /r/nixos by /u/Inside_Test_8474 on 2025-10-03 13:53:10+00:00.


Your favorite duck is back, and this time I’ve tackled one of the most chaotic parts of my smart home: the TV.

I was tired of slow, unintuitive TV interfaces, juggling multiple remotes, and never knowing what’s on. So I built a complete TV control system right into my NixOS configuration.

What it can do:

  • Declarative TV configuration - Define devices, channels, and apps in Nix

  • Voice-first design - Natural language control for everything

  • Automated EPG scraping XML, JSON, and beautiful HTML TV guides

  • TV guide - Terminal-based EPG with TTS and automatic channel change scheduling for future programs

  • Advanced TV controller - Trigram + Levenshtein matching, Playlist generation with web server casting, and multi-device support

  • Automated workflow - From configuration to EPG to playback

I set my TV’s with a name, a room, IP, apps, and channel configurations

house.tv = {
  shield = {
  enable = true;
  room = "livingroom";
  ip = "192.168.1.223";
  apps = {
    telenor = "se.telenor.stream/.MainActivity";
    tv4 = "se.tv4.tv4playtab/se.tv4.tv4play.ui.mobile.main.BottomNavigationActivity";
  };
  channels = {
    "1" = {
    name = "SVT1";
    id = 1;
    # stream_url = "url";
    cmd = "open_telenor && wait 5 && start_channel_1";
    icon = ./../../modules/themes/icons/tv/1.png;
    scrape_url = "tv guide url";
  };

And that’s it!

Core Components:

tv-scraper.nix - https://github.com/QuackHack-McBlindy/dotfiles/blob/main/bin/media/tv-scraper.nix

Scrapes TV schedules, generates EPG (XML/JSON/HTML)

tv-guide.nix - https://github.com/QuackHack-McBlindy/dotfiles/blob/main/bin/media/tv-guide.nix

Terminal-based EPG with voice integration

tv.nix -https://github.com/QuackHack-McBlindy/dotfiles/blob/main/bin/media/tv.nix

Main controller with extensive voice support and fuzzy matching

Since I’m a terminal nerd, I built a command-line EPG that integrates voice control and can automatically schedule channel changes when programs air. The heart of the system is tv.nix - a feature packed controller that uses trigram + Levenshtein matching to ensure accurate media playback across all your devices

Voice commands examples

"jag vill se kanal 1 i vardagsrummet" # i want to watch channel 1 in bedroom
"spela upp filmen matrix" # play the movie matrix
"vilken kanal sänds matrix på" # what channel is matrix airing on
"nästa låt" # next song
"höj volymen" # increase volume
"ring fjärrkontrollen" # call the remote

If you want to see more crazy Nix Bashin’, all of them are listed in the README table.

I hope this shows that nothing is impossible and that NixOS can be so much more than just system configuration.