Commit Graph

316 Commits

Author SHA1 Message Date
Tuomas Tynkkynen
32643dc07d installer: sd-image-*.nix: Document how to build them 2017-01-25 15:07:37 +02:00
Tuomas Tynkkynen
0e4c1bfb43 installer: Add SD image expression for Aarch64
This one works on the Raspberry Pi 3 so far.
2017-01-25 02:14:47 +02:00
Tuomas Tynkkynen
b29ee6c8ff U-Boot: Add 64-bit Raspberry Pi 3 build
And rename the old ubootRaspberryPi3 to ubootRaspberryPi3_32bit.
2017-01-25 02:14:47 +02:00
Robin Gloster
f4f4200d9a
install-devices: add vim
This moves vim to the install-device profile to add vim to netboot, too.

Fixes #20013 (see discussion there for further information)
2017-01-18 17:57:31 +01:00
Eelco Dolstra
96b6968950
nix: 1.11.5 -> 1.11.6 2017-01-13 11:38:09 +01:00
Franz Pletz
88908145ea
nixos installer: don't log refused packets to console
Fixes #19764.
2017-01-09 19:24:41 +01:00
Eelco Dolstra
0108c31e22
nix: 1.11.4 -> 1.11.5 2017-01-03 11:25:38 +01:00
gnidorah
90deca3a0c nixos-generate-config: detect CPU governor
* cpu-freq: Try powersave if ondemand is not available

* Revert "cpu-freq: Try powersave if ondemand is not available"

This reverts commit 4dc56db37e32dcfecd667ebbf88263e47b296097.
Consult available scaling governors; for freshly generated configs, this provides a better experience than relying on a default that might not work everywhere.
2017-01-02 17:20:28 +01:00
Данило Глинський (Danylo Hlynskyi)
970a09eb74 Fix typo 2016-12-30 13:29:43 +02:00
Lluís Batlle i Rossell
e0078b2cb5 Make the minimal iso not use profile/minimal, +vim
The profile minimal has several drawbacks: no man pages, unusual 'dbus'
lib that makes many X11 pieces to rebuild, etc.

With xz compression in the squashfs, despite these additions, the iso is
smaller than what it was in 16.09.
2016-12-28 16:07:16 +01:00
Maximilian Güntner
0cf907ae12
nixos-rebuild: Fix SSHOPTS typo
Signed-off-by: Maximilian Güntner <code@klandest.in>
2016-12-18 22:39:27 +01:00
michael bishop
e710edeecf
make the /nix/store writable under netboot images 2016-11-29 10:31:07 -04:00
Thomas Tuegel
66d9772f0b
installation-cd-graphical-kde: put manual link directly on desktop 2016-11-15 07:21:40 -06:00
Thomas Tuegel
8c3aa5a484
kde5: add enableQt4Support option 2016-11-15 07:21:40 -06:00
Thomas Tuegel
456414c519
installation-cd-graphical-kde: use KDE 5 2016-11-15 07:18:46 -06:00
Matthew Justin Bauer
6de20a7fe4 virtualbox-demo: Add modesetting to drivers
This needs to be included for VirtualBox to detect that it needs to start the video driver. "modesetting" is also set in virtualbox-image.nix but this line seems to take precedence over that one (even though the virtualbox-image.nix has a higher override?) This should fix the problems that I and a few others have been having with the .ova files built for nixos.org.

Fixes #20007.
2016-11-07 14:36:41 -06:00
Eric Sagnes
e14de56613 module system: extensible option types 2016-11-06 00:05:58 +01:00
Joachim Fasting
645ff13a4b
nixos autoUpgrade: fix use of startAt
`startAt = ""` as in `startAt = optionalString false ...` results
in an invalid timer unit (due to "" being promoted to a singleton
list and not filtered out).

Ref: c9941c4b5ef7acc1cb8d734acb383410d99c01ba
2016-10-23 17:56:39 +02:00
Tuomas Tynkkynen
a34ec1517f nixos-install: Bug fix for root password not being asked
Since some changes to the setuid wrappers, there is a symlink involved
and it doesn't resolve correctly inside the chroot. Do the check inside
the chroot to make it work again.
2016-09-29 23:17:53 +03:00
Eelco Dolstra
c2495261a8 kde4: Allow disabling dependency on MariaDB
This reduces the runtime closure of a KDE4 system by ~172 MiB.
2016-09-29 20:03:50 +02:00
Eelco Dolstra
75a1ec8a65 NixOS: Use runCommand instead of mkDerivation in a few places 2016-09-29 13:05:28 +02:00
Bjørn Forsman
32efdb7128 treewide: sshfsFuse -> sshfs-fuse 2016-09-18 17:44:30 +02:00
obadz
1c9ac8aabc grub: add boot.loader.grub.efiInstallAsRemovable
Closes #16374
2016-09-16 18:02:36 +01:00
Eelco Dolstra
f2ddf2a9be nix: 1.11.3 -> 1.11.4 2016-09-06 16:15:22 +02:00
Eelco Dolstra
1fef99942e nixos-rebuild: Move the Nix fallback store paths into a separate file 2016-09-06 16:07:47 +02:00
obadz
3f1ceae281 Partially revert "Revert "nixos: remove rsync from base install and add explicit path in nixos-install""
This partially reverts commit 0aa75206705afc71b991cceeede644c87088d583.

Fine for rsync to be in system path but we still need the explicit path
in nixos-install in case it is invoked from non-NixOS systems and also
to fix OVA test failure

See also 0aa7520670

cc @edolstra
2016-09-06 11:49:03 +01:00
Eelco Dolstra
0aa7520670 Revert "nixos: remove rsync from base install and add explicit path in nixos-install"
This reverts commit 582313bafef4c81cb6df2dcf2ece4757eb5c8082.

Removing rsync is actually pointless because nixos-install depends on
it. So if it's part of the system closure, we may as well provide it
to users.

Probably with the next Nix release we can drop the use of rsync and
use "nix copy" instead.
2016-09-05 13:45:59 +02:00
Alexander Ried
1542bddcc8 nixos-install.sh: Create /var (#18266)
Got lost in a6670c1a0b8cda8235296900cff950f39f60cf4f
2016-09-03 19:17:44 +02:00
Domen Kožar
a6670c1a0b Fixes #18124: atomically replace /var/setuid-wrappers/ (#18186)
Before this commit updating /var/setuid-wrappers/ folder introduced
a small window where NixOS activation scripts could be terminated
and resulted into empty /var/setuid-wrappers/ folder.

That's very unfortunate because one might lose sudo binary.

Instead we use two atomic operations mv and ln (as described in
https://axialcorps.com/2013/07/03/atomically-replacing-files-and-directories/)
to achieve atomicity.

Since /var/setuid-wrappers is not a directory anymore, tmpfs mountpoints
were removed in installation scripts and in boot process.

Tested:

- upgrade /var/setuid-wrappers/ from folder to a symlink
- make sure /run/setuid-wrappers-dirs/ legacy symlink is really deleted
2016-09-01 20:57:51 +02:00
obadz
697518d467 nixos-install: remove manifest related stuff 2016-08-24 16:09:30 +01:00
Shea Levy
2942895d55 Merge branch 'install-bootloader-flag' 2016-08-17 21:16:29 -04:00
obadz
24f8cf08cc nixos/lib/make-disk-image: refactor to use nixos-install
- Replace hand-rolled version of nixos-install in make-disk-image by an
  actual call to nixos-install
- Required a few cleanups of nixos-install
- nixos-install invokes an activation script which the hand-rolled version
  in make-disk-image did not do. We remove /etc/machine-id as that's
  a host-specific, impure, output of the activation script

Testing:

nix-build '<nixpkgs/nixos/release.nix>' -A tests.installer.simple passes

Also tried generating an image with:

nix-build -E 'let
    pkgs = import <nixpkgs> {};
    lib = pkgs.lib;
    nixos = import <nixpkgs/nixos> {
      configuration = {
        fileSystems."/".device = "/dev/disk/by-label/nixos";
        boot.loader.grub.devices = [ "/dev/sda" ];
        boot.loader.grub.extraEntries = '"''"'
          menuentry "Ubuntu" {
             insmod ext2
             search --set=root --label ubuntu
             configfile /boot/grub/grub.cfg
          }
        '"''"';
      };
    };
  in import <nixpkgs/nixos/lib/make-disk-image.nix> {
    inherit pkgs lib;
    config = nixos.config;
    diskSize = 2000;
    partitioned = false;
    installBootLoader = false;
  }'

Then installed the image:
$ sudo df if=./result/nixos.img of=/dev/sdaX bs=1M
$ sudo resize2fs /dev/disk/by-label/nixos
$ sudo mount /dev/disk/by-label/nixos /mnt
$ sudo mount --rbind /proc /mnt/proc
$ sudo mount --rbind /dev /mnt/dev
$ sudo chroot /mnt /nix/var/nix/profiles/system/bin/switch-to-configuration boot

[ … optionally do something about passwords … ]

and successfully rebooted to that image.

Was doing all this from inside a Ubuntu VM with a single user nix install.
2016-08-16 15:31:16 +01:00
Shea Levy
b4954a8f38 Deprecate --install-grub in favor of --install-bootloader for nixos-rebuild.
Fixes #14293
2016-08-16 07:51:58 -04:00
obadz
806e88c137 nixos-install: cleanups & improvements to run on non-NixOS systems
- Fix --no-bootloader which didn't do what it advertised
- Hardcode nixbld GID so that systems which do not have a nixbld user
  can still run nixos-install (only with --closure since they can't
  build anything)
- Cleanup: get rid of NIX_CONF_DIR(=/tmp)/nix.conf and pass arguments instead
- Cleanup: don't assume that the target system has '<nixpkgs/nixos>' or
  '<nixos-config>' to see if config.users.mutableUsers. Instead check if
  /var/setuid-wrappers/passwd is there

Installing NixOS now works from a Ubuntu host (using --closure).

nix-build -A tests.installer.simple '<nixpkgs/nixos/release.nix>' succeeds ✓
2016-08-16 02:47:49 +01:00
obadz
582313bafe nixos: remove rsync from base install and add explicit path in nixos-install
As per 60b3f95ad8 (commitcomment-18507812)
2016-08-09 21:39:40 +01:00
obadz
57b7c3c545 nixos-install: more robust way of sourcing fresh version of self 2016-08-09 21:39:40 +01:00
aszlig
55d881eea3
Revert adding .git-revision unconditionally
This reverts commit 1e534e234b0a92bf06361fa41b7ac8691fdbc769.

We already should have a .git directory if it is managed via Git,
otherwise there is no way to get the Git revision if neither
.git-revision or .git is present.

But having .git-revision _and_ .git present seems very much redundant to
me.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @bennofs, @Profpatsch
Issue: #17218
2016-08-09 14:15:06 +02:00
obadz
037d9c6cab nixos-install: add options --closure, --no-channel-copy, --no-root-passwd, and --no-bootloader
Closes #17236

nix-build -A tests.installer.simple '<nixos/release.nix>' succeeds ✓
2016-08-04 16:22:25 +01:00
Benno Fünfstück
1e534e234b fix nixos-version --hash when building from git 2016-07-23 22:59:03 +02:00
davidak
d97a107426 nixos-version: fix syntax error and add -h (#16906)
* nixos-version: fix syntax error

* nixos-version: add -h parameter
2016-07-13 09:11:32 +02:00
Graham Christensen
d9724bcdbf doc: add man page for nixos-version (#16869) 2016-07-12 16:29:13 +02:00
Tuomas Tynkkynen
36f4a8a485 sd-image-armv7l-multiplatform.nix: Preliminary Raspberry Pi 2/3 support
- RPi3 successfully gets to U-Boot, but then fails to boot the kernel
  due to a missing device tree file. This should get added to the 4.8
  kernel release once this patch is merged: https://lkml.org/lkml/2016/6/1/841
- RPi2 is not tested, but it should successfully boot the NixOS image.
2016-07-04 02:07:13 +03:00
Tuomas Tynkkynen
b6b7da20be sd-image-*: Set verbose kernel loglevel
Much easier to debug boot issues this way...
2016-07-03 20:48:07 +03:00
Tuomas Tynkkynen
ec6759a098 sd-image-armv7l-multiplatform: Add boot console for BeagleBone Black 2016-07-03 20:48:07 +03:00
Nikolay Amiantov
21f9180d49 Merge pull request #15579 from abbradar/nixos-install-ssl
nixos-install: fix SSL certificate error
2016-06-23 07:48:45 +04:00
Eelco Dolstra
9f0e137338 Rename boot.loader.gummiboot.enable -> boot.loader.systemd-boot.enable 2016-06-01 12:55:52 +02:00
Tuomas Tynkkynen
0229693354 iso-image.nix: Fix path to EFI blob after systemd-boot switch
This evaluates, but I can't verify if it works.

@edolstra
2016-06-01 12:14:00 +03:00
Eelco Dolstra
a7baec7cb1 nixos-generate-config: Emit LUKS configuration for boot device 2016-05-25 18:04:41 +02:00
Eelco Dolstra
c6ab4ab206 nixos-generate-config: Enable strictness 2016-05-25 18:04:34 +02:00
Eelco Dolstra
32bed83b18 Remove boot.loader.grub.timeout and boot.loader.gummiboot.timeout
There is a generic boot.loader.timeout option.
2016-05-25 11:39:17 +02:00