NixOS is NOT for Beginners

  Рет қаралды 23,617

Titus Tech Talk

Titus Tech Talk

Күн бұрын

Пікірлер: 63
@vasudevanperumal4739
@vasudevanperumal4739 Жыл бұрын
I work at big tech company that manages 350,000 edge computers deployed across the globes. We have about 40 software dev teams deploying applications to these edge compute machine and edit certain system level configs like kernel settings fairly often. To accommodate all these developers and ensure a deterministic system with reproducible deployments across this large fleet I am pushing to adopt Nix and NixOS, the steep learning curve that the software dev teams have to ramp up to is one of out concerns with adopting Nix.
@elbahek
@elbahek Жыл бұрын
Hey man, that’s worth an article not just KZbin comment
@joonasfi
@joonasfi Жыл бұрын
I fought with Nix almost the whole workday today, almost everything I learn about it I don't like. People keep hyping it but honestly it's a misery. The good thing is the (supposed) reproducibility and the fact that everything is codified. The idea is a winner. The implementation suuuuuucks. For example "buildDependencies" in Nix code actually means runtime dependencies. It's little things like that that Nix has layers and layers of. Even the progress bar on Nix copy doesn't work. It shows completely made up numbers that have little relation to reality. It tells me it's downloading a terabyte of content but it's actually downloading 16 GB. I could go on an on.
@_modiX
@_modiX Жыл бұрын
@@joonasfi I have a similar experience after wasting 3 days with this. It was pretty smooth until I hit software that I needed to compile (fetchFromGitHub + mkDerivation) of which the Makefile was full of issues (absolute paths, etc). Then I learned the essence of Nix when it comes to ensuring build and runtime dependencies can be resolved: You need to botch and patch software in shell hooks to make the derivation work. It even gets more extreme when you try to do that for software that runs by an interpreter (I didn't went that far). For me as dev, I need a reliable way to compile things within minutes and not hours. I'm not sure I want to go even deeper this rabbit hole.
@beastade
@beastade Жыл бұрын
{ nix = { settings.auto-optimise-store = true; gc = { automatic = true; options = "-d --delete-older-than 14d"; dates = "weekly"; }; }; }
@liesdamnlies3372
@liesdamnlies3372 5 ай бұрын
NixOS: “There’s an option for that.”
@zhongxina728
@zhongxina728 Жыл бұрын
You can delete old generations, NixOS is perfect for tinkering, because whatever you do, your system won't be broken. Also cache bloating up can be cleaned up with nix-collect-garbage -d
@joshua_lee732
@joshua_lee732 Жыл бұрын
I've broken nix plenty of times, I wouldn't call it unbreakable. Generations are great right up until their not. Yes it is possible to not be able to boot into an older generation.
@nixnox4852
@nixnox4852 Жыл бұрын
@@joshua_lee732 That's when you revert to a ZFS/BTFRS snapshot
@relaxandfocus5563
@relaxandfocus5563 Жыл бұрын
@@nixnox4852 What are those? Is there any official documentation about them?
@ghost64690
@ghost64690 27 күн бұрын
maybe except if you try to change the desktop environment
@itme_brain
@itme_brain Жыл бұрын
Regarding the nix store bloat, you can delete unused derivations with the garbage collector. You can also limit how many generations GRUB keeps in the boot menu and you can automate the garbage collection, all through the config file.
@cherpcherp-i9v
@cherpcherp-i9v Жыл бұрын
My thoughts exactly, the lead in complaint he has in this video is easily correctable with very little effort.
@griefhound
@griefhound Жыл бұрын
What's the syntax for limiting the amount of boot entries?
@Horesmi
@Horesmi 6 ай бұрын
The voices in my head told me to use it, so that's how we run.
@yeshey5443
@yeshey5443 Жыл бұрын
I actually became a bit more of a tinkerer when I moved to NixOS, the way I do my tinkering is not exactly doing things just to see how they work, I tinker to make something work like I want, be it GPU sharing to a VM, a way to use a laptop as a second screen, setting up a node to help a decentralised network, etc. But after changing distro or reformatting the PC or even maybe just an update, those things break with time, but with nixOS I can be sure that they will never break, so it launched me into a year of tinkering where I was setting things up and making configuration for things that I know would work even if I had to reinstall my system or the disk failed etc. I'd argue it's good for tinkerers, but maybe not the best place to _start_ for tinkerers. About the snapshots and storage, you can limit the amount of snapshots and set the garbage collector to do its thing periodically, there's an option for it in the configuration, it's still a little heavy on storage, but that has more to do with every application having its own dependency tree, which is comparable to a flatpak application having all its dependencies bundled, imagine every app on your system was a flatpak..
@russellsheridan3957
@russellsheridan3957 10 ай бұрын
Isn't a blindspot here that while it will work, it wont be receiving security updates?
@felixjohnson3874
@felixjohnson3874 8 ай бұрын
Does Nix support tiered caching? In other words, "save 1 snapshot from a year ago, save 6 going back 6 months, save 4 going back 4 weeks, and save every snapshot younger than a week, BUT if the snapshot is older than a day move it to /run/media/usr/FatAndSlowHDD/NixWarehouse/" I don't mind storage usage, but I *_hate_* storage being used on certain drives. More than maybe a 1/10th of my main Nvme being spent on applications and OS shit just should not be acceptable to anyone IMO. (TBH I wish more work went into tiered caching. Chances are you have dozens of applications you *_almost_* never run, but want to keep for if/when you need them. Being able to have those applications automatically moved to somewhere else, then copied back to the main drive if/when you open them so they act snappy (after a brief delay) would be gold.)
@asunavk69
@asunavk69 Жыл бұрын
Not really about nixOS, but valve will seems to be working on putting on the nix package manager on SteamOS, seems kinda neat, hope it works out great :>.
@asunavk69
@asunavk69 Жыл бұрын
@@tvh369 exacly i myself have not tried it yet no real need thus far, but i see nix and kinda distrobrox as tge future of package management for linux.
@vpxc
@vpxc Жыл бұрын
You don't have to 'set up' the Nix garbage collector. You can run it at any time with `nix-collect-garbage` or (if you're using the new CLI) `nix gc`. If you know you don't need to roll back to old generations anymore, you can use `nix-collect-garbage -d`, and it'll garbage collect the old generations. Same for file-level deduplication via hardlinks with `nix-store --optimise`. You can also leverage block-level deduplication with ZFS for /nix/store, and you get a huge space savings with those latter two optimizations combined.
@CodeMonkeX
@CodeMonkeX Жыл бұрын
After spending the last few weeks trying to get my head around NixOS I agree that it's not for most users but for different reasons. I think purely for the learning curve of the config, the nix language, poor documentation and the lack of tools to help configure it. I do not think the snap shots are a problem. I limited mine to 15 snapshots, and I am going to decouple my home manager config from the system config using flakes. So then I do not take a system snapshot every time I make a config change. I think in the end for my situation I am probably going to end up with a normal distro like the new Debian and maybe just use home manager and maybe Nix on top of it.
@hxxzxtf
@hxxzxtf Жыл бұрын
that is what im thinking, using debian with nix as a potent stable system to use.
@clocked0
@clocked0 Жыл бұрын
I've been having a good time tinkering with Nix
@JohnSmith-ky2qn
@JohnSmith-ky2qn Жыл бұрын
System generation is NOT a snapshot. Every time system is built from the same version of the channel, it reuses everything and writes down only the difference. You can have thousands of generations and they all still could use ~the same amount of storage as a single generation.
@Muaahaa
@Muaahaa Жыл бұрын
I actually think generations and managing configs in source code makes tinkering even easier since you can rollback, see what exactly you changed, and ultimately you can reinstall the system and get back to a point in your source code very easy if you borked it bad enough. I also do a lot of tinkering across devices and OS (NixOS and MacOS). When I get some things I like, Nix makes it a lot easier to propagate the change across my devices.
@tkd128
@tkd128 Жыл бұрын
Exactly, 273 snapshot means he made 273 changes, and can instantly revert back to any of them. Or he could just run garbage collector to wipe the old versions from the cache. That's a silly argument. Try to switch from KDE to Gnome, or switch major versions.Or X11 to Wayland on other OSes. If you mess something up you might need to reinstall the system, here you can just rollback. Also about "wonderful experience once you understand the OS", I don't think that's true either, there are OSes that do not have wonderful experience even when you're expert using them. I mean Chris even mentioned what a pain is to administer Windows in the same video. There are also sh_tty linux distros too.
@LinkEX
@LinkEX Жыл бұрын
Absolutely agreed. I'm not a poweruser by any means, but NixOS seems perfect particularly for newcomers interested in tinkering. The rollback feature gives assurance because you can't really screw up your whole system. And having one file as a source of truth actually makes things _less_ overwhelming than knowing FHS in and out, and where the files you want to tinker with are and should be placed.
@benjy288
@benjy288 Жыл бұрын
I just installed nixos on my mother's two computers because I upgraded her debian bullseye install to bookworm and one of them resulted in an unbootable system, couldn't load sysroot or something, so nixos is a great solution because there's no fear in upgrading anymore, because it doesn't over wright the existing install, if something breaks just reboot into the existing generation.
@anasouardini
@anasouardini Жыл бұрын
So if we compare writing 100s of scripts to learning NixOSs language, which one would win?
@svaira
@svaira Жыл бұрын
I do think its a great OS for me now, but I dont really tinker on a system wide level. The only big issue I had was findng the correct LLVM package (cause the search doesnt show the .dev packages, and pkg-config is configured with env values instead of globally), but if you just use the OS for applications and locally compiled stuff (i.e. make without make install) it works out fine what I like is that the configuration is all together, and I dont have to look in 15 places for things a distro (like debian or fedora) installed that i dont completely understand and probably wont ever (like systemd, which is just really big and interacts with so many other things). I think NixOS is on a similar level to Gentoo, Slack or a BSD system, in that its a lot more manual, but less confusing if you want to understand what you did / how to replicate it, and from those four its probably the hardest to break. (although, I have to say, I really like BSD, the only reason I dont daily drive FreeBSD atm is that the Kernel doesnt have suspend to disk/ram properly implemented. So either some point I dont have to care about that, or I set up a proper Gentoo or Slackware install.... or an LFS xD.... no, probably not, I would rather go for Alpine maybe, but those are the things that are similar enough to be considered in the same sentence in terms of which people want it / could manage it)
@laughingvampire7555
@laughingvampire7555 Жыл бұрын
dude, you can delete the snapshots
@donkey7921
@donkey7921 Жыл бұрын
thats not the point, you can’t be constantly deleting and deleting.
@tui3264
@tui3264 Жыл бұрын
@@donkey7921 it can do it automatically
@LiterateGoblin
@LiterateGoblin Жыл бұрын
@@donkey7921 yes tf you can lol it might be the easiest thing nix has to offer.
@auraevoe2036
@auraevoe2036 8 ай бұрын
@@donkey7921 { nix = { settings.auto-optimise-store = true; gc = { automatic = true; options = "-d --delete-older-than 14d"; dates = "weekly"; }; }; }
@Cohen-
@Cohen- 7 ай бұрын
{ nix = { settings.auto-optimise-store = true; gc = { automatic = true; options = "-d --delete-older-than 14d"; dates = "weekly"; }; }; } Copied this from another comment
@nhefner
@nhefner Жыл бұрын
I like the idea of NixOS, but I've had a hard time getting all my packages installed and working properly. My display manager Ly for instance which works perfectly on Arch wont work properly on NixOS without doing a ton of hacking on it.
@Oi-mj6dv
@Oi-mj6dv 8 күн бұрын
Yes, DFSR troubleshooting was.... Something else
@skyguy4164
@skyguy4164 Жыл бұрын
You can tinker without filling up your hard drive if you set proper limits and use flakes and lock the version for a while. But I do agree that it is not for a new user.
@magnificoas388
@magnificoas388 Жыл бұрын
TT: "...there is a lot of housekeeping that has to ne done..." LOL.
@juliar8806
@juliar8806 Жыл бұрын
Really funny watching this video after just installing it on my main system :)) either way i'm happy to learn it ;)
@Joris-KarlHuysmans
@Joris-KarlHuysmans 4 ай бұрын
With NixOS, apart from having to learn Linux, you have to learn declarative programming. And in order to learn declarative programming in the context of NixOS, you need to know how Linux works reasonably well. Confusing, but that’s how I see it. If you don’t know what goes in between instructions at least in general terms, you’ll have the worst time of your life, rest assured. However, once you get it, you’ll never look back. It’s that good.
@gaspumprepairservice7009
@gaspumprepairservice7009 Жыл бұрын
@Titus Tech Talk .. so a super noob here (regarding Linux) if NixOS isn’t for beginners, what IS the recommendation for a starter? Thx.
@deviantsemicolon618
@deviantsemicolon618 Жыл бұрын
It's widely held that the most beginner friendly Linux distro is Linux Mint, so I would go with that.
@sethbrown1763
@sethbrown1763 Жыл бұрын
I agree. I generally install Linux Mint for newbs. They get it with no trouble.
@BenBurkeSydney
@BenBurkeSydney Жыл бұрын
Chris and everybody.... I've been on the deep dive with nixos for a week or so now. I think it really does have a place in my Daily Drive world... as follows: - A good deal of my time in front of daily driver(s) (and there's always at least 2) is watching video. While I did find a reasonable compromise with proxmox VMs and Spice that was actually usable... and maybe it will be one day.. - I'm making new environments and hacking around all the time. VMs are perfect for this. Right now, I'm thinking that a good strategy for me might be: - Base OS on the machines I use face to face should be nixos. I wanna be disciplined enough to re-install, pull my latest configuration.nix, rebuild and unzip some config files ... regularly. - Create and destroy VMs all the live-long day, and never bother too much about getting them right (security hardening, scripting everything) ... and this might be an old bias of mine, but let me say it out loud. My first OS (DEC VMS) allowed me to take what it called an image backup ( only crash consistent initially, but even that was good enough for an emergency bare metal restore). ... I think that a nixos as daily driver strategy gives me that ability again... I'll still need a fixup script (config files etc), but it'll be close enough. Finally - With nix as a package manager, I might actually use OSX from time to time (no fan of homebrew).
@magnificoas388
@magnificoas388 Жыл бұрын
I enjoy my NixOS as a daily driver ! and use automatic garbage collector...these "snapshots" in your nix store live in a cache. NixOS uses indexes to point to the usefull packages so that your system will never be bloated.
@CodeMonkeX
@CodeMonkeX Жыл бұрын
Yep. That’s a problem with it though. It took me like four tutorials before I saw the auto garbage collection.
@vpxc
@vpxc Жыл бұрын
​​​​@@CodeMonkeXWhy would you read 4 third-party tutorials without cracking open the Nix manual once? The garbage collector appears on the very first page, in the 'Introduction' section. The NixOS option for running the garbage collector automatically also appears alongside the manual options in the NixOS manual under Administration --> Cleaning the Nix Store. Don't try to rush things with third-party docs and read the actual first-party manuals. The Nix community can't control what third-party tutorials do or don't include.
@rafaeloledo
@rafaeloledo 4 ай бұрын
im back on archlinux btw
@riccardogianluigiterzaghi
@riccardogianluigiterzaghi Жыл бұрын
Direi che il nuovo orario di pubblicazione va benissimo. Personalmente non ho una preferenza sul giorno ma l'ora mi sembra ben scelta, dato anche il ragionamento sull'algoritmo che hai fatto. Quindi avanti tutta e in bocca al lupo!
@garjura4659
@garjura4659 Жыл бұрын
Use Gentoo
@benjy288
@benjy288 Жыл бұрын
Why didn't you just do a garbage collection?
@adjbutler
@adjbutler Жыл бұрын
I am the sysAdmin for my family... does that count???? ❤
@MartinAhlman
@MartinAhlman Жыл бұрын
I know some shit, and I love Debian at work! At home, that's another thing :-D
@adjbutler
@adjbutler Жыл бұрын
NixOS has garbage collection and you can set the maximum generations to store as well. A lot of the snapshots will have overlap in the nix/store. You can automate the GC, YOU DID NOT TINKER with that yet??? TITUS IS SKIPPING OUT ON TINKERING!!?!?!?! NixOS is if you want to run the same or similar system on your desktop, laptop, tablet, phone, and other such devices. You setup your user config once, then deploy to all these targets and you know that all your configs are backed up for all your devices. So when you get a new devices, reinstalling is no headache. (And we all always end up needing to reinstall/resetup our devices given enough time) So if your phone breaks, no sweat. Just redeploy. We are all sysAdmins at the end of the day. Just different timeframes. ❤ Yes, NixOS is for people who KNOW they need it and can appreciate what it gives you.
@joshua_lee732
@joshua_lee732 Жыл бұрын
How I learned NixOS? I learned it buy realizeing and telling myself that NixOS is NOT linux
@azareii
@azareii Жыл бұрын
I disagree. It uses very different systems for many things, but at its core, it's still formed from the Linux kernel with GNU tools. I tend to think of it as Linux with a central config. Though I suppose I do have to set it apart from all other distros so you do have a point.
@cherpcherp-i9v
@cherpcherp-i9v Жыл бұрын
sudo nix-collect-garbage -d < pretty sure this will solve the clutter...
@plusone.network
@plusone.network 3 ай бұрын
only IF there were a delete feature like when the garbage man/collector takes the shit away from the front of my house that i left out when i don't want or need it anymore....🤷‍♂
NIX OS: the BEST package manager on the MOST SOLID Linux distribution
17:08
The Linux Experiment
Рет қаралды 328 М.
Why Linux isn't more popular
13:41
Surfshark Academy
Рет қаралды 258 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
NixOS: Everything Everywhere All At Once
15:10
No Boilerplate
Рет қаралды 341 М.
Windows & macOS can't do this, but Linux can!
15:55
The Linux Experiment
Рет қаралды 990 М.
You Should Use Flakes Right Away in NixOS!
26:09
LibrePhoenix
Рет қаралды 76 М.
I Used NixOS For 9 Months - Long Term Review
35:54
The Linux Cast
Рет қаралды 65 М.
The AI LIE
19:14
Titus Tech Talk
Рет қаралды 9 М.
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 160 М.
Installing Linux The "Right" Way
18:43
Chris Titus Tech
Рет қаралды 710 М.
NixOS Has One BIG Problem
17:48
The Linux Cast
Рет қаралды 76 М.
Is Nix Your New Terminal SUPERPOWER?
15:21
DevOps Toolbox
Рет қаралды 30 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН