Earlier quoted context omitted.
> One really cool thing about NixOS is you declare the OS just like you might a DockerFile, But DockerFiles have a really terse, self-evident, trivial to read language. It is obvious what a given DockerFile means even if it's the first one you see. For nix; well, I have seen a few nix files and each one leaves me more confused than the last. Can anybody point me to good examples of beautiful, single-file, complete, s…
This is because Nix needs to express a lot more so builds are reproducible and incremental. Docker doesn’t care about these things.
What Is Nix?
21–30 of 344 posts
Re: What Is Nix?
#22Earlier quoted context omitted.
What is Nix? Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. It provides atomic upgrades and rollbacks, side-by-side installation of multiple versions of a package, multi-user package management and easy setup of build environments. What is NixOS? NixOS is a Linux distribution with a unique approach to package and configuration management. Bu…
Thanks, but that makes me wonder how that's even possible given that distros make their own modifications? Do people port each distro's packages to Nix then? Are they kept up-to-date? Or does it automatically translate from apt/pacman/etc. databases somehow? Or does it just basically install vanilla packages on all distro?
Re: What Is Nix?
#23I was advocating for it in my organisation but eventually we decided for a different technologies...
Re: What Is Nix?
#24Earlier quoted context omitted.
One really cool thing about NixOS is you declare the OS just like you might a DockerFile, and you can choose which configuration file you use at booting time. This lets you install applications just during up-time (to try out a new tool), add it to the configuration file if you like it, and roll back to the version before if it breaks something. Versions are declarative too (PSql == X.X.X) and upgrades/downgrades are…
> One really cool thing about NixOS is you declare the OS just like you might a DockerFile, But DockerFiles have a really terse, self-evident, trivial to read language. It is obvious what a given DockerFile means even if it's the first one you see. For nix; well, I have seen a few nix files and each one leaves me more confused than the last. Can anybody point me to good examples of beautiful, single-file, complete, s…
[0] https://nixos.org/nixos/manual/index.html#sec-configuration-...
[1] https://github.com/oneEdoubleD/nixos/blob/master/config.nix
Re: What Is Nix?
#25Earlier quoted context omitted.
> how that's even possible given that distros make their own modifications? Own modifications to what? All the packages in nixpkgs depend only on other packages in nixpkgs. If you install nix on an ubuntu system and then install a package from nixpkgs, then that package won't use any ubuntu libraries.
> Own modifications to what? To the packages. e.g. I believe Ubuntu modifies Python so that sudo pip install uses /usr/local instead of /usr. Lots of other patches and backports I'm not necessarily aware of. That's basically what makes Ubuntu Ubuntu, otherwise it'd be more like Arch. So how does Nix deal with this? Do you get the value-add from your distro or do you basically end up with pseudo-Arch wherever you star…
If you install python through apt, you get the ubuntu version.
Re: What Is Nix?
#26Earlier quoted context omitted.
Windows ? You're kidding me! Where do I see Windows support? On their website I only see Mac and Linux.
You can use it on WSL1 and WSL2 but you can't use it natively on Windows. I used it on WSL2 just this afternoon and it was seamless but that makes sense because WSL2 is basically just a Linux VM anyway.
Re: What Is Nix?
#27Earlier quoted context omitted.
> Own modifications to what? To the packages. e.g. I believe Ubuntu modifies Python so that sudo pip install uses /usr/local instead of /usr. Lots of other patches and backports I'm not necessarily aware of. That's basically what makes Ubuntu Ubuntu, otherwise it'd be more like Arch. So how does Nix deal with this? Do you get the value-add from your distro or do you basically end up with pseudo-Arch wherever you star…
If you install python through nix, you get the nix version. If you install python through apt, you get the ubuntu version.
Re: What Is Nix?
#28Earlier quoted context omitted.
One really cool thing about NixOS is you declare the OS just like you might a DockerFile, and you can choose which configuration file you use at booting time. This lets you install applications just during up-time (to try out a new tool), add it to the configuration file if you like it, and roll back to the version before if it breaks something. Versions are declarative too (PSql == X.X.X) and upgrades/downgrades are…
> One really cool thing about NixOS is you declare the OS just like you might a DockerFile, But DockerFiles have a really terse, self-evident, trivial to read language. It is obvious what a given DockerFile means even if it's the first one you see. For nix; well, I have seen a few nix files and each one leaves me more confused than the last. Can anybody point me to good examples of beautiful, single-file, complete, s…
It sets up me as a user: https://github.com/cswank/dotfiles/blob/master/nix/configura...
Sets up a hobby app I built via systemd: https://github.com/cswank/dotfiles/blob/master/nix/configura...
Defines a cron job that backs up my music files: https://github.com/cswank/dotfiles/blob/master/nix/configura...
Opens up ports in the firewall (they are all closed by default): https://github.com/cswank/dotfiles/blob/master/nix/configura...
The rest is pretty much boilerplate from the default configuration you get when starting from scratch.
Re: What Is Nix?
#29Earlier quoted context omitted.
Thanks, but that makes me wonder how that's even possible given that distros make their own modifications? Do people port each distro's packages to Nix then? Are they kept up-to-date? Or does it automatically translate from apt/pacman/etc. databases somehow? Or does it just basically install vanilla packages on all distro?
Not a Nix user, but my understanding is that it's a standalone package manager with its own repositories. On a non-Nix distro, installing a package with Nix is akin to installing a Python module with pip, instead of the distro's package manager. It would not be managed at all by the distro's package manager. On NixOS, Nix is the distro's package manager.
It also leaves so many other questions unanswered, like what happens if I install GRUB or a new kernel or something else that's supposed to modify the system globally... but that's secondary.
Re: What Is Nix?
#30Earlier quoted context omitted.
If you install python through nix, you get the nix version. If you install python through apt, you get the ubuntu version.
I get that part. I'm asking what the Nix version is like. Is it like the Ubuntu version with all the patches and backports and everything, or is it like the Arch (i.e. basically original unmodified) version?
Nix packages are created from scratch, not copied from another distro. Nix is typically one of the most up-to-date distros: https://repology.org/