[-] ruffsl@programming.dev 2 points 1 year ago

Yep, with a Turing-complete DSL, there's never just one way to do something in Nix. I find the interaction between modules and overlays particularly quirky, and tricky to replicate from public configs that make advance uses of both.

That said, I do appreciate being able to git blame into public configs, as most will include insightful commit messages or references to ticketed issues that include more discussion with informed community members you can follow up with. Being able to peek at how others fixed something before and after helps give context, and with the commits being timestamped, it also helps gauge current relevancy or chronological order to correlate with upstream changelogs.

Are you using flakes with lock files, or nixpins to fix down the hashes of your nix channel inputs? I like fixating my machines to the same exact inputs so that my desktop can serve as a warm local cache when upgrading my laptop.

[-] ruffsl@programming.dev 2 points 1 year ago

Thank you for the detailed reply, much appreciated!

Any rough edges you've encountered yet? Like using USB peripherals, or networking shenanigans? I'm assuming it's using the host network driver by default, and maybe bind mounting /dev/bus/usb for USB pass through?

Think I'll really dig into distrobox today.

[-] ruffsl@programming.dev 2 points 1 year ago

You inspect the /proc file tree or ps utility command:

[-] ruffsl@programming.dev 2 points 1 year ago

Do you know of a complete example or live config I could read through as a reference for that first method recommended?


I'd also be interested in complete examples for a working pair of remote builder and local client (both NixOS multi user), as all the documentation I've come across thus far are either:

[-] ruffsl@programming.dev 2 points 1 year ago* (last edited 1 year ago)

If you just want to quickly create a local python develop environment on the side using Python module metadata, installing uv from nixpkgs, and enabling nix-ld to run pre-compiled binaries from PyPI keeps things simple, and replicating the same virtual python environment workflow you to have on any other distribution:

https://discourse.nixos.org/t/i-want-understanding-nix-packages-and-flake-basics/67365/3

If you wanted to package a python module for nix or for proper distribution via nixpkgs, you'd want to add a nix derivation file that encapsulates all the inputs, i.e. software building materials (SBOM). There are existing nix library functions that can automate most of the packaging, not unlike Debian macros:

https://wiki.nixos.org/wiki/Python

The second approach is more rigorous, and combined with something like flakes for pinning the exact hash for all inputs via lock file ensures reproducibility, like when sharing with other nix users. While as the first approach is more subject to your current system, i.e. linking to whatever system wide libraries are presently installed, but it's less upfront effort to reuse existing python-package-managers than to nixify everything.

[-] ruffsl@programming.dev 2 points 1 year ago

Thank you for your work!
I would not have liked encountering this bug in the wild.

[-] ruffsl@programming.dev 2 points 1 year ago

I'll preface that NixOS may not be for everyone, as deviating from a conventional hierarchical file system is a radical departure from conventional distributions; but for those that want precise control over their system environment, it has a good deal of appeal.

For example, I appreciate being able to use the latest bleeding release of a number of tools while sticking with older trusted versions of other utilities, but if both relied upon different versions of similar dependencies, such package conflicts can be troublesome to resolve, as few Linux package managers gracefully deal with multi version installs.

For NixOS using the nix store, installing leaf packages that traditionally conflict is trivial, and as a user, I can spend less time managing every transitive dependency in order to use the software I want. Not having to wait for a disjointed ecosystem of packages to synchronize around dependencies, or resorting to compromise in package version selection is very liberating.

The functional language and documentation for nix itself is a bit quirky, as I wish it was stronger typed, but being able to declaratively express and version control my setup across workstations has been a time saver; installing/configuring something once and then have-done with it.

[-] ruffsl@programming.dev 2 points 1 year ago

Nix-ld is only used by unpatched executables that use the link loader at /lib or /lib64. If you use for example python from nixpkgs than it will not pick up NIX_LD_LIBRARY_PATH and NIX_LD since these types of binaries are configured to use a glibc from the nix store.

Ah, I guess that's why I've seen folks recommend just having uv install the python interpreter as well, so everything python uses the same link loder from nix-ld.

[-] ruffsl@programming.dev 2 points 1 year ago

I would have liked the PyCon25 talk directly, but I don't think the recordings have been published yet:

https://slides.com/bittner/pycon25-nixos-for-python-developers#/2/4

Hopefully the presenter discusses more on their later slides in using python on NixOS and working around python packaging's use of dynamic linking.

[-] ruffsl@programming.dev 2 points 1 year ago

I'd love to find an example NixOS config to simply reproduce and import Clear Linux's kernel config. There are a few already for replicating CachyOS's kernel variants:

Although I'm not sure that those approachs still use clang instead of gcc?

103
62
YOLO-Driven Development Manifesto (andersoncardoso.github.io)
114

So, a recent skit about agile development from Striped Giraffe reminded me of this silly parody that my CSE PhD colleagues did back at UCSD in 2016 for the holidays. The solo in the middle hits hard, so check the subtitles for the lyrics if you can't catch the jokes as they fly by so fast.

Related:

20
39
submitted 3 years ago* (last edited 3 years ago) by ruffsl@programming.dev to c/programmer_humor@programming.dev
15

cross-posted from: https://programming.dev/post/1687844

Now, I know this isn't quite a meme, given the bad UI here is being used to troll scammers, but this video relates to a popular post here from two months ago, and I thought folks would find this just as humorous in watching others struggle with the same password checker as we all did before:

14
260

Now, I know this isn't quite a meme, given the bad UI here is being used to troll scammers, but this video relates to a popular post here from two months ago, and I thought folks would find this just as humorous in watching others struggle with the same password checker as we all did before:

124
17
110
94

Dang, I've been using sync for more than a decade, and even I did not know that sync had multi window support on Android. I think there needs to be a continuous education workshop, video tutorial series, or a sphinx style docs site on all these features when the beta dust settles. Multi tasking is so handy. FYI:

[-] ruffsl@programming.dev 2 points 3 years ago

Looks like the script author is asking for advise on how to provide it as a theme. Perhaps you might be able to help them with just that:

[-] ruffsl@programming.dev 2 points 3 years ago

For posterity, I later stumbled upon the authors original post here:

The community that this was posted from also looks interesting:

view more: ‹ prev next ›

ruffsl

0 post score
0 comment score
joined 3 years ago
MODERATOR OF