
NixOS 18.03 Released - jbboehr
https://nixos.org/nixos/manual/release-notes.html#sec-release-18.03
======
jbboehr
Brings a bunch of fixes to building Rust packages, and it can even be used
with the Rust nightly from the Mozilla nixpkgs overlay like this:

    
    
        let
    	  defaultPkgs = import <nixpkgs> {};
    	  defaultRust = defaultPkgs.latest.rustChannels.nightly.rust;
    	  defaultCargo = defaultPkgs.latest.rustChannels.nightly.cargo;
    	  defaultBuildRustPackage = defaultPkgs.callPackage (import <nixpkgs/pkgs/build-support/rust>) {
    		rust = {
    			rustc = defaultRust;
    			cargo = defaultCargo;
    		};
    	  };
    	in
    	  { pkgs ? defaultPkgs, rust ? defaultRust, buildRustPackage ? defaultBuildRustPackage }:
    
    	  pkgs.callPackage ./derivation.nix {
    		inherit rust buildRustPackage;
    	  }

------
a012
I was tempting to install NixOS on my PC but found out their installation
method is fully involved of dozens of manual steps [1]. And I feel exhausted
just reading their guide, so I don't want to try at all.

1 - [https://nixos.org/nixos/manual/index.html#sec-
installation](https://nixos.org/nixos/manual/index.html#sec-installation)

~~~
zimbatm
The list is a bit thorough and mixes a few possible scenarios. Basically what
you need to do is:

1\. Copy the ISO onto a USB drive and boot your laptop on it

2\. Run `systemctl start display-manager` to start the GUI

3\. Format the harddrive however you like using GParted

3b. EDIT: and mount the root drive to /mnt

4\. Run `nixos-generate-config --root /mnt` to detect the hardware layout and
generate an initial configuration.nix file

5\. Open the /mnt/etc/nixos/configuration.nix file with your editor and edit
to your convenience

6\. Run `nixos-install`

7\. Reboot

~~~
ianai
Thank you, concision makes it easier for me to understand the process.

------
xelxebar
In this vein, are there some people here who use Guix as their daily driver?
I'd be interested in hearing experiences, comparisons, etc.

I have both nix and guix stores on my (voidlinux) system just trying them out.
Package availability seems quite different between the two, and guix feels
like it's heavier or slower, but I am biased to guix's shepard instead of
systemd.

~~~
jbboehr
Not what the OP asked, but:

Initially, I really wanted to use Guix over Nix, but Nix is more mature with
more packages, maintainers, and features.

Last I checked, for example, there was no equivalent of a channel or overlay
in Guix. Their npm importer was also not released, whereas Nix has a very
usable node2nix.

Having done virtually no functional programming, learning Guile Scheme was
also a barrier to me, but the Nix expression language felt a lot more natural
for whatever reason.

It's unfortunate - I'm very interested in the work in reproducible builds and
substitutions Guix has done, maybe it'll take off at some point or those
features will be integrated into NixOS.

~~~
ymse
Guix has an overlay facility called $GUIX_PACKAGE_PATH[0]. Packages found
there will take precedence over distribution packages.

As an end user you don't really need to know Scheme. The OS configuration and
package definitions are very "DSL-like", but you do have the full power of
Scheme available.

[0]
[https://www.gnu.org/software/guix/manual/guix.html#Package-M...](https://www.gnu.org/software/guix/manual/guix.html#Package-
Modules)

------
mirap
Can someone explain what is NixOS designed for? (ELI5 please)

~~~
adamtulinius
We migrated from Debian+Ansible to NixOS to easier be able to ensure
consistency across servers. Rolling back and forth is really easy for most
things.

It's also the most convenient system I ever worked with for creating custom
packages, which is lucky, because NixOS does have fewer pages compared to
other distributions.

~~~
hollerith
>It's also the most convenient system I ever worked with for creating custom
packages

Is Arch Build System one of the systems you've ever worked with? (I found ABS
very convenient.)

~~~
adamtulinius
Nope, I haven't. Last time I ran Arch as my personal OS, a normal update
bricked the system after a week. :P

My experience is mostly with deb and rpm before Nix.

~~~
majewsky
When was that? I think I had stuff like this when first looking into Arch ~8
years ago. It's now been my daily driver for about 6 years, and I haven't had
my system bricked. I have had a few updates that broke stuff, which could be
solved through a downgrade, but no bricking.

So maybe the Arch maintainers got more disciplined, or maybe I just got better
at not breaking things. Probably both.

------
adamtulinius
Running it locally. Looking forward to switching our K8s cluster to 18.03.

Contact me if you want to work with NixOS and K8s in Denmark/Copenhagen. Mail
on profile page.

------
malvosenior
I really want to love Nix and have installed it multiple times. It's non-
standard file layout gets me every time though. Something as simple as
`#!/bin/bash` not working is problematic for me. I also find that trying to
install _anything_ not included in the Nix package manager is pretty much
impossible (building from source...).

Please correct me if I'm Nix-ing wrong.

~~~
tathougies
You shouldn't be using /bin/bash anyway. The proper she-bang is
'#!/usr/bin/env bash', which works on nix. The location of bash in /bin/ is
actually not standard at all, despite some linux distributions doing that. In
particular, the BSDs also do not have bash in /bin. This is why using
'/usr/bin/env bash' is more portable

~~~
eikenberry
> /usr/bin/env

That won't work everywhere either as the location of 'env' is not a fixed
standard either. Eg. In some *nix's its at /bin/env.

~~~
pxc
What modern/surviving Unix-likes don't have even a symlink in `/usr/bin/env`?

I'm not 100% sure on all of these, but every one of the dozens of Linux
distros I've used has `/usr/bin/env`. macOS has it, and it looks like FreeBSD
does, too, and so does NetBSD.

Who are the oddballs? Does it include any of the free Unices?

~~~
pxc
(I'm not trying to be shitty; I'd really like to know. I spent some time
Googling about conventions for the `env` command, and examples of incompatible
systems. The only ones I found were two old, proprietary Unices. I got tired
of searching and was hoping someone who knows a few examples offhand could
help me out.)

------
theonemind
Immutability seems like the best thing for a package manager. Do any other
packaging systems have interesting “killer features”? I’ve heard of PiSi for
Pardus, and Conary for rPath/Foresight, but honestly, I can’t quite keep track
of the state of the art.

------
mwexler
Each time I hear about NixOS, I am immediately thankful that someone
modernized the underlying OS for Nixie clocks
([http://nixieshop.com/](http://nixieshop.com/)). Then I come back to reality.

------
bogomipz
I am curious how or where NixOS fits in a a cloud or IaaS environment.

I feel like AMIs and containers address the reproducible builds problem and
blue/green deploys the rollback issue. Could NIXOS still be complimentary in
an AWS/AMI environment?

~~~
hollerith
You can have thousands of packages in a single Nixos installation and if 200
of those packages directly or indirectly depend on some library L, you usually
only need one copy of L to fulfill those 200 dependencies.

In contrast, if you put each package in its own container or VM, then you end
up with 200 copies of L.

So, the different technologies have different strengths and weaknesses. One
weakness of Nix is that it is harder for most people to learn or to understand
than containers or VMs are.

Some people use Nix or Nixos as part of their process for building containers
or VM images.

(I wonder whether there is any build system that uses containers instead of
file names containing cryptographic hashes (like Nix does) or chroots (like
Arch Build system does) to "enforce package isolation" during building.)

~~~
bogomipz
Thanks for the replies and the links. Makes sense. Cheers.

------
WindowsFon4life
"OS" is so misleading.

~~~
colemickens
How's that?

