Live data from Hacker News

NixOS and the Art of OS Configuration (2018)

rousette.org.uk

21–30 of 123 posts

Re: NixOS and the Art of OS Configuration (2018)

#21
post #4
post #2

I want to use NixOS so bad Or what Arch has become. But I want to believe

> Or what Arch has become. What has Arch become? I've been using it for 10 years and the only thing I can think of that has changed is the init system.

It is still very good for some things like as a desktop OS, has very good Steam/Proton ecosystem, etc.

Using Arch as a server can be a headache. Just today I updated a Arch VM running postresql. Postgresql needs to previous version present to do the upgrade. I had actually skipped a version (11 to 13) so Arch no longer had version 11 in the repos and old packages had broken dependencies.

I ended up just installing the Nix package manager on the system. I started a shell with Postgres 11 & 12 both present to do one upgrade. Then I used another shell with 12 & 13 to do the final upgrade. It took like 10 minutes vs the hour I had spent trying to rollback packages on Arch.

Re: NixOS and the Art of OS Configuration (2018)

#22
I literally just gave NixOS a go day before yesterday. The two things I noticed if you want to use NixOS as just a basic desktop setup was..

1. It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command. Let me explain with a lil more explanation:

    a. Partition your disk with parted or cfdisk and mount it (mentioned in docs https://nixos.org/manual/nixos/stable/).

    b. Generate configuration file which has the biggest myth around it. My god, this is dead simple and could install it in 5-10mins after doing it just ONCE (This obviously excludes time needed to reading up about NixOS to be familiar with it, but trust me it is not hard for a first time installer). You literally run the command "sudo nixos-generate-config"  and it generates a config file in .nix format and YOU DONT HAVE TO START FROM SCRATCH AT ALL. And you don't need to know nix programming language. It has all the settings needed in the config file and all you have to do is uncomment the necessary stuff. The sound, grub, wifi etc.

    c. Then run the command "nixos-install".
THAT IS IT. You can even mention the packages you need to install in config file. You have a functional OS for desktop which can take leverage Nix package manager. AND YES! This includes wifi, grub, sound and everything basic. They all are already in the nix config file you generated. Uncomment the necessary settings and boom!

2. The second point was supposed to be that it is a point release and thus have old packages and hence not a rolling release. This was based on the package search that firefox and some other packages are one version behind even on unstable repo 2 days ago. But just as I typed this, I double checked and Firefox 93 is in stable repo (21.05) and so are some of my other packages. I went back to Arch and was gonna ditch nixos due to this. So this is huge. I probably gonna install NixOS on my laptop now. DO correct me if I am wrong on this please. Because this is the only thing that is stopping me from using NixOS.

Re: NixOS and the Art of OS Configuration (2018)

#23
Been using Nix at Transloadit to replace our ubuntu + custom compiled based stack and while there has been a learning curve with friction, it has been so worth it. I sleep better knowing all state follows from our declarative nix files, can be changed and reverted with confidence, and we’ve cut down our build and deploy times 100X because we only ever compile something once now thanks to shared build cache between our devs and CI <3

Re: NixOS and the Art of OS Configuration (2018)

#24

I literally just gave NixOS a go day before yesterday. The two things I noticed if you want to use NixOS as just a basic desktop setup was.. 1. It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command. Let me explain with a lil more…

You can use the unstable branch for rolling releases closer to how arch works.

Re: NixOS and the Art of OS Configuration (2018)

#25

I literally just gave NixOS a go day before yesterday. The two things I noticed if you want to use NixOS as just a basic desktop setup was.. 1. It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command. Let me explain with a lil more…

For a daily driver, I'd just use nixos-unstable instead of a specific release to get access to all the up to date packages. It's actually not as unstable as the name might imply. PRs are merged into the master branch of nixpkgs and are only merged into the unstable branch once the updated package is successfully built so it tends to be perfectly OK for daily use.

A lot of updates do get backported to stable branches and you can do it yourself pretty easily if you need an update, so running stable for servers makes sense. But for a desktop I prefer the rolling release, always updated model.

Re: NixOS and the Art of OS Configuration (2018)

#26

I literally just gave NixOS a go day before yesterday. The two things I noticed if you want to use NixOS as just a basic desktop setup was.. 1. It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command. Let me explain with a lil more…

For a daily driver, I'd just use nixos-unstable instead of a specific release to get access to all the up to date packages. It's actually not as unstable as the name might imply. PRs are merged into the master branch of nixpkgs and are only merged into the unstable branch once the updated package is successfully built so it tends to be perfectly OK for daily use. A lot of updates do get backported to stable branches…

I do not like backported packages. So is unstable directly upstream stable version of packages exactly like Arch? Cos that is what I want.

Cos in Linux distro context, debian or nixos unstable repo just means it is not yet tested for the specific distro. But in fact the packages itself would be latest stable versions from upstreams.

Re: NixOS and the Art of OS Configuration (2018)

#27
post #24

I literally just gave NixOS a go day before yesterday. The two things I noticed if you want to use NixOS as just a basic desktop setup was.. 1. It is simple and fast to install. People make NixOS feels like black magic. NixOS is easier to install than Arch linux. Just do 3 things. Partition your disk, create the nix configuration file and finally run the command "nixos-install" command. Let me explain with a lil more…

You can use the unstable branch for rolling releases closer to how arch works.

Is unstable directly upstream stable version of packages exactly like Arch? Cos that is what I want.

Cos in Linux distro context, debian or nixos unstable repo just means it is not yet tested for the specific distro. But in fact the packages itself would be latest stable versions from upstreams.

I did read my reading but it is really blurry and hard to find information on how often the packages gets updated.

I also would like plain upstream versions of software without a distro doing any changes. And with NixOS and Nix, this is perfectly capable of fixing even the remote issues of instability that usually happens with Arch Linux.

Re: NixOS and the Art of OS Configuration (2018)

#28
post #17

Love to see more adoption of Nix and NixOS. I started my Nix journey a little over a year ago, and I regret not having switched sooner. A package-manager that also ships an operating system that can be customized from the bootloader up, using a purely functional programming language is the perfect configuration management tool! It does have some rough edges, and I did lose some hair figuring things out early on, but…

Hate to make a boring me-too comment, but I feel the same: I've been using it a bit over a year, and I wish I had started even sooner. Now I've got two laptops and a NUC, plus two odroid-hc4's, all on NixOS. All the system configuration that used to be half-broken ansible and a pile of scripts (plus all the one-off hacks that weren't even captured anywhere) is now nice pure nix configuration. I've nix-ified builds fo…

A boring "me too" from me too!

Re: NixOS and the Art of OS Configuration (2018)

#29
How does Nix approach managing dot files and other application specific files? When I restore from backup, getting the right packages, flatpaks, services running is only a matter of a simple ansible playbook. Biggest annoyance comes from getting all the apps to feel/act the same as they did before. I've resolved this by having known good rc and other files in an Ansible repo and restoring that way. This works very well, but would be keen in knowing if there are better approaches.

Re: NixOS and the Art of OS Configuration (2018)

#30
post #29

How does Nix approach managing dot files and other application specific files? When I restore from backup, getting the right packages, flatpaks, services running is only a matter of a simple ansible playbook. Biggest annoyance comes from getting all the apps to feel/act the same as they did before. I've resolved this by having known good rc and other files in an Ansible repo and restoring that way. This works very we…

Currently, Nix way of handling dotfiles is "home-manager". Personally, I'm not convinced to translate all my random dotfiles to the format acceptable by home-manager because I wouldn't be able to use them in a non-nixos distro or a future home-manager replacement itself.
Post reply on HN