this post was submitted on 08 Jun 2023
97 points (98.0% liked)

Asklemmy

44189 readers
1085 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_[email protected]~

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 4 points 2 years ago (2 children)

NixOS unstable in my workstation and my laptop. Using sway on Wayland on top of all-AMD hardware. I play games with this setup and I write Rust and TypeScript for living. I love the customizability and the reproducibility of NixOS: I just clone my config and I have exactly the desktop I've always had, every little tool and customization included. If my hard drive fails, I just plug a new one and I am productive in about 15 minutes.

My sway desktop has been looking and working similarly for years, and before that I used i3 on Xorg for almost a decade. I like how the UI doesn't really change that much.

[โ€“] [email protected] 1 points 2 years ago (1 children)

How does your rust env setup look like? I've recently setup a full flake based dev-env, that uses fenix. It works great, but I'm interested in hearing a professional opinion

[โ€“] [email protected] 2 points 2 years ago

When I worked for Prisma, you can check our rust setup from the public flake:

https://github.com/prisma/prisma-engines/blob/main/flake.nix

CD to the project and nix-direnv loads the flake. Get to work.

Now when I'm working in Grafbase, our flake is a bit different:

https://github.com/grafbase/grafbase/blob/main/flake.nix

Instead of the Rust overlay, we use rustup and rust-toolchain.toml. This makes it easier to enforce the same Rust version for nix and non-nix users.

Both ways work really well. The deal is to define the rust env per project instead of defining it globally. Use direnv to make it working seamlessly.