Remix.run Logo
TheTaytay 3 days ago

Every time I hear about Nix I get pretty excited, and then there are folks in the comments that say things along the lines of, "It's great, except when it doesn't work because of some missing package/Flake, and then it's hell and there is no 'escape hatch'". It's the lack of escape hatch that scares me. What if I want to install/configure something that hasn't been Nix-ified? Do you find yourself fighting with it to do something "simple"?

dinkleberg 3 days ago | parent | next [-]

I've been "all in" on NixOS for the past couple of years on my workstations and servers and will say that sometimes you do run into this, but there is an escape hatch. If you really need something that isn't available, you can just create your own package. nixpkgs continues to grow so the number of things not covered keeps growing smaller. But when you do encounter it, you can just create your own package and pull it into your flake.

AI makes this even easier, but you can usually find a similar package on nixpkgs and just modify it to suit the needs of that particular application.

I'll say this. Recently I reinstalled arch to see if I liked the freedom of it more. Within a week I reinstalled NixOS (which thanks to version control meant I was able to reinitialize it to be back in the exact state it was in beforehand).

1-more 3 days ago | parent [-]

Yeah I have no idea what I'm doing but I tell an agent to add such and such as a package in my flake.nix and it does it. I did this for getting the font I wanted in a LaTeX project even.

worble 3 days ago | parent | prev | next [-]

As a last ditch resort, you can always use flatpaks, or failing that, use distrobox and install it in a distro that does actually package it. Yeah, it's a faff but hopefully you'll have to very rarely do this (if ever, I currently daily drive nix for web development and gaming and don't have anything that isn't nix-ified but obviously that's highly up to what you need)

n8henrie 3 days ago | parent | prev | next [-]

Nix is the escape hatch!

More packages than any other package manager you're likely to encounter.

If something isn't packaged for nix, it's often simple to package yourself. Even when this isn't simple, it's often simple to use nix to bring the build dependencies into your environment and then follow the usual (non-nix) build instructions.

I'm a lowly self-taught hobbyist who works in an entirely unrelated industry. If I can do it, you can.

bpye 3 days ago | parent | prev | next [-]

> What if I want to install/configure something that hasn't been Nix-ified?

You can setup an FHS environment, this is often the strategy used when packaging closed-source binary packages. An example in nixpkgs is steam-run [0], I also used a similar approach to package Xilinx ISE [1] in a flake.

[0] - https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by...

[1] - https://github.com/benpye/nix-fpga-tools

whateveracct 3 days ago | parent | prev | next [-]

You can Nixify appimages pretty easily. Oh, and you can run flatpak with a single line of config and install things that way. Oh and you can build from source using the language's package manager (e.g. cabal install etc). I've even just run the Windows exe using Wine (super easy with Nix - it has great Wine support).

Obviously the ideal is built from source. This has a lot of benefits. It allows you to overlay the package very easily - modify its source to be a fork, change compile options, etc. It allows you to expose its dependencies. Stuff like that.

jen20 3 days ago | parent | prev [-]

I find this semi-often, and typically just write a fixed-output derivation to pull down the vendor- or project-offered binary. I do use `nix-homebrew` for macOS apps though.