Commit Graph

3032 Commits

Author SHA1 Message Date
Brian McKenna
3ef956eb50 nixos-generate-config: look at mmc_host for device drivers
I needed to add sdhci_acpi and mmc_block to my initrd modules in order to boot
my Chromebook. Looking under /sys/class/mmc_host/*/device/driver/module will
give us the sdhci_acpi dependency.
2015-10-16 17:41:15 +11:00
Charles Strahan
cb38f10d12 nixos-generate-config: detect brcmfmac requirement
This makes the firmware available (or would, if someone switched off
enableAllFirmware). Corresponding kernel module should get auto-loaded.

See #9948. Close #9971.
2015-10-15 13:12:42 +02:00
Eelco Dolstra
5f077e2296 Factor out option renaming
Option aliases/deprecations can now be declared in any NixOS module,
not just in nixos/modules/rename.nix. This is more modular (since it
allows for example grub-related aliases to be declared in the grub
module), and allows aliases outside of NixOS (e.g. in NixOps modules).

The syntax is a bit funky. Ideally we'd have something like:

  options = {
    foo.bar.newOption = mkOption { ... };
    foo.bar.oldOption = mkAliasOption [ "foo" "bar" "newOption" ];
  };

but that's not possible because options cannot define values in
*other* options - you need to have a "config" for that. So instead we
have functions that return a *module*: mkRemovedOptionModule,
mkRenamedOptionModule and mkAliasOptionModule. These can be used via
"imports", e.g.

  imports = [
    (mkAliasOptionModule [ "foo" "bar" "oldOption" ] [ "foo" "bar" "newOption" ]);
  ];

As an added bonus, deprecation warnings now show the file name of the
offending module.

Fixes #10385.
2015-10-14 18:18:47 +02:00
Pascal Wittmann
78b2851724 Merge pull request #10384 from robbinch/fix-statd
Fix typo in nixos/modules/tasks/filesystems/nfs.nix.
2015-10-14 10:49:52 +02:00
Robbin C
528ebb4e5e Fix typo in nixos/modules/tasks/filesystems/nfs.nix.
statd should be cfg.statd.
2015-10-14 08:48:34 +08:00
Tobias Geerinckx-Rice
a65cf63f55 copy-com service: order after network-online.target
I doubt that ordering non-sysvinit services after network.target ever
makes sense. In this case, CopyConsole requires DNS lookups and fails
if these are not yet possible.
2015-10-13 21:02:01 +02:00
aszlig
e4caf0fde0
nixos/synergy: Restart services on failure.
Synergy seems to get more and more unstable in recent versions, so we
might want to debug this properly. However, it makes sense to restart
the service nevertheless, because synergy is about keyboard and mouse
sharing and it's quite annoying to either SSH in to restart the service
or even needing to unplug the keyboard and plug in into the machine with
the failing service.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-10-13 04:42:39 +02:00
Domen Kožar
49f5d85041 Merge pull request #10208 from offlinehacker/nixos/grafana/fix_option_name
grafana service: fix package option name
2015-10-08 12:21:58 +02:00
Bjørn Forsman
04e748e61f nixos/jenkins: reduce default environment
Don't pull in all of environment.sessionVariables, only add what's
needed for nix and HTTPS to work (which was the point of the previous
patch).
2015-10-06 22:11:03 +02:00
Thomas Strobel
c6b2365e9a supplicant module: extended module for wpa_supplicant
Add new configuration options for wpa_supplicant and allow to
configure and start one wpa_supplicant per device.
2015-10-06 20:12:40 +02:00
Thomas Strobel
d5604f0b22 power management: restart post-resume.target on resume
Trigger a restart of the post-resume.target on resume.
That allows other systemd services to receive the restart signal
after resume by becoming 'partOf' the post-resume.target.
2015-10-06 20:12:40 +02:00
Thomas Strobel
acb1b3cdd0 networking module: wlanInterfaces: fix file name of udev rules 2015-10-06 20:12:39 +02:00
Thomas Strobel
881ec1efb8 networking module: vswitches: re-structure dependencies to systemd units 2015-10-06 20:12:39 +02:00
Thomas Strobel
7a8980193d nixos grub: trustedBoot: introduce safety check that TPM is available 2015-10-06 20:12:39 +02:00
Domen Kožar
a61e26a63d Merge pull request #10227 from bjornfor/jenkins-envvars
nixos/jenkins: rework environment handling
2015-10-06 13:38:55 +02:00
lethalman
241821cbb4 Merge pull request #10195 from cleverca22/master
build the crontab localy, there is nothing to gain from building it remotely
2015-10-06 11:01:56 +02:00
Luca Bruno
eccd68eeb7 gnome3: add bgSupport=true. Closes #10242 2015-10-06 10:21:38 +02:00
Eelco Dolstra
e65b8fcebe Fix nixos-upgrade 2015-10-05 09:26:30 +02:00
Bjørn Forsman
67723df930 nixos/jenkins: rework environment handling
Jenkins gets (by default) an additional environment of

  { NIX_REMOTE = "daemon"; }

This has the following problems:

  1. NIX_REMOTE disappears when users specify additional environment
     variables, because defaults have low merge priority.
  2. nix cannot be used without additional NIX_PATH envvar, which is
     currently missing.
  3. If you try to use HTTPS, you'll see that jenkins lacks
     SSL_CERT_FILE envvar, causing it to fail.

This commit adds config.environment.sessionVariables and NIX_REMOTE to
the set of variables that are always there for jenkins, making nix and
HTTPS work out of the box.

services.jenkins.environment is now empty by default.
2015-10-04 20:04:00 +02:00
Bjørn Forsman
5f17aeb403 nixos/docker: default storageDriver to "devicemapper"
Commit 9bfe92ecee ("docker: Minor improvements, fix failing test") added
the services.docker.storageDriver option, made it mandatory but didn't
give it a default value. This results in an ugly traceback when users
enable docker, if they don't pay enough attention to also set the
storageDriver option. (An attempt was made to add an assertion, but it
didn't work, possibly because of how "mkMerge" works.)

The arguments against a default value were that the optimal value
depends on the filesystem on the host. This is, AFAICT, only in part
true. (It seems some backends are filesystem agnostic.) Also, docker
itself uses a default storage driver, "devicemapper", when no
--storage-driver=x options are given. Hence, we use the same value as
default.

Add a FIXME comment that 'devicemapper' breaks NixOS VM tests (for yet
unknown reasons), so we still run those with the 'overlay' driver.

Closes #10100 and #10217.
2015-10-04 14:34:38 +02:00
Bjørn Forsman
424e6e501a nixos/modules: simplify pkgs.zfs handling
Thanks, @lethalman.
2015-10-04 14:31:16 +02:00
Casey Ransom
791b600aac nixos/docker: Include ZFS commands in PATH for ZFS storagedriver
When using the ZFS storagedriver in docker, it shells out for the ZFS
commands. The path configuration for the systemd task does not include
ZFS, so if the driver is set to ZFS, add ZFS utilities to the PATH.

This will resolve https://github.com/NixOS/nixpkgs/issues/10127

[Bjørn: prefix commit message with "nixos/docker:", remove extra space
before ';']
2015-10-04 14:13:56 +02:00
Thomas Strobel
d286ac5887 networking module: restructure wlanInterfaces
Restructure internals of networking.wlanInterfaces option to generate
proper '.device' systemd targets for the WLAN interfaces.
2015-10-04 11:00:05 +02:00
Jaka Hudoklin
f660729e35 grafana service: fix package option name 2015-10-03 15:26:14 +02:00
michael bishop
54fe2f8c5c build the crontab localy, there is nothing to gain from building it remotely 2015-10-03 03:33:13 -03:00
Gabriel Ebner
0dfddc5a54 opensmtpd: support filters. 2015-10-02 13:01:50 +02:00
Thomas Strobel
213bb58752 networking module: fix for wlanInterfaces 2015-10-02 12:16:20 +02:00
lethalman
0474cb3c6d Merge pull request #10078 from nmikhailov/nm_service
Enable setting extended NetworkManager hooks
2015-10-02 11:45:28 +02:00
Thomas Strobel
6dfb16730b networking module: fix DocBook tags 2015-10-01 17:50:42 +02:00
Thomas Strobel
c0248c0c1f networking module: init 'wlanInterfaces' option
Configuration option for setting up virtual WLAN interfaces.

If the hardware NIC supports it, then multiple virtual WLAN interfaces can be
configured through the options of the new 'networking.wlanInterfaces' module.
For example, the following configuration transforms the device with the persistent
udev name 'wlp6s0' into a managed and a ad hoc device with the device names
'wlan-managed0' and 'wlan-adhoc0', respectively:

networking.wlanInterfaces = {
    "wlan-managed0" = {
        type = "managed";
        device = "wlp6s0";
    };
    "wlan-adhoc0" = {
        type = "ibss";
        device = "wlp6s0";
    };
};

Internally, a udev rule is created that matches wlp6s0 and runs a script which adds
the missing virtual interfaces and re-configures the wlp6s0 interface accordingly.
Once the new interfaces are created by the Linux kernel, the configuration of the
interfaces is managed by udev and systemd in the usual way.
2015-10-01 15:35:30 +02:00
Eelco Dolstra
ab16b6a837 Merge pull request #10160 from dezgeg/pr-unset-build-hook-in-nixos-install
nixos-install: Don't use NIX_BUILD_HOOK from caller's environment
2015-09-30 23:33:07 +02:00
Tuomas Tynkkynen
725a4d6740 nixos-install: Don't use NIX_BUILD_HOOK from caller's environment
If nixos-install is run on a machine with `nix.distributedBuilds = true`
the installation will fail at some point like this:

Died at /nix/store/4frhrl31cl7iahlz6vyvysy5dmr6xnh3-nix-1.10/libexec/nix/build-remote.pl line 115, <STDIN> line 1.

This is due to `nix.distributedBuilds` setting
NIX_BUILD_HOOK=/nix/store/.../build-remote.pl in the global environment,
which then gets confused in the minimal chroot created by nixos-install.

To avoid these kinds of issues with build hooks, just disable them in
the chroot.
2015-09-30 23:02:21 +03:00
Eelco Dolstra
3231424c37 Bump fallback Nix store paths 2015-09-30 21:12:46 +02:00
Rickard Nilsson
c0a83cbc49 opentsdb nixos module: Add option for defining OpenTSDB's configuration 2015-09-30 18:31:27 +02:00
ts468
1ddc1cdcf2 Merge pull request #10076 from ts468/upstream.systemd
systemd module: add option to specify generators
2015-09-30 15:12:43 +02:00
Eelco Dolstra
0e3c1e31b1 Remove zfs-git and spl-git
See https://github.com/NixOS/nixpkgs/pull/10042#commitcomment-13422343.
2015-09-29 14:54:12 +02:00
Thomas Strobel
05c46bfc05 systemd module: add option to specify generators
Adding the configuration option 'systemd.generators' to
specify systemd system-generators. The option allows to
either add new system-generators to systemd, or to over-
ride or disable the system-generators provided by systemd.

Internally, the configuration option 'systemd.generators'
maps onto the 'environment.etc' configuration option.
Having a convenience wrapper around 'environment.etc' helps
to group the systemd system-generator configuration more
easily with other 'systemd...' configurations.
2015-09-29 11:53:25 +02:00
Peter Simons
4578784820 nixos: add services.bind.extraConfig option
This option allows users to add arbitrary configuration statements into
the generated named.conf file.
2015-09-29 11:51:40 +02:00
ts468
6d5a742c2e Merge pull request #10000 from ts468/upstream.vswitch
nixos networking: add vswitch option
2015-09-29 00:52:58 +02:00
Eelco Dolstra
cab1483a95 Blacklist the xen_fbfront kernel module
This gets rid of a 30 second delay during boot. See e.g
https://github.com/coreos/bugs/issues/208.
2015-09-28 22:15:47 +02:00
Eelco Dolstra
e866840a12 Wait for udev after resizing partitions
Otherwise the EC2 boot may panic.
2015-09-28 22:15:47 +02:00
Eelco Dolstra
3fada8c5a0 Remove unnecessary "|| true" from the stage 1 script 2015-09-28 22:15:47 +02:00
Eelco Dolstra
1b728846a8 Shut up a KDE warning when a user first logs in
It was complaining about not having write permission to
$HOME/.local/share/user-places.xbel (because .local/share didn't exist
yet).
2015-09-28 15:14:44 +02:00
Eelco Dolstra
b3347287be Use make-disk-image.nix for VirtualBox images 2015-09-28 14:31:19 +02:00
Eelco Dolstra
640dff2918 Fix GRUB syntax in EC2 HVM images
There is no "root" command in GRUB 2, and it's not needed anyway. This
command delayed HVM boots for a few seconds.
2015-09-28 13:47:14 +02:00
Eelco Dolstra
7338f5ff46 ec2-data.nix: Remove superfluous check 2015-09-28 13:47:14 +02:00
Eelco Dolstra
aeb31b97ad Update AMI generator
The EBS and S3 (instance-store) AMIs are now created from the same
image. HVM instance-store AMIs are also generated.

Disk image generation has been factored out into a function
(nixos/lib/make-disk-image.nix) that can be used to build other kinds
of images.
2015-09-27 21:06:40 +02:00
Eelco Dolstra
efed00b55e channel.nix: Fix broken flag to skip substitutes 2015-09-27 21:06:35 +02:00
Edward Tjörnhammar
a0918e2e62 Merge pull request #9982 from KoviRobi/fix-encrypted-non-root-devices
encrypted-devices service: Fix keyed mount, clarify descriptions.
2015-09-27 12:42:08 +02:00
aszlig
ebf1f51641
nixos/fonts: Add unifont to list of default fonts.
This fixes #10077 because after some debugging it turns out that by
default we don't have a font which is able to display Chinese symbols.

Thanks to @anderspapitto, @kmicu and hyper_ch on IRC to help debugging
this issue, see log at:

http://nixos.org/irc/logs/log.20150926 starting at 19:46

With unifont we have a reasonable fallback font to ensure that every
written language is rendered correctly and thus less surprise for new
users who keep their font settings at the default.

Reported-by: Anders Papitto <anderspapitto@gmail.com>
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-26 21:04:15 +02:00