Commit graph

207 commits

Author SHA1 Message Date
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 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
ts468 6d5a742c2e Merge pull request #10000 from ts468/upstream.vswitch
nixos networking: add vswitch option
2015-09-29 00:52:58 +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
Thomas Strobel 59bc47c9ed nixos networking: add vswitch option
Add a configuration option for Open vSwitch that is
similar to the option for the Linux kernel ethernet
bridge.
2015-09-25 11:55:27 +02:00
Eelco Dolstra 9d92bd7845 Add filesystem option to automatically grow to the maximum size
This is primarily for EC2 and other cloud environments, where the disk
may be bigger than the original image.
2015-09-24 19:59:44 +02:00
Eelco Dolstra f40c7ed143 Remove relatime mount option
This has been the kernel default for a long time.
2015-09-24 19:58:41 +02:00
Kovacsics Robert (NixOS) 70fd4b4b02 encrypted-devices service: Fix keyed mount, clarify descriptions.
Not enough arguments were supplied to cryptsetup when a key-file was
specified. Also don't try to unlock keyedEncDevs with a password.
2015-09-22 09:49:28 +01:00
aszlig f9766f885d
nixos/filesystems: Skip check for vboxsf.
We don't even have any means to check a VirtualBox shared folder, so
let's not even try to.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-21 22:32:14 +02:00
aszlig cd4caed35a
nixos/filesystems: Improve vboxsf default options.
The default options for all file systems currently are
"defaults.relatime", which works well on file systems which support the
relatime option.

Unfortunately, this is not the case for the VirtualBox shared folder
filesystem, so until now, you need to set something like:

fileSystems."/foo" = {
  device = "foo";
  fsType = "vboxsf";
  options = "defaults";
};

Otherwise mounting the file system would fail.

Now, we provide only the "defaults" option to the "vboxsf" file system,
so something like this is enough:

fileSystems."/foo" = {
  device = "foo";
  fsType = "vboxsf";
};

An alternative to that could be to document that you need to set default
options, but we really should do what users expect instead of forcing
them to look up the documentation as to why this has failed.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-21 22:32:14 +02:00
Jaka Hudoklin 74209a4ca8
virtualbox service: add support for vboxsf guest filesystem
Closes #9358

Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
Fix reference to bin/mount.vboxsf.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-09-21 22:32:13 +02:00
Jan Malakhovski 6eadb16022 nixos: fix some types 2015-09-18 18:48:50 +00:00
Eelco Dolstra fab3090693 Don't include wireless tools in containers 2015-07-22 12:51:21 +02:00
Eelco Dolstra 6e6a96d42c Some more type cleanup 2015-06-15 18:18:46 +02:00
Nikolay Amiantov 7355066bfe nixos: add support for exfat filesystem 2015-05-27 18:59:33 +03:00
Aristid Breitkreuz 4835763e13 Trackpoint scrolling on T450s et al 2015-05-25 20:00:35 +02:00
Vladimír Čunát 375bc8def7 Merge staging into closure-size 2015-05-05 11:49:03 +02:00
Vladimír Čunát e81e2785c7 xfsprogs: fix outputs and references 2015-04-21 09:02:40 +02:00
Eelco Dolstra d5f187de03 Typo 2015-04-20 16:12:28 +02:00
Eelco Dolstra d4d6b8cc61 Grmbl 2015-04-20 14:24:42 +02:00
Eelco Dolstra fc91ba52df ntfs.nix: Remove copypasta jfs stuff
Thanks to @wizeman for spotting this!
2015-04-20 14:06:44 +02:00
Cray Elliott 479f5f4ae6 fix rebuild when using ntfs partitions
needed to define inInitrd, used vfat.nix as a template
2015-04-19 15:17:23 -07:00
Eelco Dolstra 2b6d011bec Include cifs-utils only when needed
Issue #7117.
2015-04-19 22:06:45 +02:00
Eelco Dolstra 57b05765c9 Don't include ntfs-3g by default
Issue #7117.
2015-04-19 22:06:45 +02:00
William A. Kennington III 9718561589 nixos/vfat: Readd fsck.reiserfs 2015-03-28 19:07:45 -07:00
William A. Kennington III c379847fda nixos/vfat: Readd fsck.vfat 2015-03-28 19:06:43 -07:00
William A. Kennington III 4868649f03 nixos/initrd: Generic library copying 2015-03-28 18:37:29 -07:00
Ricardo M. Correia 4d2317e6eb nixos/zfs: Don't default to git version for kernels >= 3.19
Stable version 0.6.3-1.3 works with kernels 3.19.x.
2015-03-19 19:37:33 +01:00
Robin Gloster a8a350e679 Add Elanthec PS/2 Trackpoint (Thinkpad L430) 2015-03-15 00:09:04 +01:00
Joachim Fasting d375550ead nixos: add a few missing type specifiers under boot.* 2015-02-28 09:19:23 +01:00
William A. Kennington III e453f99446 nixos/networkd: Add an assertion for unsupported rstp 2015-02-24 13:09:34 -08:00
William A. Kennington III 35e9d3c112 nixos/zfs: Use the git version for kernels unsupported by 0.6.3 2015-02-11 15:11:56 -08:00
William A. Kennington III 0fa4c9d6d3 nixos/zfs: Fix references to zfs packages now that they are split 2015-02-07 15:07:39 -08:00
Ricardo M. Correia 1b66077205 nixos: Don't do filesystem checks on ZFS or NFS filesystems 2015-01-21 17:39:53 +01:00
William A. Kennington III 8e5ef7da54 nixos/network-interfaces: Fix rstp support 2015-01-14 10:34:28 -08:00
William A. Kennington III 9a7766e054 nixos/network-interfaces: Add mstpd support for bridges 2015-01-07 14:49:24 -08:00
Tobias Geerinckx-Rice c64257b8e5 Fix user-facing typos (mainly in descriptions) 2014-12-30 03:31:03 +01:00
wmertens 5f7530a1d7 zfs hostId: Instructions to derive from machine-id 2014-12-18 22:52:29 +01:00
William A. Kennington III 1036c66d43 nixos/network-interfaces: Add ipv6 gateway support 2014-12-17 17:56:29 -08:00
Shea Levy 10751129d0 Don't require forcing utils to get to lib 2014-12-10 19:28:45 -05:00
Bjørn Forsman f85ad2d378 nfs-utils: align attrname with pkgname
nfsUtils => nfs-utils. Keep copy of old attribute for backward
compatibility.
2014-12-06 17:01:05 +01:00
William A. Kennington III 8a94c06595 nixos: Add network-pre.target and adjust firewall start ordering 2014-12-01 17:19:44 -08:00
William A. Kennington III 2b06a92c2a nixos/nfs: Fix dependency ordering 2014-12-01 17:19:44 -08:00
William A. Kennington III 1c04e69bce nixos/networking: Fix more harmless errors 2014-12-01 01:18:32 -08:00
William A. Kennington III 74ed5eee41 nixos/network: Fix typo 2014-11-30 05:16:07 -08:00
William A. Kennington III 47d3db5c30 nixos/network: Only check slave interfaces which are configured 2014-11-30 05:12:49 -08:00
William A. Kennington III 01332149d4 nixos/networkd: Fix dhcp being enabled when it should be disabled 2014-11-30 04:46:59 -08:00
William A. Kennington III 4b9c5ebee6 nixos/networking: Fix dependencies for macvlan which should be on bridges 2014-11-30 01:25:09 -08:00
William A. Kennington III a911f9989c nixos/networkd: Fix macvlan called with null mode 2014-11-30 01:19:54 -08:00
William A. Kennington III 16827ff287 nixos/nfs: Fix Test 2014-11-30 01:14:57 -08:00
William A. Kennington III 66f45268ab nixos/networking: Improve service ordering 2014-11-29 22:47:04 -08:00
William A. Kennington III 7ecb084b77 nixos/networking: More fixes 2014-11-29 22:35:03 -08:00
William A. Kennington III 299b59d1c4 nixos/network-interfaces: More fixes 2014-11-27 22:54:01 -08:00
William A. Kennington III fbe9ac05d3 nixos/network-interfaces: Add maclvan support 2014-11-26 16:29:24 -08:00
William A. Kennington III 1860ee27b0 nixos/networking: Fixes 2014-11-26 16:29:24 -08:00
William A. Kennington III 4f2a041345 nixos/network-interfaces: Make it clear that networkd is experimental 2014-11-26 11:22:03 -08:00
William A. Kennington III 2c42738231 nixos/network-interfaces: Refactor scripts for reliability and dependency removal 2014-11-26 11:22:03 -08:00
William A. Kennington III 7005e289da nixos/network-interfaces: Promote secondary addresses when primary addresses expire 2014-11-26 11:22:03 -08:00
William A. Kennington III c7d46687c5 nixos/network-interfaces: Support mac address and mtu universally 2014-11-26 11:22:03 -08:00
William A. Kennington III 2057d9087f nixos: Support network-online target in addition to ip-up 2014-11-26 11:22:03 -08:00
William A. Kennington III 8cffa37787 networkd: Support Host Resolvconf 2014-11-26 11:22:02 -08:00
William A. Kennington III 295a17f872 nixos/network-interfaces-scripted: Fix network-setup triggering 2014-11-26 11:22:02 -08:00
William A. Kennington III 59f512ef7d nixos/network-interfaces: Provide a networkd implementation 2014-11-26 11:22:02 -08:00
William A. Kennington III a332c4eac5 systemd: Enable more network services 2014-11-26 11:22:02 -08: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 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
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
aszlig 23160383e3
nixos: Add a filesystem module for JFS.
I'm not using JFS, but this is to mainly make jfsutils available if you
have defined a JFS filesystem in your configuration.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-10-22 08:22:57 +02:00
William A. Kennington III a5bed86fa4 zfs: zpool-import service must be wanted to start 2014-10-11 01:53:24 -07:00
William A. Kennington III 362699376a nixos/network-interfaces: Bond interface configuration must wait for the bond device service
Also fixes some formatting and removal of slave devices.
2014-10-07 23:07:10 -07:00
William A. Kennington III f1572d37c3 network-interfaces: Bonding fixes 2014-10-04 18:37:00 -07:00
William A. Kennington III 93eb325004 network-interface: Add extra bond options 2014-10-04 17:59:10 -07:00
William A. Kennington III d084245e74 iproute: Fix regressions introduced in 3.16.0
3.16.0 introduced a regression where vlan and veth devices could not be
created due to a check in the code for existing devices. This applies
the upstream patch which fixes the issue.

Additionally, this corrects the nixos network-interfaces task which now
needs to specify the name parameter when adding links.
2014-09-26 00:45:38 -07:00
Rickard Nilsson 66bbbc205d nixos/nfs: Fix configuration merge 2014-09-16 13:53:18 +02:00
aszlig 141cb70d5c
nixos/networking: Fix typo in ipv6prefixLength.
Within the module it's referenced with an uppercase "P" and ipv6Address
also begins with an uppercase "A" after the "6", so let's make it
consistent.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-09-05 02:54:39 +02:00
Michael Raskin ab023cc559 Merge pull request #3843 from wkennington/master.iffix
nixos/network-interfaces: Sanitize sys-subsystem device names
2014-09-03 21:15:46 +04:00
Michael Raskin c4d85240e5 Merge pull request #3267 from Mathnerd314/cpufreq_noise
Remove non-cpufreq_* modules since they are loaded by udev
2014-09-03 18:46:01 +04:00
William A. Kennington III d48a7a17df nixos/network-interfaces: Sanitize sys-subsystem device names
Currently, nixos will allow for interface names with special characters
such as the hyphen to be used. This presents a problem when using
systemd device names as the namespace paths are separated using hyphens.
Within systemd, if a device name has a hyphen it should be replaced with
the escape sequence \x2d.

This patch sanitizes all interface names before they are used in a
systemd device string.
2014-09-03 00:31:38 -07:00
Michael Raskin c3e7588367 Merge pull request #3747 from wkennington/master.explicit
nixos/network-interfaces: Allow explicit virtual interface type setting
2014-09-03 11:25:28 +04:00
William A. Kennington III 36614ff3e2 Revert "Revert "Merge pull request #2449 from wkennington/master.grub""
This reverts commit 94205f5f21.

Conflicts:
	nixos/modules/system/boot/loader/grub/install-grub.pl
2014-09-02 09:16:13 -07:00
Michael Raskin 5bbeba3d97 Merge pull request #3911 from vlstill/nfs-port_pullreq
nfsd: Make it possible to fix rpc.{mountd,statd,lockd} ports.
2014-09-02 00:53:52 +04:00
Vladimir Still a735c308b6 nfsd: Make it possible to fix rpc.{mountd,statd,lockd} ports. 2014-08-31 22:00:16 +02:00
William A. Kennington III 02ecc98e87 nixos/network-interfaces: Fix bug in converting old ipAddresses 2014-08-31 09:47:18 -07:00
William A. Kennington III 3d037ebb94 Revert "Revert "Merge pull request #3182 from wkennington/master.ipv6""
This reverts commit ea8910652f.
2014-08-31 09:46:16 -07:00
Rob Vermaas ea8910652f Revert "Merge pull request #3182 from wkennington/master.ipv6"
This reverts commit b23fd65854, reversing
changes made to 43654cba2c.
2014-08-31 10:58:54 +02:00
Michael Raskin 94205f5f21 Revert "Merge pull request #2449 from wkennington/master.grub"
This reverts commit 469f22d717, reversing
changes made to 0078bc5d8f.

Conflicts:
	nixos/modules/installer/tools/nixos-generate-config.pl
	nixos/modules/system/boot/loader/grub/install-grub.pl
	nixos/release.nix
	nixos/tests/installer.nix

I tried to keep apparently-safe code in conflicts.
2014-08-31 12:58:37 +04:00
William A. Kennington III ef92afe0da nixos/network-interfaces: Fix vlan device coming up during switch 2014-08-30 08:20:14 -07:00
William A. Kennington III ed6040fc8d nixos/network-interface: Append -netdev for all device units
Currently, device units are named directly after the name the user
specifies for the device. A bridge device named lan will be defined
within lan.service. This becomes a problem if you want your interface
named nginx but also want to run the nginx service.

This patch fixes the issue by appending netdev to all virtually created
network device units. Therefore, the lan bridge -> lan-netdev.service.
This naming convention is used for all types of network devices in order
to ensure that all network devices are unique.
2014-08-30 08:20:14 -07:00
William A. Kennington III 1c08efb8ab nixos/network-interfaces: Allow explicit virtual interface type setting 2014-08-30 08:20:14 -07:00
William A. Kennington III 4d8390be60 nixos/network-interfaces: Support the old ip configuration convention 2014-08-30 08:05:00 -07:00
William A. Kennington III 86c0f8c549 Refactor nixos files relying on the old ipAddress / prefixLength / subnetMask attributes 2014-08-30 07:33:38 -07:00
William A. Kennington III 1ff4b83875 nixos/network-interfaces: Add flush upon interface going down 2014-08-30 07:33:38 -07:00
William A. Kennington III 098c8f4c77 nixos/network-interfaces: Add support for multiple ipv4 / ipv6 addresses 2014-08-30 07:33:38 -07:00
William A. Kennington III 02ab48d0ee Enable grub zfsSupport if zfs is built into the initrd 2014-08-28 13:35:34 -07:00
Jaka Hudoklin fd52ebd160 Merge pull request #3558 from geerds/trackpoint
Add "emulateWheel" option for trackpoint configuration
2014-08-27 13:50:26 +02:00
William A. Kennington III 40d88e9f80 nixos/network-interfaces: Add sit interfaces
Previously, we had no method for creating 6-to-4 tunneled interfaces.
This patch adds the option networking.sits, which allows the user to
create named 6-to-4 sit devices.
2014-08-14 14:06:56 -05:00
Jascha Geerds 6aa3888d97 trackpoint: Add emulateWheel option 2014-08-13 12:11:20 +02:00