this post was submitted on 26 Sep 2025
32 points (94.4% liked)

Linux

10863 readers
1001 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

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

Nix related discussion starts around the the 0:14:00 min mark.

you are viewing a single comment's thread
view the rest of the comments
[–] rozodru@piefed.social 1 points 3 months ago (1 children)

yeah basically it locks it to your current build/system.

So for example I use it for my overall system config. I have a flake, a configuration.nix, and a home.nix all of which are tied to my git repo. I make a change to the system be it installing a package or modifying something or other I can then push that to my git repo. Say I want to take my system as is and put it on another pc/laptop I can then go on the new machine, clone my nix repo, and build it now that new machine is exactly the same setup as my main machine. Like a few weeks ago I put Arch on my main machine for a couple weeks and then went back to nix. It took less than 10minutes to install NixOS and get my machine back to where it was exactly prior to putting Arch on it.

For Dev work flakes allows you to bypass the whole "well it works on my machine" since you develop in flakes you can take that development environment anywhere and it'll always work regardless of what machine you put it on.

Think of it sort of like a Docker container.

[–] clay_pidgin@sh.itjust.works 1 points 3 months ago* (last edited 3 months ago) (1 children)

Does having a flake lock the versions of everything, or just the packages mentioned in the flake? (I assume the latter)

I had a flake for a minute but since I had no idea what I was doing, I was more comfortable moving that stuff into my config.nix.

[–] Euphoma@lemmy.ml 2 points 3 months ago (1 children)

Nixpkgs is an input which does get locked

[–] clay_pidgin@sh.itjust.works 1 points 3 months ago (1 children)

Sorry, I'm not certain which way your answer goes. Nixpkgs would be all packages in the system, even if installed in config.nix or home.nix?

[–] Euphoma@lemmy.ml 2 points 3 months ago (1 children)

Nixpkgs is the nix package repo, and is an input you have to include if you want any packages. So yea

[–] clay_pidgin@sh.itjust.works 1 points 3 months ago

Okay, thank you!