Remix.run Logo
xyst 2 days ago

Can’t recall the last time I used `curl … | bash` to install anything on personal or remote devices.

Switched to nix + home-manager as a package manager to replace defacto package managers on some operating systems (ie, darwin uses macports or homebrew).

In cases where the package isn’t available in nixpkgs, can create my own derivation and build it from source.

If I am super paranoid, spin up sandboxed vm with minimal nixos. Use nixos-anywhere to setup vm. Install/build suspicious package. Then do reconnaissance. Nuke the vm after I am done.

Nix, like any other software, isn’t fool proof. Something is likely to get through. In that case, identify the malicious package in nix store. Update your flake to remove/patch software that introduced it. Then nuke the system completely.

Then rebuild system using your declarative system configuration without malicious software.

Is nix for everyone? God no, there’s a massive learning curve. But I will say that once you get past this learning curve, you will never need to install anything with this pattern.