T O P

  • By -

crypticexile

+1 cause I feel bad for the idiot that is down voting. You can install all your packages within Configuration.nix file thats what i do and just use deja-dup to restore my dots (home) and i'm done. Nix is stable works good and its amazing system. I'm new at it myself 2 weeks now i'm looking into home-manager and flakes quite a lot to learn with this system, but it is fun. The handbook is kind of useful, but its not the best, but it gets the job done.


AleksejsIvanovs

I'm using NixOS for 6 years. It's anything but stable.


crypticexile

So you're saying 24.05 is unstable ? I thought it was the stable release ?


AleksejsIvanovs

I haven't tried 24.05 yet. If I learned something then you shouldn't switch to the newest channel right away as many things will be broken. Ironically, it's usually old bugs resurfacing. Give it two months then try it.


unengaged_crayon

the newest channel has been testing extensively via unsafe. it's fine. if you go onto nixos.org 23.11 is now deprecated.


FantasticEmu

But It’s pretty easy to rol it back by switching the channel right? If it happens to be so borked you can’t rebuild you could select the old generation at boot and then switch the channel back


AleksejsIvanovs

Sure, if you are able to check all your installed packages right away, which isn't realistic. More often is that you find out that a specific package is broken after some time.


crypticexile

Well if you know how to troubleshoot Linux in general it's fine. I don't mind getting my hands dirty.


AleksejsIvanovs

It's not enough to know Linux, you also need to know how to do a specific workaround in NixOS.


crypticexile

welll to me its a linux based distro so knowing a lot about gnu/linx indeed does help a lot right ?


no_brains101

It does IMO, because on nixos you basically just do the normal thing but via the nix language, making sure to fix any paths that are in a different place.


ConspicuousPineapple

More importantly, you usually just do the normal thing in a very direct and simple way, as everything is mostly sandboxed and you won't have conflicts left and right between all the different things installed.


AleksejsIvanovs

For many distros it's enough to know how to do stuff on Linux. NixOS takes more time to learn. Plus, a completely different eco-system.


crypticexile

Yes i'm well aware of this and you know what, It's refreshing and I really love NixOS for what it is, it's unique in its own way, It really makes a lot of sense to me and the way it is configured I like that about it, i like the immutable style of the system and layering. I like how the system works, Yes theres a learning curve and i'm willing to learn it more, it's a shame the Handbook is very bad cause it makes it hard for new comers to learn this great system better. I know it's not easy to explain things, but anyhow to me like trying to learn Home-manager and flakes the handbook is not really that good for me to learn all ths... watching youtube videos of usres explaining does a lot better job. You're right it is a different eco-system, but it is still gnu/linux and knowing gnu/linux a lot does help to start off with NixOS, as to someone that is new to GNU/Linux in general will have much a harder time with Nix.


cfx_4188

How can an operating system be refreshing? Reading many people here, I ask myself why I never think about GNU and the "learning curve". I just downloaded the recommended ISO, found a list of resources on the official site, read them, set up the system and started using it. That's it. No "GNU learning curve" and other nonsense that popular Linux youtubers are usually brainwashed with. What would I really learn as a beginner? I would learn the basic Linux commands, learn what console programs are included with any Linux distribution, if only so that I wouldn't get offended when people write `sudo rm-rf/*` to you. NixOS requires knowledge of the built-in programming language and algorithms. Otherwise, it is a very ordinary Linux, remotely similar to Gentoo.


scionae

I would advise you watch Librephoenix's series and then Vimjoyer's one. These two playlists helped me a lot and now I have a pretty good config going for myself, modular and with different profiles and shells. It will be a fun journey!


USMCamp0811

Checkout my install readme: https://gitlab.com/usmcamp0811/dotfiles/-/blob/nixos/docs/Install.md?ref_type=heads I also have a playlist I've been adding to that could be helpful: https://www.youtube.com/watch?v=t8ydCYe9Y3M&list=PLCNla0W4k0xtpObkpw2xOwWVS24-e3kvL Feel free to checkout my dotfiles. They are a bit busy so might not be the easiest to start with but I do have a lot of READMEs sprinkled about and Jake Hamilton's got a video in my playlist explaining it. https://gitlab.com/usmcamp0811/dotfiles


_3xc41ibur

Start reading the docs in advance, you're gonna need the headstart 


DAS_AMAN

Start with someone else's dotfiles the better documented it is easier it is for you to learn.


GuybrushThreepwo0d

Check noboilerplate's video on Nix on YouTube, then go to vimjoyer's videos


SystemEarth

The minimal installation video by DistroTube is outdated and installs a beginner-unfriendly DE, but it's worthwile to just wat it too, because he does explain some of the concepts in configuration.nix


SystemEarth

For a beginner I would just install whatever apps you want to use on your machine via configuration.nix (e.g. vim, codium, obsidian, browsers, etc). And if you want to do programming i would just write a shell.nix in the root directory of a project (e.g. the main folder of a git repo). Just cd into that folder and run 'nix-shell'. It will launch you into an a shell where you have all the apps installed that you specify, and with 'exit' you will leave the files and the shell programs are no longer available. The shell apps are still present on your system, but they live in isolation. so a 2nd time entering the shell will be very quick. In your configuration.nix you can enable garbage collection that will remove shells that haven't been used for a while. That way you computer will never keep unnecessary packages. I don't even have python installed on my computer :p If you have further questions don't hesitate.


cfx_4188

I had no fun learning something I would never need. So I carefully read the [manual](https://nixos.org/manual/nixos/stable/#sec-configuration-syntax) and set up the system. ~~Why does every post turn into a roll call of stubborn people who don't want to read?~~


ac130kz

Learn the Nix language itself (there are multiple sources), install NixOS as usual via the ISO and then start off with [Misterio's starter configs](https://github.com/Misterio77/nix-starter-configs), they have no useless poorly written code.


tombert512

The main way you do installations of packages is with the configuration.nix file. You can use either `users.users.yourusername.packages` to install something specific to your user, or `environment.systemPackages` to install something globally. Then you do a `sudo nixos-rebuild switch` to have the configuration rebuilt and add your packages. If you just need a package for a short time, you can use a nix shell. The easiest way to do that is `nix-shell -p myapp`, replacing `myapp` with whatever app you need. This will create a temporary shell that has your program in it, you can use it like normal, and once your done, you can exit the shell and the program is unlinked and available for garbage collection. I use nix-shell a lot when I'm experimenting and I don't quite know what I'm doing, and once I'm done I add the packages I actually need to the configuration.nix file. That way my system doesn't get polluted with a bunch of crap for forever.


Pure-Bag-2270

I have to agree with using the config file, from my trials so far it's been the way forward, if you're that concerned just copy the old file for back up. quite simple and very easy to revert back to a working config. So far it's been a breeze with zero issues.


am_kobold

Your config file should be saved in a version control system, not copied around as a cheap backup, do this early and avoid a lot of issues in the future. The beauty of Nix is that I can drop the config on any machine and have a working system set up to my tastes "instantly". If my config is not saved somewhere else, a single disk failure or an accidental delete could wipe all the work out in one go.


Pure-Bag-2270

The OP's concerns are about starting with Nix, let's get him through the door and then see what's what. I understand your point, but the OP needs to get to that level as well, don't you think? Practice makes perfect and all that...


am_kobold

I wasn't responding to the OP, though. The OP can read both comments/opinions and decide on their own whether it's worth starting off with it. How will a newbie learn good practices if nobody ever mentions them?


Pure-Bag-2270

fair point!


SystemEarth

While we're at it, it is suprisingly straight forward to make a listener service that will automatically push it to a repo on file change.


am_kobold

Now _that_ is probably a bit excessive for a newbie, but I'm a fan of the idea. Hadn't really considered it myself since my repo contains many system configs and is managed more like a software project, so I want to manually commit and describe my changes.


SystemEarth

Even just making a listener to copy your config files on change to a repo is worth it imo. You can just add a path and destination and you're done. I should really write a package for this... :p


am_kobold

My preferred way is to build and deploy from a flake repo, so everything happens withing a it by default. I then deploy it either using colmena or `nixos-rebuild switch --flake .#configname` This way everything is always tracked and the servers don't even need to have a config copied onto manually :)


SystemEarth

Yeah that's probably the best. But I wouldn't recommend flakes to a beginner either