News for hackers. Stuff that matters.
Re:M1 dev setup with a virtual Linux box by rowanG077 on Sunday April 11, 2021 @07:32AM (#26769547)
Actually I think VMs for dev are evil. I hope it's a stop gap measure until tooling like nix catches up enough. Running an entire seperate OS just for development is completely bonkers to me.
Re:M1 dev setup with a virtual Linux box by mcny on Sunday April 11, 2021 @07:41AM (#26769591)
If you think that's bonkers, I'll give you an even worse idea: a dedicated desktop machine. I have a dell optiplex running Intel i3-2100 with 8GB RAM and 1TB Samsung 860 Evo SSD. No display. Fedora runs like a dream with dnf automatic. Use cockpit if you'd like.

You can use your windows or Mac laptop with visual studio code to do web development. ng serve works as if you ran it from your laptop.

The biggest drawback I can think of is if you ever needed to leave the house. Thankfully, I have no life so I don't have this problem.

Re:M1 dev setup with a virtual Linux box by Tsiklon on Sunday April 11, 2021 @08:03AM (#26769695)
Having both your laptop and desktop on a WireGuard vpn with the gateway on your choice of cloud host would solve that problem, also it would solve having to deal with wandering IP addresses as you may find with a home internet connection
Re:M1 dev setup with a virtual Linux box by cassianoleal on Sunday April 11, 2021 @08:01AM (#26769690)
> The biggest drawback I can think of is if you ever needed to leave the house.

Add ZeroTier to the equation and as long as you have Internet connection when you're outside the house you'll probably not even notice it.

Re:M1 dev setup with a virtual Linux box by rovr138 on Sunday April 11, 2021 @09:33AM (#26770242)
I see WireGuard and ZeroTier mentioned.

I just use ssh. SSH to a VPS and map 22 to a port on the VPS.

I have a really small VPS for this.

Re:M1 dev setup with a virtual Linux box by mcny on Sunday April 11, 2021 @09:46AM (#26770345)
I think the reason they mentioned more complicated setups is because I'm using an actual old machine at home and unless you know what you're doing you don't want to expose it to the world.

I think poking a hole on port 22 is mostly ok if you only allow key authentication and no password authentication but I don't know enough to give advice on security.

Re:M1 dev setup with a virtual Linux box by rovr138 on Sunday April 11, 2021 @02:43PM (#26772461)
Just posting alternatives.

I use a VPS with SSH. I have to ssh in, then I can ssh into the machine at home.

For safety, key authentication and fail2ban would cover a lot. I mainly have the 1 port.

If I need to expose another SSH port to the internet, I can do it, but yes, it would need extra protection since logs are coming from the machine ssh'ing in.

Re:M1 dev setup with a virtual Linux box by hiq on Sunday April 11, 2021 @04:34PM (#26773156)
> For safety, key authentication and fail2ban would cover a lot. I mainly have the 1 port.

Changing the port from the default 22 to something else is also recommended, if only because it makes fail2ban logs way less verbose.

Re:M1 dev setup with a virtual Linux box by linspace on Sunday April 11, 2021 @08:50AM (#26769987)
Running desktop applications inside a web browser is bonkers too. And the cloud. It's better to embrace the madness. I recommend watching Dr Strangelove.
Re:M1 dev setup with a virtual Linux box by FpUser on Sunday April 11, 2021 @09:00AM (#26770045)
I have it an easy way I think. My development for Linux except some RPi projects is strictly limited to some high performance business servers. I use C++ with a couple of multiplatform libraries for such development. So I simply develop and do main testing on Windows using Microsoft Visual Studio C++. The big one, not VS code. When the time comes for release I just check out project on Linux, run build and tests and that is it. I do have Linux VM on my development computer (VMware, full Linux OS with the GUI and dev environments) in case Linux tests fail due to some compiler differences / whatever. During last 3 years I had to use like it twice for that purpose. I mostly use Vm's to test my server setup from scratch scripts.
Re:M1 dev setup with a virtual Linux box by bpye on Monday April 12, 2021 @12:46AM (#26776148)
Nix has been something I’ve played with for a while, but increasingly I’ve been using it. I would love to see Nix working on Windows - there was a project to make that happen but I don’t know what the current status is.
Re:M1 dev setup with a virtual Linux box by ccouzens on Sunday April 11, 2021 @08:00AM (#26769686)
I don't know much about nix.

Does it solve the security problem by preventing access to the majority of your home directory?

Or solve it by only allowing you to install vetted libraries?

Re:M1 dev setup with a virtual Linux box by rowanG077 on Sunday April 11, 2021 @08:09AM (#26769733)
You cannot access the home directory at all during a nix build.
Re:M1 dev setup with a virtual Linux box by mixmastamyk on Sunday April 11, 2021 @04:50PM (#26773295)
Interesting, what about when your software runs? Is it still in a chroot or similar?
Re:M1 dev setup with a virtual Linux box by rowanG077 on Sunday April 11, 2021 @06:41PM (#26774169)
It's not running in a sandbox. That's not the goal of nix. It's only a package manager/build system.
Re:M1 dev setup with a virtual Linux box by mixmastamyk on Sunday April 11, 2021 @09:48PM (#26775383)
Oh, then why can it not access the home folder?
Re:M1 dev setup with a virtual Linux box by rowanG077 on Monday April 12, 2021 @03:43AM (#26776885)
The build process is sandboxed. Not the environment you run the application in afterwards.
Re:M1 dev setup with a virtual Linux box by mpweiher on Sunday April 11, 2021 @07:35AM (#26769565)
I'd phrase it this way: it is completely bonkers that this isn't bonkers.