Lots of hardware isn't supported out-of-the-box without this.
Much of that is networking, which makes new installs a pain. Those who want only free
firmware can disable this, but in the normal use case I think it makes more sense enabled.
Enable all firmware by default.
I thought that the nixos-hardware-scan adds the nixos/modules/installer/scan/not-detected.nix file, which should as well include all not-detected firmware.
Actually the live CDs don't have this enabled, and pkgs.firmwareLinuxNonfree doesn't currently build due to some disappeared Debian files. I feel that this package shouldn't be enabled by default in general (i.e. outside of the live CD), because it would make NixOS depend by default on an unfree package. It also depends on the size of the package, but I can't determine that right now. It's better if nixos-hardware-scan enables it if necessary.
BTW, I didn't realize we have the Debian unfree firmware package now, which is great since it means we can get rid of almost all other firmware packages...
Well, they're redistributable, so we can put them in the tarball mirror. That will happen automatically if we add them as Hydra job.
Personally, I'd also prefer to keep the current state of affairs, i.e. not to enable all firmware by default.
I've set license to "redistributable", but hydra doesn't have the binaries. https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
@iElectric: hydra builds only derivations with platforms set (on the platforms that are set :).
I did set meta.platforms, no result.
Strange. I don't have a clue why Hydra doesn't build it.
Hydra doesn't build anything with an unfree license. (See the very top of pkgs/top-level/release-lib.nix for reference.)
Oh, well, I thought the meaning was not to build undistributable files, but well, implementation does it this way.
I do believe we should change this.
"unfreeDistributable" should mean: mirror stuff to hydra, but don't build
Ah, I see... the correct license is "unfree-redistributable-firmware", that should also get built by hydra. Definition is in doc/meta.xml. The handling is on pkgs/stdenv/generic/default.nix.
Done. Let's wait for hydra.
So now we can merge this. NixOS will stay free, but it won't be completely open (which isn't the case now, as kernel contains many blobs)
@edolstra objections? :)
@iElectric, how about the objections that have been made already a while ago? I don't like the idea of enabling all those blobs by default. It sounds okay to me to do it for the install CD, but for a standard NixOS installation I'd much rather see nixos-scan-hardware improved than this.
@peti Scanning hardware and installing drivers based on that is just so Windows 95. Binary firmware is a non-issue, since it won't run on the main CPU and can't compromise your system that way. Binary drivers may be contentious, but if the installer enables them for your specific hardware, it makes no difference either. Unless something loads the driver, it's inert. And I'd bet that first thing you do when you move to new hardware and your system stops working is install the drivers anyway? I don't really see the problem.
@mornfall, I don't like the notion of installing dozens of drivers indiscriminately that my system won't ever need. I think it's fine to provide that option for people who don't mind, but it should not be the default. I don't feel super strongly about it, and if some sort of majority of NixOS users would like to change the default behavior, then I'll go along with it. As it is, however, there seems to be no clear majority in favor of making this change, nor am I aware of any compelling reason why the default NixOS installation should come with lots of drivers that it won't ever load.
@peti There are two compelling reasons: 1) no need to maintain a tool the purpose of which is to map from hardware to packages [add to this that half the people I know, including myself, had some sort of trouble with wifi when installing nixos] 2) painless hardware migration.
As for installing stuff that's not used, this is NixOS. You already have tons of files you won't ever need (you need all of mysql and postgres just to install Qt; yes, that's around 80M of stuff for the 1.2M of shared libs you actually need). I don't think firmware and drivers is such a huge problem. For minimalist installations, it can always be taken out.
If you don't use something, patents or licenses don't really matter. I know about multiple outputs, but it's a ton of effort to trim nixpkgs down, and storage is only going to become cheaper. I will gladly trade "works out of the box" over a couple hundred MB of default installation. If I was stingy about disk space, I wouldn't be running NixOS in the first place.
Detecting and sorting out hardware is notoriuosly difficult. What about hardware changes? You deploy your configuration on a new laptop and ... sorry, I would tweak your configuration.nix for your new hardware (that's already a near-insurmountable problem?), but you are fucked anyway because your network hardware doesn't work? Or even think about hotplugging in a new gadget. Are you going to write something that notices this and offers the user to magically tweak configuration.nix and nixos-rebuild to enable that hardware? (What if you are running a configuration that's not the same as /etc/nixos right now?)
Because all those things would work with zero effort for both users and developers, if the drivers/firmwere were installed by default. Seems a bad trade to increase work and decrease comfort for everyone over a bit of disk space that can be freed by those who don't care about setting up hardware manually.
I don't really feel strongly about the default settings. But it seems that for installation ISOs this can be vital... do I understand @edolstra correctly that this isn't enabled even there?
+1 for merging this. I am a big believer in "works out of the box".
Enable the Debian firmware package on the installation CD
It's unfree but we already had such firmware on the CD so we're not
not-detected.nix: Enable all firmware
Note that since the configuration produced by nixos-hardware-scan
includes not-detected.nix, you get all firmware when following the
regular installation procedure.
Okay, I've now enabled all firmware on the installation CD, and (implicitly) in configurations generated by nixos-hardware-scan. That should make things work "out of the box" for most users, I think.
So what is the difference between what we have now and what this pull provides? Should we close this pull?
I'll go out on a limb and just do it. :-)