Commit Graph

140 Commits

Author SHA1 Message Date
Eelco Dolstra
00372ca638 nixos-rebuild: Fallback for upgrading Nix
Previously, if the currently installed Nix is too old to evaluate
Nixpkgs, then nixos-rebuild would fail and the user had to upgrade Nix
manually. Now, as a fallback, we run ‘nix-store -r’ to obtain a binary
Nix directly from the binary cache.
2014-04-15 12:07:34 +02:00
Eelco Dolstra
f9e6181478 nixos-rebuild: Exec nixos-rebuild from the new Nixpkgs tree
This allows doing any necessary actions that were not in the installed
nixos-rebuild (such as downloading a new version of Nix). This does
require us to be careful that nixos-rebuild is backwards-compatible
(i.e. can run in any old installation).
2014-04-15 12:07:29 +02:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Eelco Dolstra
caf98828bb nixos-generate-config: Fix PCI/USB checks
As reported by Kirill Elagin, read_file doesn't chomp its output. So
the equality tests on PCI/USB vendor and device IDs were failing.
2014-04-08 15:13:27 +02:00
Eelco Dolstra
075168ca81 nixos-hardware-scan: Detect QEMU 2014-03-30 17:27:18 +02:00
Ellis Whitehead
9af5d4731d typo: occured -> occurred 2014-03-07 19:39:55 +01:00
Ricardo M. Correia
a146fdab80 nixos-generate-config: Don't generate filesystem options
We don't want to hardcode configuration options that the current kernel chose
for us when mounting the filesystem, since the defaults can change in the
future.
2014-02-19 17:18:50 +01:00
Ricardo M. Correia
cea9a1a242 nixos-generate-config: Don't generate /var/lib/nfs/rpc_pipefs filesystem
It's automatically mounted if the system has support for NFS.
2014-02-19 17:18:49 +01:00
Pascal Wittmann
516cdc25a4 Renamed obsolete option services.xserver.videoDrivers to hardware.opengl.videoDrivers 2014-02-18 23:11:49 +01:00
aszlig
795941261a
nixos-generate-config: Fix reference to <nixos>.
IIUC, <nixos> is going to be deprecated someday in the future, and as
most of those references are already replaced I guess it's safe to
replace it here as well, as it is only relevant on new/updated
installations.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-01-29 13:23:30 +01:00
Aristid Breitkreuz
5d3d6b3799 support -Q in nixos-rebuild 2014-01-25 11:20:25 +01:00
Eelco Dolstra
0d5ec076d2 Use default kernel for EFI-related stuff 2013-11-07 16:38:56 +01:00
Eelco Dolstra
4d15ad22a2 Manual: Expand the Development chapter 2013-10-31 23:01:07 +01:00
Eelco Dolstra
c7171b2c8f Comment out nixos-gui
It hasn't built in over 2 years.
2013-10-30 18:47:43 +01:00
Eelco Dolstra
3115addf4c Fix nixos-option
In particular, it no longer produces an "infinite recursion" error
when run with no arguments.
2013-10-28 22:45:58 +01:00
Eelco Dolstra
92ef9d6b46 nixos-rebuild: Ignore failure from get-version-suffix 2013-10-28 22:45:57 +01:00
Eelco Dolstra
259f7a93b1 Rename environment.nix -> nix.package 2013-10-28 22:45:57 +01:00
Eelco Dolstra
49e73ea117 nixos-generate-config: Don't suggest setting fileSystems in configuration.nix
It's already set in hardware-configuration.nix so this just confuses
people.

Also get rid of boot.initrd.kernelModules, since
hardware-configuration.nix is supposed to figure that out as well.
2013-10-24 05:28:37 +02:00
aszlig
19b00be0a0
nixos-rebuild: Drop references to <nixos>.
Commit 31203732b3104125e107a3141578399cab5d478f dropped the reference to
<nixos> from NIX_PATH (nixos/modules/programs/environment.nix) and thus
prevents systems that are not using channels from rebuilding.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-10-23 17:16:17 +02:00
aszlig
f182fdf6ed
nixos-generate-config: Add --show-hardware-config.
So, we get the old behaviour of nixos-hardware-scane if we run the
following command:

nixos-generate-config --no-filesystems --show-hardware-config

This allows to use scripts in order to fetch NixOS specific hardware
information, without the need to duplicate code elsewhere.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-10-23 17:16:17 +02:00
aszlig
e2c546ce4a
nixos-generate-config: Remove unnecessary spaces.
The attributes swapDevices and imports add a space character after the
eqals sign, which is unnecessary. I know, I'm a pedantic douche bag but
it hurts my eyes.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-10-23 17:16:16 +02:00
aszlig
a546069ad3
nixos-generate-config: Add --no-filesystems flag.
This is to get back the old behavior of nixos-hardware-scan, which
didn't include fileSystems and swapDevices.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-10-23 17:16:16 +02:00
Eelco Dolstra
ca3725bfc9 nixos-generate-config: Add --root option
If this option is given, nixos-generate-config will write the
configuration to /etc/nixos under the given root, and only emit
fileSystems attributes for filesystems under the given root directory.

The typically use case is at installation time, where you can say:

  $ nixos-generate-config --root /mnt

which will create /mnt/etc/nixos/{configuration.nix,hardware-configuration.nix}.

Also add a --force flag to force overwriting configuration.nix.
2013-10-13 17:35:56 +02:00
Eelco Dolstra
3875dcdfeb nixos-generate-config: Emit boot.initrd.availableKernelModules instead of kerneLmodules 2013-10-13 17:35:56 +02:00
Eelco Dolstra
57804f44ec nixos-generate-config: Skip FUSE filesystems
I don't know how to recover that a FUSE filesystem is (say) ntfs-3g.
2013-10-13 17:35:56 +02:00
Eelco Dolstra
984921e657 nixos-generate-config: Emit fileSystems automatically 2013-10-13 17:35:56 +02:00
Eelco Dolstra
677d9882b0 nixos-generate-config: Generate swapDevices 2013-10-13 17:35:56 +02:00
Eelco Dolstra
440fe8f05d Use read_file from File::Slurp 2013-10-13 17:35:56 +02:00
Eelco Dolstra
ac13bd2575 Merge "nixos-option --install" into nixos-generate-config
Having configuration.nix generation hidden underneath nixos-option
never made sense, also given that there was another command to
generate part of the configuration (nixos-hardware-scan).  Now
nixos-generate-config produces both configuration.nix and
hardware-configuration.nix.  The latter is overwritten while the
former is not.
2013-10-13 17:35:55 +02:00
Eelco Dolstra
fd0fd49d36 nixos-generate-config: Write to /etc/nixos/hardware.nix rather than stdout 2013-10-13 17:35:55 +02:00
Eelco Dolstra
3ed41735b8 Rename nixos-hardware-scan to nixos-generate-config 2013-10-13 17:35:55 +02:00
Eelco Dolstra
4b28f28028 Remove unused file 2013-10-13 17:35:55 +02:00
Eelco Dolstra
f42d494355 Refactor variable names 2013-10-13 17:35:55 +02:00
Eelco Dolstra
ef72fcc2aa Map --help flag to "man <command>" for more NixOS commands 2013-10-13 17:35:55 +02:00
Eelco Dolstra
f1a03addae nixos-rebuild: Let --help invoke "man nixos-rebuild" 2013-10-13 17:35:54 +02:00
Eelco Dolstra
2be774ccfa Set .version-suffix properly when building from Git 2013-10-13 17:35:54 +02:00
Eelco Dolstra
c8628e0989 nixos-checkout: Only fetch the Nixpkgs repo 2013-10-10 13:28:22 +02:00
Eelco Dolstra
31203732b3 Update the release expressions and the channel generators 2013-10-10 13:28:22 +02:00
Eelco Dolstra
041da5a6f9 Unify the Nixpkgs and NixOS version numbers 2013-10-10 13:28:22 +02:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00