Remix.run Logo
jdonaldson a day ago

Nix always felt like an OS on the blockchain. It's fine if you value verifiability above everything, but becomes very burdensome if you find yourself tweaking your dev environment often. Still, I think it probably teaches good discipline.

xpe a day ago | parent | next [-]

I've found NixOS is fantastic for evolving my environment. Update `configuration.nix` and then `sudo nixos-rebuild switch`. Done.

What kind of "tweaks" are you doing? You could use `nix-shell` to try out a new environment. If you like it the environment, you can make it declarative by creating a `shell.nix` file.

If you want to go further, you might make consider making a flake, but I would recommend reading https://nix.dev/concepts/flakes.html first.

rgoulter a day ago | parent | prev | next [-]

> Nix always felt like an OS on the blockchain. It's fine if you value verifiability above everything, but becomes very burdensome if you find yourself tweaking your dev environment often.

With Nix, "dev environment" can be scoped to be specific to a project. Where on a typical system, you might install a compiler & libraries, with Nix you can describe the development environment in isolation. (Dev Containers uses containers to similar effect).

I'd rephrase your comment as: NixOS is anti-practical. Rather than just changing a config (& restarting a service), you have to change a NixOS config, rebuild that, & switch to the updated config. -- I'd say NixOS (and Nix) support the mindset of "put in all the effort up front now, in order to save effort later".

If someone's written a nix-shell or devenv file for a project, then no further effort is required to get a working dev environment setup. (Devenv is notable for nicer DX over docker-compose for things like "services.postgres.enable = true" to get a working DB).

jakkos a day ago | parent | prev | next [-]

I've gone full NixOS on my laptop and my gaming/homeserver desktop. I love it (even if there are parts I hate) and will never move to anything "less declarative". 100% no regrets.

However, I only recommend it with the caveat that the practical benefits are not worth the time invested and it's only worth it as a fun hobby. I think an immutable desktop like Silverblue/Bazzite is really the sweet spot.

Nix (non-OS) as a way to define dev environments though? Incredible, would recommend it in a heartbeat. Opening a project and knowing you are going to have the exact versions of all dependencies you need is so refreshing, or seeing that a public git repo has a `flake.nix` and being able to `nix run <url>` and download/build the project in one command is truly magic.

1-more 17 hours ago | parent [-]

Gonna sound like a lunatic, but I have used AI agents to set up flake.nix for the following things:

- My basic nix-darwin and home-manager setup for my laptop

- Declarative tooling install for my clone of an open source Rust project

- LaTeX setup for my notes for a book club, including creating a nix package inside the flake to install the version of Garamond I wanted. Traditionally, installing LaTeX and non-free-fonts involves running a bunch of commands as root and praying. This is way better.

It took a lot of prodding and telling it things like "you'll know you did it right when `make all` works", but they all ended up working exactly how I wanted them to.

yoyohello13 a day ago | parent | prev [-]

I’ve made the compromise of using nix package manager on a normal Linux distro. Gives most of the features I care about, with basically no downsides.

Cyph0n a day ago | parent [-]

Nix + Home Manager is a good combo if you don’t want to go the whole way. But yes, I would recommend starting with just Nix.