Misterio77 / nix-config

Personal nixos and home-manager configurations.
https://m7.rs/git/nix-config/
MIT License
861 stars 51 forks source link

How are things connected to eachother? #13

Closed prescientmoon closed 1 year ago

prescientmoon commented 1 year ago

Hi! I am new to the self hosting stuff, and your config is extremly inspiring! I've spent a lot of time trying to understand your setup, but a lot of it is still very confusing.

I am trying to understand the basics of how you handle networking between devices. I'll simplify my question to only involve 3 kind of devices: 1) A server running actual services 2) A cheap vps server running headscale and whatnot 3) A personal device (laptop/phone/etc)

I cannot open ports on the router for my kind (1) device, so if I understand things correctly, I need to point the dns records to (2), and connect (1) and (3) to the headscale network created by (2). I could then use nginx running on (2) to point requests going to a public url to a magicdns url pointing to a server running on (1), effectively managing to expose the service running on (1) to the outside world.

I know very little about the topic, so idk if what I'm saying makes any sense.

A few questions:

I hope asking this here is ok, and thanks in advance!

Misterio77 commented 1 year ago

Hello, thanks a lot for your kind words!

About your intended networking setup: yup! That's completely right, and is the way I would do it too.

As for your questions:

Let me know if you have any more questions! Hope I helped you a little bit :)

prescientmoon commented 1 year ago

Hey, thanks a lot for the detailed answers!