Commit Graph

140 Commits

Author SHA1 Message Date
Mathnerd314
87012187b2 kmod-debian-aliases: init at 21-1 2015-09-13 10:55:44 +02:00
Eelco Dolstra
6e6a96d42c Some more type cleanup 2015-06-15 18:18:46 +02:00
Vladimír Čunát
b7c3c25218 fix ${udev} references (and a few others) 2015-05-05 11:52:08 +02:00
William A. Kennington III
eee9efa6da nixos/initrd: Do a lazy library copy in hopes to save some space for replaced binaries 2015-03-29 21:53:34 -07:00
William A. Kennington III
113c6c8f6a nixos/initrd: Do a lazy library copy in hopes to save some space for replaced binaries 2015-03-29 21:53:25 -07:00
William A. Kennington III
7e9ef553d9 nixos/initrd: Allow overriding of binaries 2015-03-29 21:26:58 -07:00
William A. Kennington III
6b3cf366d7 nixos/initrd: Allow overriding of binaries 2015-03-29 21:26:39 -07:00
William A. Kennington III
553105310a nixos/stage-1: Fix the initrd builder for shell scripts 2015-03-29 13:20:54 -07:00
William A. Kennington III
4868649f03 nixos/initrd: Generic library copying 2015-03-28 18:37:29 -07:00
William A. Kennington III
f2655e4fa0 makeInitrd: Support prepending other initrds 2015-03-25 14:14:46 -07:00
Eric Seidel
88eae46455 rename occurrences of gcc.gcc to gcc.cc 2015-01-14 20:47:49 -08:00
Alexander Kjeldaas
da1f8578b0 Eradicate gzip -9 without -n 2014-12-28 13:45:27 +01:00
Vladimír Čunát
3bcd3ed017 nixos: check resumeDevice is absolute path and document
Fixes #5219 after merging #4995.

(cherry picked from commit 0681d61c3730c686548df3af9a7dc1a59abaf371)
Signed-off-by: Domen Kožar <domen@dev.si>
2014-12-12 11:11:57 +01:00
Vladimír Čunát
b4af993c3f Merge branch 'master' into staging
Conflicts (simple):
	pkgs/development/lisp-modules/clwrapper/setup-hook.sh
2014-11-14 14:28:23 +01:00
Ricardo M. Correia
e9affb4274 nixos: Add system-wide option to set the hostid
The old boot.spl.hostid option was not working correctly due to an
upstream bug.

Instead, now we will create the /etc/hostid file so that all applications
(including the ZFS kernel modules, ZFS user-space applications and other
unrelated programs) pick-up the same system-wide host id. Note that glibc
(and by extension, the `hostid` program) also respect the host id configured in
/etc/hostid, if it exists.

The hostid option is now mandatory when using ZFS because otherwise, ZFS will
require you to force-import your ZFS pools if you want to use them, which is
undesirable because it disables some of the checks that ZFS does to make sure it
is safe to import a ZFS pool.

The /etc/hostid file must also exist when booting the initrd, before the SPL
kernel module is loaded, so that ZFS picks up the hostid correctly.

The complexity in creating the /etc/hostid file is due to having to
write the host ID as a 32-bit binary value, taking into account the
endianness of the machine, while using only shell commands and/or simple
utilities (to avoid exploding the size of the initrd).
2014-11-12 22:31:49 +01:00
Eelco Dolstra
f33fa1b66b Merge remote-tracking branch 'origin/master' into staging
Conflicts:
	pkgs/development/libraries/boost/generic.nix
2014-11-11 23:48:08 +01:00
Luca Bruno
b77d166b17 nixos: move bcache udev rule in a new bcache.nix module 2014-11-10 22:19:43 +01:00
Luca Bruno
31df4f70af nixos: Add boot.initrd.extraUdevRulesCommands 2014-11-10 22:19:43 +01:00
Vladimír Čunát
52404a868d Merge recent master into staging
Nixpkgs Hydra: ?compare=1157272

TODO: port e22889064f

Conflicts:
	nixos/tests/gnome3_10.nix (auto-solved)
	pkgs/applications/video/aegisub/default.nix
	pkgs/development/libraries/boost/1.55.nix
2014-11-05 15:00:44 +01:00
Nikolay Amiantov
775f381a9e stage-1: add bcache support
This adds necessary udev rule into initrd to support autodetecting
bcache partitions in stage-1. It also fixes 'sh' path for the new
rule to work.
2014-11-02 19:03:50 +03:00
Vladimír Čunát
359dd3b8ac nixos: fix two pipefail problems
It failed since 3c6efec2c0, i.e. #4453.
Now it should "work" the same as before.
2014-10-19 19:29:28 +02:00
Eelco Dolstra
058bf4ccc4 Create a udev rule for /dev/root
In the installation CD, this ensures that systemd will see a proper
udev node for /dev/root.

Fixes #4399.

Borrowed from

  http://lists.freedesktop.org/archives/systemd-devel/2014-July/020988.html
2014-10-10 17:18:04 +02:00
Nikolay Amiantov
18bd9917ed stage-1: autodetect resume swap partitions 2014-09-24 18:51:44 +04:00
Luca Bruno
718106e958 Fix initrd after recent busybox upgrades 2014-09-05 18:42:53 +02:00
aszlig
4a4c051a95
nixos: Remove modprobe.d/nixos.conf from initrd.
For example in VM tests, this causes firmware to be included in the
initrd. So until we have a better fix for adding early-stage module
options, I'll remove this.

Fixes a regression introduced by 0aa2c1d and closes #3764.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-08-24 18:19:56 +02:00
Alexei Robyn
0aa2c1dc46 initrd: Fixed to include/use modprobe config files 2014-08-09 22:14:52 +10:00
Peter Simons
2d326e5032 Merge remote-tracking branch 'origin/master' into staging.
Conflicts:
	pkgs/desktops/e18/enlightenment.nix
2014-08-04 16:51:47 +02:00
Eelco Dolstra
e68b0c7f5f Mount unionfs-fuse filesystems using the normal fileSystems option 2014-07-30 16:04:15 +02:00
Eelco Dolstra
d45dcf348e Really fix NixOS/nixos#287 2014-07-30 16:04:15 +02:00
Eelco Dolstra
b7c543136a Move CIFS support into a separate module 2014-07-30 12:39:35 +02:00
Eelco Dolstra
cb7b871bd6 initrd: Include filesystem support for /nix, /var etc. 2014-07-28 22:31:18 +02:00
Eelco Dolstra
40f7b0f9df Another attempt to eradicate ensureDir
See c556a6ea46.
2014-06-30 14:56:10 +02:00
Eelco Dolstra
5e364503d5 NixOS ISO: Don't use a unionfs for /
We don't need a unionfs on /, we only need a tmpfs.
2014-05-21 15:55:50 +02:00
William A. Kennington III
85e9ad1b2f stage1: Systemd libraries were renamed 2014-04-16 01:49:42 +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
9ee30cd9b5 Add support for lightweight NixOS containers
You can now say:

  systemd.containers.foo.config =
    { services.openssh.enable = true;
      services.openssh.ports = [ 2022 ];
      users.extraUsers.root.openssh.authorizedKeys.keys = [ "ssh-dss ..." ];
    };

which defines a NixOS instance with the given configuration running
inside a lightweight container.

You can also manage the configuration of the container independently
from the host:

  systemd.containers.foo.path = "/nix/var/nix/profiles/containers/foo";

where "path" is a NixOS system profile.  It can be created/updated by
doing:

  $ nix-env --set -p /nix/var/nix/profiles/containers/foo \
      -f '<nixos>' -A system -I nixos-config=foo.nix

The container configuration (foo.nix) should define

  boot.isContainer = true;

to optimise away the building of a kernel and initrd.  This is done
automatically when using the "config" route.

On the host, a lightweight container appears as the service
"container-<name>.service".  The container is like a regular NixOS
(virtual) machine, except that it doesn't have its own kernel.  It has
its own root file system (by default /var/lib/containers/<name>), but
shares the Nix store of the host (as a read-only bind mount).  It also
has access to the network devices of the host.

Currently, if the configuration of the container changes, running
"nixos-rebuild switch" on the host will cause the container to be
rebooted.  In the future we may want to send some message to the
container so that it can activate the new container configuration
without rebooting.

Containers are not perfectly isolated yet.  In particular, the host's
/sys/fs/cgroup is mounted (writable!) in the guest.
2013-11-27 17:14:10 +01:00
Eelco Dolstra
dc87f8e080 Check whether fileSystems defines the root FS 2013-11-18 18:04:16 +01:00
Eelco Dolstra
408b8b5725 Add lots of missing option types 2013-10-30 18:47:43 +01:00
Eelco Dolstra
d882e19662 Shut up "failed to resume" warning if there is no resume device 2013-10-30 18:47:43 +01:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00