Commit Graph

52701 Commits

Author SHA1 Message Date
Ricardo M. Correia
7a7bf8368e nixos-generate-config: Configure networking.hostId by default
The host id value gets generated by reading a 32-bit value from
/dev/urandom.

This makes programs that rely on a correct host id more reliable.

It also makes using ZFS more seamless, as you don't need to configure
the hostId manually; instead, it becomes part of your config from the
moment you install NixOS.
2014-11-12 22:31:50 +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
Ricardo M. Correia
12e77fdc3f nixos/zfs: Improve the ZFS boot process
It turns out that the upstream systemd services that import ZFS pools contain
serious bugs. The first major problem is that importing pools fails if there
are no pools to import. The second major problem is that if a pool ends up in
/etc/zfs/zpool.cache but it disappears from the system (e.g. if you
reboot but during the reboot you unplug your ZFS-formatted USB pen drive),
then the import service will always fail and it will be impossible to get rid
of the pool from the cache (unless you manually delete the cache).

Also, the upstream service would always import all available ZFS pools every
boot, which may not be what is desired in some cases.

This commit will solve these problems in the following ways:

1. Ignore /etc/zfs/zpool.cache. This seems to be a major source of
issues, and also does not play well with NixOS's philosophy of
reproducible configurations. Instead, on every boot NixOS will try to import
the set of pools that are specified in its configuration.  This is also the
direction that upstream is moving towards.

2. Instead of trying to import all ZFS pools, only import those that are
actually necessary. NixOS will automatically determine these from the
config.fileSystems.* option. Also, the user can import any additional
pools every boot by adding them to the config.boot.zfs.extraPools
option, but this is only necessary if their filesystems are not
specified in config.fileSystems.*.

3. Added options to configure if ZFS should force-import ZFS pools. This may
currently be necessary, especially if your pools have not been correctly
imported with a proper host id configuration (which is probably true for 99% of
current NixOS ZFS users). Once host id configuration becomes mandatory when
using ZFS in NixOS and we are sure that most users have updated their
configurations and rebooted at least once, we should disable force-import by
default. Probably, this shouldn't be done before the next stable release.

WARNING: This commit may change the order in which your non-ZFS vs ZFS
filesystems are mounted.  To avoid this problem (now or in the future)
it is recommended that you set the 'mountpoint' property of your ZFS
filesystems to 'legacy', and that you manage them using
config.fileSystems, just like any other non-ZFS filesystem is usually
managed in NixOS.
2014-11-12 22:31:49 +01:00
Ricardo M. Correia
1fea5866ae Add unique list function
It removes duplicate elements from a list.
2014-11-12 22:31:49 +01:00
Ricardo M. Correia
3b0fa60a98 zfs: Enable systemd
Also remove custom zfs services from NixOS.  This makes NixOS more aligned with
upstream.

More importantly, it prepares the way for NixOS to use ZED (the ZFS event
daemon). This service will automatically be enabled but it is not possible to
configure it via configuration.nix yet.
2014-11-12 22:31:49 +01:00
Ricardo M. Correia
ace49e400c flashplayer: Update from 11.2.202.411 -> 11.2.202.418 2014-11-12 22:31:14 +01:00
Michael Raskin
0d6306be4d Merge pull request #4950 from joachifm/dnscrypt-proxy
dnscrypt-proxy service
2014-11-13 00:25:05 +03:00
Michael Raskin
232f6bb4d2 Merge pull request #4929 from abbradar/prl-tools
Add packages and support for Parallel Guest Tools
2014-11-13 00:22:42 +03:00
Arseniy Seroka
2399edd633 fix travis eval and remove duplicate 2014-11-13 00:18:47 +03:00
Michael Raskin
f5c3ad443b Merge pull request #4578 from offlinehacker/pkgs/pythonPackages/scikit_algo
pythonPackages: scikit-learn and pyalgotrade
2014-11-13 00:17:39 +03:00
Michael Raskin
efe5eb4709 Merge pull request #4573 from fpletz/feature/lxc-configuration
Add support for global LXC config files
2014-11-13 00:14:46 +03:00
Ricardo M. Correia
2c038410ea Merge pull request #4932 from wkennington/master.zfs
zfs: Add upstream patch bc151f7 to fix kernel 3.18 builds
2014-11-12 21:56:02 +01:00
John Wiegley
38ab111dd7 coqPackages.unimath: new expression 2014-11-12 14:37:25 -06:00
Arseniy Seroka
ad2160f9b4 vim-plugins: fix missing deps 2014-11-12 23:29:47 +03:00
Cillian de Róiste
f9fddf1e78 yoshimi: update from 1.2.4 to 1.2.5 2014-11-12 20:56:49 +01:00
Cillian de Róiste
471b532a90 xf86_input_wacom: update from 0.26.99.1 to 0.27.0 2014-11-12 20:56:38 +01:00
Arseniy Seroka
c75502acd2 Merge pull request #4897 from MarcWeber/submit/vim-plugins-with-vam-or-pathogen
experimental/vim-vam-pathogen-vimrc-support
2014-11-12 22:11:29 +03:00
Pascal Wittmann
8c0db0fff3 Merge pull request #4962 from robberer/pkgs/xsnow
pkgs: add xsnow
2014-11-12 19:40:14 +01:00
Longrin Wischnewski
348597b939 pkgs: add xsnow 2014-11-12 17:52:21 +01:00
Pascal Wittmann
f6b8460aa4 youtube-dl: update from 2014.11.04 to 2014.11.12 2014-11-12 16:11:07 +01:00
Bjørn Forsman
111e1dbae3 pydb: set meta.platforms
To have prebuilt binaries and useful hint from "command-not-found".
2014-11-12 16:03:00 +01:00
Eelco Dolstra
433a845081 Disable zfs in the ISO for now
It's giving zpool-import.service errors.

http://hydra.nixos.org/build/16883184
2014-11-12 15:32:21 +01:00
Michael Raskin
a54e032b2c Add some lisp packages, including clx-truetype 2014-11-12 16:58:22 +03:00
Michael Raskin
084426a8ed Support more quicklisp upstream source types 2014-11-12 16:58:22 +03:00
Michael Raskin
ce8f37430f Fix envHooks setting: don't kill previous hooks 2014-11-12 16:58:22 +03:00
Mateusz Kowalczyk
7ae2cca1dc haskell-PastePipe: update to 1.7 2014-11-12 13:43:19 +00:00
Eelco Dolstra
36c77cc55b Merge pull request #4959 from robberer/modules/httpd24
apache-httpd: add mod_access_compat
2014-11-12 14:04:19 +01:00
Arseniy Seroka
542f3d47bd Merge pull request #4960 from jyp/hask-pkgs
add labeled-tree
2014-11-12 16:03:12 +03:00
Jean-Philippe Bernardy
9ce6651c8b add labeled-tree 2014-11-12 13:51:53 +01:00
Eelco Dolstra
ea679bca7c Catalyst::Runtime: Require Term::Size::Any
Otherwise you get stupid warnings all the time.
2014-11-12 13:44:16 +01:00
Longrin Wischnewski
490232bd2e apache-httpd: add mod_access_compat for compatibility with old httpd-22 configurations 2014-11-12 13:18:02 +01:00
Mateusz Kowalczyk
5aede825b9 tibia: update to 10.62 2014-11-12 09:02:50 +00:00
Austin Seipp
67f4e5be9a Merge pull request #4953 from abbradar/ipopt
ipopt: add package
2014-11-11 23:08:00 -06:00
Nikolay Amiantov
bfbb46ea92 ipopt: add package 2014-11-12 03:43:35 +03:00
Nikolay Amiantov
32e18bc722 nixos/parallels-guest: add options 2014-11-12 01:26:23 +03:00
Nikolay Amiantov
3c8fe179f6 prl-tools: add package 2014-11-12 01:26:23 +03:00
Joachim Fasting
52f0553209 Add dnscrypt-proxy service
The dnscrypt-proxy service relays regular DNS queries to
a DNSCrypt enabled upstream resolver.
The traffic between the client and the upstream resolver is
encrypted and authenticated, which may mitigate the risk of
MITM attacks and third-party snooping (assuming a trustworthy
upstream).

Though dnscrypt-proxy can run as a standalone DNS client,
the recommended setup is to use it as a forwarder for a
caching DNS client.
To use dnscrypt-proxy as a forwarder for dnsmasq, do

```nix
{
  # ...

  networking.nameservers = [ "127.0.0.1" ];
  networking.dhcpcd.extraConfig = "nohook resolv.conf";

  services.dnscrypt-proxy.enable = true;
  services.dnscrypt-proxy.localAddress = "127.0.0.1";
  services.dnscrypt-proxy.port = 40;

  services.dnsmasq.enable = true;
  services.dnsmasq.extraConfig = ''
    no-resolv
    server=127.0.0.1#40
    listen-address=127.0.0.1
  '';

  # ...
}
```
2014-11-11 22:47:19 +01:00
Joachim Fasting
216ed76821 dnscrypt-proxy: new expression 2014-11-11 22:46:49 +01:00
Pascal Wittmann
ea49ac0496 flashrom: fix 4936 2014-11-11 21:53:37 +01:00
Peter Simons
9db2e64f6f Merge pull request #4948 from dysinger/purescript-0.6.0.2
purescript-0.6.0.2
2014-11-11 21:27:35 +01:00
Peter Simons
56d325550b Revert "Revert "haskell-pandoc-citeproc: drop obsolete versions 0.4 and 0.5"".
This reverts commit dddea7f0d1. @jwiegley, Hakyll builds just fine with
pandoc-citeproc 0.6. See http://hydra.cryp.to/build/239248, for example. If you
have trouble compiling that package, then please share a build log that shows
the error message instead of reverting my commits, please.
2014-11-11 21:17:14 +01:00
Vincent Laporte
9bfa208621 ocaml-sqlite3: update from 2.0.4 to 2.0.7 2014-11-11 20:08:37 +00:00
cillianderoiste
d12d84bf78 Merge pull request #4946 from puffnfresh/package/lightum
Add Lightum package: MacBook light sensor daemon
2014-11-11 20:54:59 +01:00
Shea Levy
f207fee725 bird: bump 2014-11-11 14:27:21 -05:00
John Wiegley
68f3d56880 Drop reference to old shelly from haskell-defaults.nix 2014-11-11 12:50:22 -06:00
John Wiegley
dddea7f0d1 Revert "haskell-pandoc-citeproc: drop obsolete versions 0.4 and 0.5"
This reverts commit d3b2c3f46c.

@peti I'm reverting this commit until a resolution is found that allows
Hakyll to build.  I've confirmed that reverting it here fixes the build
error.
2014-11-11 12:49:33 -06:00
Tim Dysinger
9d7c65f840 purescript-0.6.0.2 2014-11-11 19:47:00 +01:00
Brian McKenna
e9b6ad43a6 Add Lightum package: MacBook light sensor daemon
Also a NixOS service could make sense but the daemon puts
configuration under the Xdg user path.
2014-11-11 10:22:08 -07:00
wmertens
ded8797d0f Merge pull request #4944 from aflatter/enable-leiningen-on-darwin
Allow leiningen to build on darwin
2014-11-11 16:08:43 +01:00
Alexander Flatter
064f10ba3c Allow leiningen to build on darwin 2014-11-11 15:44:45 +01:00