NixOS - How the store and packages work

  Рет қаралды 15,316

DorianDotSlash

DorianDotSlash

Күн бұрын

Пікірлер: 62
@reisen1553
@reisen1553 4 жыл бұрын
I use NixOS for about a year, but I never knew for sure how it works. Fortunately your video made it very clear to me. Thanks as always.
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Phoenix Great to hear! Also check out my other 2 NixOS videos if you haven’t already seen them 😉
@Sinnersmight
@Sinnersmight 4 жыл бұрын
I want to swap to NixOS asap now. Clean, contained, sane dev environments for building and projects is a godsend. This alleviates a lot of my ocd concerns. Thank you for enlightening us, I cannot wait to dive deep into nix!
@idjdbrvvskambvvv9007
@idjdbrvvskambvvv9007 Жыл бұрын
hey bud how you doiin ?
@gilbertogarma2820
@gilbertogarma2820 4 жыл бұрын
I am impress for the quality and how clear are your videos, another good point is that you don't have music in the videos, is something like sitting in the classroom listen and learning, you are a peaceful place in the noise world of youtube, fine voice to listen, thanks
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Thanks very much! I try hard to make the audio clear and also use noise cancellation as well. I do have music in the background but it's very subtle. If you turn up the volume you'll hear it. I use it to cover up any remaining background sounds and clicks and buzzes etc. Cheers!
@Mikesco3
@Mikesco3 Жыл бұрын
Can you do something covering NixOS flakes?
@pinpox
@pinpox 4 жыл бұрын
Watched your last video on nix and you got me into nix. Please continue this series!
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Thanks! Not sure how many more I'll make if any. The first one was very popular, but the 2nd and 3rd not so much...
@pinpox
@pinpox 4 жыл бұрын
@@Doriandotslash how about one about home-manager for user setup? I'm in the process of reorganizing my dotfiles with home manager and there sure is a lot to discover.
@vincentm99
@vincentm99 4 жыл бұрын
​@DorianDotSlash This could be of interest to you as well (nix flake + home-manager): ​@@pinpox yeah this is quite nice. Combined with nix flakes, you can update your environment directly from a configuration on github which is just insane. Install the nix flake experimental feature: nixos.wiki/wiki/Flakes then just do: sudo nixos-rebuild switch --flake github:Narice/nixos-system/master and you'll have my config (with users etc, so maybe clone it and change a few things before using it x))! Just INSANE. And it will always work due to a flake.lock file that makes sure that the build is 100% reproducible (minus very rare events such as the deletion of a dependency, but this is very limited) I have home-manager directly in my flake so my configuration comes from there. I still have to migrate all my dotfiles to there but it's a good work in progress Also as an added bonus, you can put the flake wherever you want on your system, meaning that you do not need to use sudo to edit your files ;) Here is an example of a fully organized configuration based on nix flake: github.com/cideM/dotfiles The guy has his entire config in there which is super useful.
@fuseteam
@fuseteam 4 жыл бұрын
@@Doriandotslash a video on setting up flatpak and snaps would be interesting
@needMoreInput
@needMoreInput 11 ай бұрын
Please do more on NixOs. You teach so very well. Maybe cover flakes, home manager, etc
@b0ba_884
@b0ba_884 4 жыл бұрын
Great Video. A video on Home Manager Would Be great :)
@lucperkins9843
@lucperkins9843 3 жыл бұрын
Burke Libbey has a good video on Home Manager on his channel
@mementomori1868
@mementomori1868 3 жыл бұрын
You create best tutorials for this great os. GJ
@alexanders1859
@alexanders1859 2 жыл бұрын
This series really helped my wrap my head around Nix OS! Hopefully one day you come back to doing videos :D
@Doriandotslash
@Doriandotslash 2 жыл бұрын
That's the plan!
@cyberdyne981
@cyberdyne981 4 жыл бұрын
Dorian: I discovered your videos based on your Arch to Debian journey. I spent 2 years using Arch and switched away for similar reasons. I've just finished your 3 excellent videos on NixOS and built a VM to play with it. Wow! I think I may switch my main desktop and server machines to NixOS. THANK-YOU so much for the clear content! I do have a request/nudge. You mention in Part-3 that you might cover Virtual Machines and containers on NixOS. I would love to see you cover libvirt (virtmanager) using QEMU/KVM User session mode (qemu:///session) on NixOS. I found this to be a far superiour alternative vs VirtualBox which I had used for almost 8 years. I also use Docker on my servers, so Docker or podman on NixOS would also be interesting, but User Session libvirt VM hosting on NixOS would be probably enough for 1 video. Again - Thanks for the time you've put into these videos. I've now watched some others, but yours has been the best I've seen on NixOS.
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Thank you and I'm glad you enjoyed the videos! I've considered doing a video on VM's, but after playing with them for abit, I found them to be a little difficult to setup initially. I managed to get one running, but after some updates and a reboot, it woudn't start anymore for unknown reasons so I kind of gave up on it. For my, QEMU/KVM is a MUCH better system for running VM's and I'm going to stick with that.
@jonringer117
@jonringer117 4 жыл бұрын
A ".drv" is called a derivation. It's essentially "a recipe" which specifies how to build something specific to your system's architecture (e.g. x86_64) and platform (e.g. linux). I have an explanation of how they are created here discourse.nixos.org/t/site-intro-to-nixs-repeatable-builds-point-has-some-clarity-issues/9154/5 . Another way of thinking about .drv's is that they can be used to create nix store paths. This is how nix's binary cache works, your machine ask's "hey, do you have this unique package, with these exact dependencies?" and for most users, it will be "yes, I do, here you go". (unfree packages can't be distributed so certain applications like steam will have to be "built".) If you're doing something exotic like building all the packages against musl (e.g. `nix-shell -p pkgsMusl.curl`), then the .drv's provide enough information for your system to build the package and all of the dependencies from source. This is why I've also heard it been called "debian for adults".
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Yeah, that's what I said in the video : "do stuff with this stuff" lol I looked into a little bit but didn't get right into it. Thanks for the info!
@MiniLuv-1984
@MiniLuv-1984 4 жыл бұрын
NixOS looks like something I want to try. Your vid is excellent and clear to me - gives a great run down on how NixOS is put together, but I'm not clear how you create a "version" - say running firefox 81 on pantheon, whereas another "version" my be running firefox 80 on gnome that these two versions will appear in grub? Also what happens to user files, does the version with firefox 80 share the same user files as for firefox 81 (as an example)?
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Benny this is more of saving your system than creating specific versions. After system changes, updates, and adding/removing packages, a new version is automatically saved so that you can revert back to an old version is you should have any problems. It’s more of a backup and not really intended to be used to run parallel configurations. Check my first 2 videos on NixOS as well in order to see more of how it works. Cheers!
@MiniLuv-1984
@MiniLuv-1984 4 жыл бұрын
@@Doriandotslash That sounds like excellent advice Dorian. I will watch the other two!
@actuallyganta6044
@actuallyganta6044 3 жыл бұрын
I'm currently trying to decide on a Distro that works for me and NixOS really seems like the most intriguing to me so far, however while researching it I also stumbled upon GoboLinux, which seems to have some similarities. Have you had any experience with that distro and if so, how did you feel about it? Also, these videos are top notch, thank you so much for the work you put into these, they've been extremely helpful in helping me understand NixOS!
@Doriandotslash
@Doriandotslash 3 жыл бұрын
Thank you! I did try Gobolinux, but not for long. The lack of packages available as well as how old they were immediately turned me off of it.
@actuallyganta6044
@actuallyganta6044 3 жыл бұрын
@@Doriandotslash yeah makes sense and that's a big selling point for me with NixOS, so I'll stick to that. Thanks again!
@nelsono4315
@nelsono4315 Жыл бұрын
another excellent video. I just started using NixOS and so far I am loving it. I am fairly new to Linux, maybe 2 years. Decided to learn it during the pandemic. Your videos are so good for someone like me. I appreciate the work you do. Thanks!
@agostinom3539
@agostinom3539 3 жыл бұрын
Nice videos! How do you remove preinstalled gnome software (e.g. cheese)?
@Doriandotslash
@Doriandotslash 3 жыл бұрын
There's cerain software that can't be excluded, and cheese is one of them. For some dumb reason core components are dependent on it.
@Storm_.
@Storm_. 3 жыл бұрын
Nice explanation, also I've never heard anyone pronounce executable like that before, blew my mind :D
@xperience-evolution
@xperience-evolution 2 жыл бұрын
Isn't this system wearing out ssd's pretty fast if it always keeps all the Programs with every single version saved? Compared to Debian/Fedora. These days an update only brings in the new stuff and does not delete the old version and installs the new one (at least on most platforms), so it has to write less on the ssd than back in the day. But this seems to do exactly the opposite? I understand the benefit of it but is it possible to prevent that? Or did I understand everything wrong? Sorry this might be a noob question but I am just learning.
@pidusredlah
@pidusredlah Жыл бұрын
Delta updates are not available for Ubuntu, Debian, Tumbleweed or Arch. So Nix doesn't wear down an SSD any more.
@xperience-evolution
@xperience-evolution Жыл бұрын
@@pidusredlah But usually when there is an update it might only be a few MB but the whole program is maybe a couple hundred. So it only adds what is new or what is changed? Nix(OS) on the other hand downloads the whole app again and again with every update.
@ryantmulligan
@ryantmulligan 4 жыл бұрын
$ date -d @0 Wed 31 Dec 1969 04:00:00 PM PST Everything in the nix store has a timestamp of 0 for reproducibility.
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Ryan Mulligan interesting. Thanks for that. Is that info somewhere in the wiki or manual?
@jonringer117
@jonringer117 4 жыл бұрын
@@Doriandotslash Motivation can be found reproducible-builds.org/docs/source-date-epoch/ Can't find anything specific to nixpkgs. However, interesting fact, zip file format isn't compatible with dates prior to 1980.
@ryantmulligan
@ryantmulligan 4 жыл бұрын
@@Doriandotslash nixos.org/manual/nix/stable/#ssec-derivation at the bottom. I was wrong, the timestamp is set to 1 not 0.
@mskiptr
@mskiptr 4 жыл бұрын
So it's 1970-01-01 00:00:01 UTC and just the timezone on top of that?
@jonringer117
@jonringer117 4 жыл бұрын
@@mskiptr unix timestamp doesnt have a concept of timezones. Just an offset from the epoch en.wikipedia.org/wiki/Unix_time
@fuseteam
@fuseteam 4 жыл бұрын
ahhhh each of those folder are their own roots
@woss_io
@woss_io 3 жыл бұрын
You said `hash is different because the code is different. does the hash get calculated from the actual CODE or the name+semver? if it's the latter, then your statement is not correct. people can publish the versions and not change the code ( why ? because they can )
@Verzach3
@Verzach3 4 жыл бұрын
Do you recomend NixOS for daily usage ?
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Yes it works quite well! Just make sure you run the updates now and then because it doesn't do it automatically.
@jonringer117
@jonringer117 4 жыл бұрын
NixOS doesn't adhere to en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard . Meaning that if your daily usage includes downloading and using pre-built binaries, the NixOS experience is going to be a very rough one. The main benefit of nixos is being able to declare the configuration of your entire system in a single file. You can "sample" the nix ecosystem by just installing nixpkgs in an existing linux or mac machine nixos.org/download.html
@Verzach3
@Verzach3 4 жыл бұрын
Thanks I will try it out for a few days to see if it sticks to what I need
@06kellyjac
@06kellyjac 4 жыл бұрын
@@Verzach3 if you do want to run arbitrary binaries you download from GitHub/Gitlab/etc another option is to use nix + home-manager on any other distribution What I do for single binaries is if I have 3-5 mins I might package it for nix, if I dont or it requires a more complex packaging process I just whip out an alpine or Debian container
@nickegranis
@nickegranis 4 жыл бұрын
Cool, your installation is pre epoch =)
@kvngn
@kvngn 4 жыл бұрын
Epoch was midnight UTC, and he's in North America, which explains "Dec 31." Still looks pretty funny, though!
@vedantma
@vedantma 4 жыл бұрын
Unix time starts from 1st Jan 1970, maybe that's why.
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Well, someone pointed out it's because of this : nixos.org/manual/nix/stable/#ch-relnotes-0.7
@markkulyas2418
@markkulyas2418 3 ай бұрын
Oh no I spoke too soon your videos do have music playing in the background😢
@FixingGunsInAir
@FixingGunsInAir 4 жыл бұрын
I like NixOS idea and it's tempting to try out. Nix is awesome but unfortunately it's so a niche distribution that it doesn't have enough maintainers and QA. It could be better, but not enough people, I suppose. You know, GNOME 3.36 on unstable in 2020 is like not keeping up. And a week or two ago they had only 3.34. And the same thing with plasma, it's still 5.18... And pull request with 5.19 didn't made it in time, I suppose. Maybe it's happening because most of the contributors of NixOS is tiling WM fans or something? But I'm not the one. You can do the thing yourself, but you'll need to learn Nix *and* it's guts. There's no API, standard namings or a man for every package. Only the source code can tell you configurable options. And Nix is the only way to configure a system, because configuration is a derivation. And for me personally, it can't compete with Fedora Silverblue at all. Because Fedora manages to be both bleeding edge and tested (QA). And even production ready industry standard (Red Hat), really. Sad, but I can only make use of NixOS in VM or testing machine. I hope things will get better.
@FixingGunsInAir
@FixingGunsInAir 4 жыл бұрын
Good thing that if I configure it in a VM the way I like, I can replicate it on real hardware using only one text file. So, maybe it's not so bad.
@monsterpower3348
@monsterpower3348 4 жыл бұрын
first one here hahahahahah
@kabochaVA
@kabochaVA 4 жыл бұрын
One hour later, still the only one... :-/
@s.sliackus459
@s.sliackus459 2 жыл бұрын
Gobolinux very nice linux, unfortunately, no longer in development. They share some ideas with Nixos.
Qubes OS: How it works, and a demo of this VM-centric OS
25:03
DorianDotSlash
Рет қаралды 148 М.
NixOS Is A Fascinating Linux Distribution
34:51
DistroTube
Рет қаралды 154 М.
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 44 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 49 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 16 МЛН
Nix flakes explained
7:22
Vimjoyer
Рет қаралды 87 М.
NixOS Setup Guide - Configuration / Home-Manager / Flakes
3:01:39
Matthias Benaets
Рет қаралды 242 М.
Improving Quality of Life with YubiKeys on NixOS
21:32
EmergentMind
Рет қаралды 2,4 М.
How to install Gentoo Linux
46:51
DorianDotSlash
Рет қаралды 135 М.
The dark and murky past of NixOS (NixCon 2019)
30:02
NixCon
Рет қаралды 11 М.
NixOS - Sometimes Different is Brilliant
41:20
OldTechBloke
Рет қаралды 40 М.
NixOS Has One BIG Problem
17:48
The Linux Cast
Рет қаралды 76 М.
From nix-env to home-manager
8:58
Burke Libbey
Рет қаралды 15 М.
Beginner's Guide To The Linux Terminal
42:27
DistroTube
Рет қаралды 404 М.
NixOS Installation Guide
55:34
Wil T
Рет қаралды 39 М.
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 44 МЛН