Tuesday | 30 APR 2024
[ previous ]
[ next ]

Connecting NixOS to a TV

Title:
Date: 2024-02-03
Tags:  linux, nix

I ran into some issues with connecting my laptop to my tv. This is general to linux but I'm marking this as nixos because that's the laptop I ran into these issues on.

Connecting Video

I had to use xrandr to find the displays:

xrandr

This will list all the video outputs:

eDP-1 connected
DP-1 disconnected
HDMI-1 disconnected
HDMI-2 connected

You can use arandr to manipulate the displays grapically. For my case, I used xrandr directly.

xrandr --output HDMI-2 --same-as eDP-1

This will duplicate my laptop screen to HDMI 2.

Connecting Audio

Audio was a bit harder and I'm still not sure what's wrong.

List out the audio devices:

aplay -l

To get the HDMI to work, this command I basically used without looking at the previous output so I'm not sure why it's working.

pactl set-card-profile 0 output:hdmi-stereo

alsamixer didn't seem to do much and I'm stuck trying to install pavucontrol on nixos still.