Commit graph

722 commits

Author SHA1 Message Date
Will Fancher 0d55d48f0f ZFS: Ask for stage 2 encryption passwords using systemd-ask-password 2020-06-23 06:25:21 -04:00
Timo Kaufmann 4843eab3a1
Merge pull request #84135 from symphorien/btrfs-scrub-success
nixos/btrfs autoScrub: don't fail when scrub finishes successfully
2020-06-19 22:55:19 +02:00
Michele Guerini Rocco a2fd1ba544
Merge pull request #89159 from datafoo/fix-issue-89158
nixos/networking: check interface state files exist before acting on them
2020-06-12 15:31:57 +02:00
Michael Weiss a6afdbb70b
nixos: Allow empty hostnames again
This fixes a regression from 993baa587c which requires
networking.hostName to be a valid DNS label [0].
Unfortunately we missed the fact that the hostnames may also be empty,
if the user wants to obtain it from a DHCP server. This is even required
by a few modules/images (e.g. Amazon EC2, Azure, and Google Compute).

[0]: https://github.com/NixOS/nixpkgs/pull/76542#issuecomment-638138666
2020-06-03 15:23:37 +02:00
Florian Klink 4cd605f3ca
Merge pull request #62671 from kfiz/networking-proxy_arp-fix
tasks/network-interfaces.nix: Enable ip_forwarding for ipv4 and p…
2020-05-31 22:22:49 +02:00
datafoo 8f16f66b27 nixos/networking: check interface state files exist before acting on them
Fix #89158
2020-05-29 12:20:06 +02:00
Doro Rose 5d3a72f683 networking-interfaces.nix: remove broken NDP bits from proxyARP
The `networking.interfaces.<name?>.proxyARP` option previously mentioned it would also enable IPv6 forwarding and `proxy_ndp`.

However, the `proxy_ndp` option was never actually set (the non-existing `net.ipv6.conf.proxy_arp` sysctl was set
instead). In addition `proxy_ndp` also needs individual entries for each ip to proxy for.

Proxy ARP and Proxy NDP are two different concepts, and enabling the latter
should be a conscious decision.

This commit removes the broken NDP support, and disables explicitly
enabling IPv6 forwarding (which is the default in most cases anyways)

Fixes #62339.
2020-05-26 00:53:10 +02:00
Michael Weiss 993baa587c
nixos: Require networking.hostName to be a valid DNS label
This also means that the hostname must not contain the domain name part
anymore (i.e. must not be a FQDN).
See RFC 1035 [0], "man 5 hostname", or the kernel documentation [1].
Note: For legacy reasons we also allow underscores inside of the label
but this is not recommended and intentionally left undocumented.

[0]: https://tools.ietf.org/html/rfc1035
[1]: https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#domainname-hostname

Co-authored-by: zimbatm <zimbatm@zimbatm.com>
2020-05-25 18:13:39 +02:00
Florian Klink 822918df4c nixos/scripted-networking: use udev to configure link MACAddress and MTUBytes
The `network-link-${i.name}` units raced with other things trying to
configure the interface, or ran before the interface was available.

Instead of running our own set of shell scripts on boot, and hoping
they're executed at the right time, we can make use of udev to configure
the interface *while they appear*, by providing `.link` files in
/etc/systemd/network/*.link to set MACAddress and MTUBytes.

This doesn't require networkd to be enabled, and is populated properly
on non-networkd systems since
https://github.com/NixOS/nixpkgs/pull/82941.

This continues clean-up work done in
https://github.com/NixOS/nixpkgs/pull/85170 for the scripted networking
stack.

The only leftover part of the `network-link-${i.name}` unit (bringing
the interface up) is moved to the beginning of the
`network-addresses-${i.name}` unit.

Fixes: https://github.com/NixOS/nixpkgs/issues/74471
Closes: https://github.com/NixOS/nixpkgs/pull/87116
2020-05-22 10:58:00 +02:00
Florian Klink ad26d7c044 nixos/network-interfaces-scripted: always run systemctl of the currently running systemd 2020-05-21 10:33:51 +02:00
datafoo 431106a17e nixos/zfs: add missing dependendy nettools
Fix #87823
2020-05-18 11:25:00 +02:00
Florian Klink 532528190b nixos/networking: move network-link-${i.name} to scripted networking
The unit sets MTU and MAC Address even with networkd enabled, which
isn't necessary anymore, as networkd handles this by itself.
2020-04-13 22:03:35 +02:00
Florian Klink ca391c8a4f nixos/networking: add assertion catching setting mac addresses on tun devices
Setting a MAC Address on a tun interface isn't supported, and invoking
the corresponding command fails.
2020-04-13 22:03:35 +02:00
Florian Klink cddc7a28b8 nixos/networking: fix setting .macAddress and .mtu with networkd
This needs to be set in the .linkConfig of a .network
2020-04-13 22:03:35 +02:00
Michael Reilly 84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Jörg Thalheim 5fb2a9d8c7
Merge pull request #79828 from Mic92/zed
nixos/zfs: populate PATH with needed programs for zed
2020-04-02 13:42:01 +01:00
Symphorien Gibol 55d16d5334 nixos/btrfs autoScrub: don't fail when scrub finishes successfully 2020-04-02 12:00:00 +00:00
Robin Gloster d6fa642608
Merge pull request #81161 from wedens/libvirt-6.0.0
libvirt: 5.4.0 -> 6.1.0
2020-03-30 13:19:00 +00:00
David Costa 2e4a45c921 nixos/network-interfaces: fix examples types
make literalExample receive string arguments.
Fix nixos/nixos-homepage#255
2020-03-29 01:00:59 +01:00
Peter Hoeg 8a31cf1459 zfs: document systemd-udev-settle dependency 2020-03-21 11:15:06 +08:00
volth 687aa06c70 nixos/scripted-networking: fix bridge setup when libvirtd uses socket activation 2020-03-15 11:29:14 +07:00
Léo Gaspard 26b1ef1506
Merge pull request #80141 from symphorien/scrub
nixos/btrfs: make autoScrub not prevent shutdown or suspend
2020-03-12 22:39:34 +01:00
lewo cbb21b2a8a
Merge pull request #81214 from buckley310/updateDelay
NixOS/auto-upgrade: Add optional randomized delay
2020-03-12 09:06:32 +01:00
Sean Buckley 9d3aa711fe NixOS/auto-upgrade: refine option description 2020-03-03 22:14:31 -05:00
Jörg Thalheim 8f543ed80d
nixos/zfs: continue trimming also if one pool fails
fixes https://github.com/NixOS/nixpkgs/issues/81602
2020-03-03 11:22:07 +00:00
Sean Buckley 14a1aa4a3d
NixOS/auto-upgrade: fix wording
Co-Authored-By: Pascal Hertleif <killercup@gmail.com>
2020-02-28 12:03:41 -05:00
Sean Buckley b6cad64ef6 NixOS/auto-upgrade: Add optional randomized delay 2020-02-27 16:40:10 -05:00
Jörg Thalheim 1ddb140d95
Merge pull request #53033 from netixx/openvswitch-improved-systemd
openvswitch: better integration with systemd
2020-02-21 08:24:49 +00:00
Michele Guerini Rocco d4c0e72071
Merge pull request #80504 from ben0x539/encrypted-devices-loa-warning
silence warning from #63103 in encrypted-devices.nix
2020-02-19 12:15:19 +01:00
Benjamin Herr 0f5acc5ebe silence warning from #63103 in encrypted-devices.nix 2020-02-18 20:58:40 -08:00
Symphorien Gibol 5359d90b15 nixos/btrfs: make autoScrub not prevent shutdown or suspend
Fixes: #79086 #79017
2020-02-14 12:00:00 +00:00
Florian Klink 4c8bdd1c4f nixos/filesystems: don't chown /run/keys recursively
3c74e48d9c was a bit too much, it updated
permissions of all files recursively, causing files to be readable by
the group.

This isn't a problem immediately after bootup, but on a new activation,
as tmpfiles.d get restarted then, updating the permission bits of
now-existing files.

This updates the `Z` to be a `z` (the non-recursive variant), and adds a
`d` to ensure a directory is created (which should be covered by the
initrd shell script anyway)
2020-02-11 21:52:27 +01:00
Jörg Thalheim 92bede3102
nixos/zfs: populate PATH with needed programs for zed 2020-02-11 14:01:22 +00:00
Florian Klink 3c74e48d9c nixos/filesystems: ensure keys gid on /run/keys mountpoint
boot.specialFileSystems is used to describe mount points to be set up in
stage 1 and 2.

We use it to create /run/keys already there, so sshd-in-initrd scenarios
can consume keys sent over through nixops send-keys.

However, it seems the kernel only supports the gid=… option for tmpfs,
not ramfs, causing /run/keys to be owned by the root group, not keys
group.

This was/is worked around in nixops by running a chown root:keys
/run/keys whenever pushing keys [1], and as machines had to have pushed keys
to be usable, this was pretty much always the case.

This is causing regressions in setups not provisioned via nixops, that
still use /run/keys for secrets (through cloud provider startup scripts
for example), as suddenly being an owner of the "keys" group isn't
enough to access the folder.

This PR removes the defunct gid=… option in the mount script called in
stage 1 and 2, and introduces a tmpfiles rule which takes care of fixing
up permissions as part of sysinit.target (very early in systemd bootup,
so before regular services are started).

In case of nixops deployments, this doesn't change anything.
nixops-based deployments receiving secrets from nixops send-keys in
initrd will simply have the permissions already set once tmpfiles is
started.

Fixes #42344

[1]: 884d6c3994/nixops/backends/__init__.py (L267-L269)
2020-02-05 01:53:26 +01:00
rnhmjoj 2485e6399e
nixos/networking-interfaces: change preferTempAddress to allow disabling temp addresses 2020-02-01 11:38:40 +01:00
Denys Pavlov 90b6823373 nixos/powertop: wait for hardware to initialize
We should wait until after `multi-user.target` is triggered to allow
hardware to finish initializing, such as network devices and USB drives.
This ensures `powertop --auto-tune` sets more tunables to "Good".

Fixes #66820
2020-01-09 19:45:41 +08:00
rnhmjoj c9276c1b52
nixos: unify virtual console options
This commit moves all the virtual console related options
to a dedicated config/console.nix NixOS module.

Currently most of these are defined in config/i18n.nix
with a "console" prefix like `i18n.consoleFont`,
`i18n.consoleColors` or under `boot` and are implemented
in tasks/kbd.nix.
Since they have little to do with actual internationalisation
and are (informally) in an attrset already, it makes sense to
move them to a specific module.
2019-12-20 00:27:34 +01:00
Frederik Rietdijk 7aedd744d8 Merge master into staging-next 2019-12-16 20:28:10 +01:00
Franz Pletz 0f783bc7ca
Merge pull request #75193 from Ma27/optional-networkd-gateway
nixos/networkd: only set gateway if it's explicitly specified in the module system
2019-12-15 22:15:32 +00:00
Netix (Espinet François) cd3597b486
openvswitch: better integration with systemd
Systemd dependencies for scripted mode
were refactored according to analysis in #34586.

networking.vswitches can now be used with systemd-networkd,
although they are not supported by the daemon, a nixos receipe
creates the switch and attached required interfaces (just like
the scripted version).

Vlans and internal interfaces are implemented following the
  template format i.e. each interface is
described using an attributeSet (vlan and type at the moment).
If vlan is present, then interface is added to the vswitch with
given tag (access mode). Type internal enabled vswitch to create
interfaces (see openvswitch docs).

Added configuration for configuring supported openFlow version on
the vswitch

This commit is a split from the original PR #35127.
2019-12-15 21:16:26 +01:00
Kai Wohlfahrt b1c10bc8b2 nfs: set up request-key for id mapping
A patch is necessary upstream to support multiple configs via symlinks
in /etc/request-key.d

Once that is done, we can add support for CIFS as well
2019-12-12 15:42:44 +00:00
Silvan Mosberger 4ee3e8b21d
nixos/treewide: Move rename.nix imports to their respective modules
A centralized list for these renames is not good because:
- It breaks disabledModules for modules that have a rename defined
- Adding/removing renames for a module means having to find them in the
central file
- Merge conflicts due to multiple people editing the central file
2019-12-10 02:51:19 +01:00
Maximilian Bosch ff65638bfc
nixos/networkd: only set gateway if it's explicitly specified in the module system 2019-12-08 03:30:04 +01:00
nyanloutre c082e13ecb
nixos/zfs: Adding ZED configuration options
Co-authored-by: sjau <github.com@sjau.ch>
2019-12-04 20:29:19 +01:00
Elias Probst 8d8c3cadd6 Fix typo in message (vswichtesvswitches) 2019-10-26 13:26:01 +02:00
Florian Klink c3098d182d nixos/network: remove 99-main.network
Just maching all network interfaces caused many breakages, see #18962
and #71106.

We already don't support the global networking.useDHCP,
networking.defaultGateway(6) options if networking.useNetworkd is
enabled, but direct users to configure the per-device
networking.interfaces.<name?>.… options.
2019-10-23 11:39:27 +02:00
Jörg Thalheim faa7ce3ee5
Merge pull request #70240 from woffs/pr-etc-zpool.d
nixos module zfs: provide /etc/zfs/zpool.d
2019-10-15 11:45:52 +01:00
Jörg Thalheim 9a89467606
nixos/zfs: simplify logic for scrub/autosnapshot service
This makes them consistent with the way zfs.trim is enabled
and allow to enable them by default in future.
2019-10-14 10:30:57 +01:00
Jörg Thalheim 692656daf8
nixos/zfs: avoid script derivation for trim service
Since we only have a single pipe we can save the overhead of building a derivation
when creating the zfs trim service file when building the system.
2019-10-08 11:11:06 +01:00
Jörg Thalheim a412d90e10
nixos/zfs: only enable trim if zfs is enabled
Also don't fail the service if there are no pools yet.
This might happen on installation ISOs.
2019-10-07 10:44:56 +01:00
Linus Heckemann 0b754fbe54
Merge pull request #69302 from mayflower/networkd-disallow-dhcp
networkd: disallow useDHCP
2019-10-07 11:29:04 +02:00
Frank Doepper 3065d00d74 nixos module zfs: provide /etc/zfs/zpool.d
The scripts for zpool iostat -c and zpool status -c are located in
/etc/zfs/zpool.d
2019-10-02 12:34:09 +02:00
Silvan Mosberger c75a18fea6
mkRemovedOptionModule: assert on removed options (#69419)
mkRemovedOptionModule: assert on removed options
2019-09-30 16:39:40 +02:00
Robin Gloster b08b0bcbbe mkRemovedOptionModule: assert on removed options
We don't want to ignore config that can mess up machines. In general
this should always fail evaluation, as you think you are changing
behaviour and don't, which can easily create run-time errors we can
catch early.
2019-09-30 12:07:13 +02:00
Vladimír Čunát 4c07c0fdf0
nixos network-interfaces.nix: fixup after the last change
TL;DR: ipv6 tests were broken (probably the privacy-extension stuff)
https://github.com/NixOS/nixpkgs/pull/68227#issuecomment-536159177
2019-09-28 19:33:44 +02:00
Jörg Thalheim 5a73cd4f68
nixos/zfs: Enable trim by default (#69672)
nixos/zfs: Enable trim by default
2019-09-28 10:07:12 +01:00
Svein Ove Aas e4f975765f
nixos/zfs: Enable trim by default 2019-09-27 18:35:03 +01:00
Linus Heckemann f0f3bd8d96
Merge pull request #68227 from volth/patch-362
network-interfaces.nix: escape '.' in interface names passed to sysctl
2019-09-26 12:16:24 +02:00
Robin Gloster 68b42a84fd
Merge branch 'master' into networkd-disallow-dhcp 2019-09-25 11:28:20 +02:00
Roman Volosatovs a0a3675bdf
nixos/network: replace deprecated DHCP=both by DHCP=yes 2019-09-24 11:33:36 +02:00
Robin Gloster e862dd6373
networking.useDHCP: add release notes and docs 2019-09-24 10:20:17 +02:00
Robin Gloster c26c6241ea
networking.useDHCP: disallow for networkd
This setting will be removed with the switch to systemd-networkd. The
use of per interface config is encouraged instead.
2019-09-24 10:20:16 +02:00
Mikhail Klementev d4e8f7908d NixOS/auto-upgrade: add gzip to service path
Resolves #28527
2019-09-15 16:13:29 +02:00
Andreas Rammhold 2b605e96c2
nixos/networkd: continue supporting 99-main with wildcard interface match
With systemd version 243 network units with empty match block will
generate warnigs. The reasoning seems to be that the intended behaviour
is hard to infere. Being explicit about really meaning any interface is
the reasonable thing here.

We want to get rid of this mechanism in the long run but as long as we
do not have a replacement we should stick with it and keep it in
reasonable good shape.
2019-09-08 17:14:13 +02:00
volth 8b93e5c8a4
'udev' needs absolute path to 'echo' 2019-09-06 21:27:10 +00:00
volth efccc442d9
network-interfaces.nix: escape '.' in interface names passed to sysctl 2019-09-06 21:13:28 +00:00
Vladimír Čunát f21211ebfe
Merge branch 'master' into staging 2019-09-02 23:25:24 +02:00
Silvan Mosberger 478e7184f8
nixos/modules: Remove all usages of types.string
And replace them with a more appropriate type

Also fix up some minor module problems along the way
2019-08-31 18:19:00 +02:00
Frederik Rietdijk 5061fe0c2c Merge staging-next into staging 2019-08-28 08:26:42 +02:00
volth 35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
danbst d80cd26ff9 Merge branch 'master' into flip-map-foreach 2019-08-18 18:00:25 +03:00
Danylo Hlynskyi 7585496eff
Merge branch 'master' into flip-map-foreach 2019-08-05 14:09:28 +03:00
danbst 0f8596ab3f mass replace "flip map -> forEach"
See `forEach`-introduction commit.
```
rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /forEach /g'
```
2019-08-05 14:03:38 +03:00
danbst 91bb646e98 Revert "mass replace "flip map -> foreach""
This reverts commit 3b0534310c.
2019-08-05 14:01:45 +03:00
Frederik Rietdijk 7560e2d64f
Merge pull request #65376 from abbradar/mdadm-upstream
Use upstream units for mdadm
2019-08-03 08:06:07 +02:00
Nikolay Amiantov 717b8b3219 systemd service: remove generator-packages option
Use systemd.packages instead, it's less error prone and more in line with
what's expected.
2019-08-01 00:55:35 +03:00
Nikolay Amiantov ca780f4a18 swraid service: use upstream units
This fixes a serious bug on NixOS with swraid where mdadm arrays weren't
properly stopped on shutdown. Rather than fixing the unit by adding
`Before=final.target` we completely move to upstream units, which uses
systemd shutdown hooks instead. This also drives down maintenance costs
for us.
2019-08-01 00:55:35 +03:00
Nikolay Amiantov fd405dab3e systemd service: rename generator-packages 2019-08-01 00:55:35 +03:00
Janne Heß ae608faa85 nixos/xfs: Add xfs_repair to the initrd
Closes #8820
2019-07-30 09:28:34 +02:00
Jörg Thalheim 1d86714a2b
nixos/zfs: add trim service
Introduces a trim timer similar to the fstrim service.
According to zpool(8) for consumer hardware periodic manual TRIM
is preferred over automatic TRIM that ZFS implements.
The period of one week is based on recommendations of fstrim.
2019-07-25 12:47:43 +01:00
Nikolay Amiantov 294751a4fc
Merge pull request #62955 from abbradar/resolvconf
resolvconf service: init
2019-07-17 11:07:12 +03:00
Nikolay Amiantov 01b90dce78 resolvconf service: init
This is a refactor of how resolvconf is managed on NixOS. We split it
into a separate service which is enabled internally depending on whether
we want /etc/resolv.conf to be managed by it. Various services now take
advantage of those configuration options.

We also now use systemd instead of activation scripts to update
resolv.conf.

NetworkManager now uses the right option for rc-manager DNS
automatically, so the configuration option shouldn't be exposed.
2019-07-15 20:25:39 +03:00
Linus Heckemann a935eff7fa
Merge pull request #62835 from lheckemann/ipv6-privacy-extensions
Ipv6 privacy extensions
2019-07-14 19:27:54 +02:00
danbst 3b0534310c mass replace "flip map -> foreach"
See `foreach`-introduction commit.
```
rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /foreach /g'
```
2019-07-14 13:46:10 +03:00
Daniel Frank ed86bbad84 system.autoUpgrade: optionally allow rebooting the system on kernel change (#64267)
* autoUpgrade: optionally allow rebooting the system on kernel change

* system.autoUpgrade: Better documentation and readability
2019-07-12 09:09:50 +03:00
rnhmjoj 1738283e6e nixos/network-interfaces: make preferTempAddr=false work again 2019-07-09 08:08:45 +02:00
Ivan Jager a38449f159 nixos/zfs: enable requestEncryptionCredentials by default
Since zfsStable now supports encryption, it no longer makes sense to set
the default based on whether we're using zfsUnstable
2019-07-04 16:11:52 -05:00
Silvan Mosberger 852fe410fc
nixos/zfs: Remove requestEncryptionCredentials assertion
zfs >= 0.8 supporting encryption is now stable
2019-06-21 03:33:09 +02:00
Frederik Rietdijk d3afcac771 Merge master into staging-next 2019-06-09 12:28:52 +02:00
Linus Heckemann 26317b02ae nixos/network-interfaces: always apply privacy extensions
Fixes #56306
2019-06-07 21:43:29 +02:00
Jörg Thalheim 11b8a5f20e
zfs: 0.7.13 -> 0.8.0
Same as zfsUnstable for the moment.
We still keep the zfsUnstable expression as we likely
need it in the near future again.
Also remove spl since it is no longer needed.
2019-06-06 10:07:43 +01:00
Andreas Rammhold 1b7b1dbe2f
nixos/networkd: rename GatewayOnlink to GatewayOnLink
This follows upstreams renaming of the option [1].

[1] 9cb8c55934
2019-06-03 15:05:17 +02:00
Andreas Rammhold d600da7045
nixos/networkd: use the route section for default routes
With systemd v242 using the `Gateway` attribute of the `[Network]`
section will lead to "onlink" routes on all the device that are matched
by the default configuration (typically all devices) causing multiple
default routes (even on localhost).

We can only avoid that - while keeping our default route option - when
we mark the route as explicitly not on link. Only gateways that are
within a subnet of one of the assigned interface addresses will be
installed into the routing table.
2019-06-03 15:05:16 +02:00
Andreas Rammhold a32cd7d84a
nixos/networkd: use no instead of none for DHCP= option
systemd has deprecated the use of `none` and recommends using `no`
instead.
2019-06-03 15:05:15 +02:00
Aaron Andersen 4a11ce7f26
cleanup redundant text in modules utilizing mkEnableOption
Closes #59911
2019-04-20 14:44:02 +02:00
talyz 0eb6d0735f filesystems: Add autoResize assertion
Assert that autoResize is only used when fsType is explicitly set to a
supported filesystem: if it's set to "auto", the default, the required
resizing tools won't be copied into the initrd even if the actual
filesystem is supported.
2019-03-16 13:01:35 +01:00
volth c730f29e7f network-scripting: do not run resolvconf if /etc/resolv.conf is managed manually (#56682)
The second invocation of resolvconf, missed in https://github.com/NixOS/nixpkgs/pull/32308
2019-03-09 13:42:14 +02:00
Danylo Hlynskyi af5909a272
nixos/auto-upgrade: enable service only when it's enabled in options (#56948)
* nixos/auto-upgrade: enable service only when it's enabled in options

This reduced closure size of `tinyContainer` from 449 MB to 403 MB
2019-03-07 02:09:02 +02:00
Symphorien Gibol a915b33315 nixos: add preferLocalBuild=true; on derivations for config files 2019-02-22 20:11:27 +01:00
aanderse c01eeda8e9 nixos-generate-config: account for mount points & devices with spaces & tabs in the name (#50234) 2019-02-03 14:33:31 +01:00
Pierre Bourdon 3674bdf204
nixos/tasks/encrypted-devices: fix regression from #54637
27982b408e introduced a bug when
refactoring the encrypted-devices module, causing some encrypted
filesystem options to not be recognized anymore.

See e.g. https://hydra.nixos.org/build/88145490
2019-02-02 17:31:31 +01:00
Silvan Mosberger b185e5970f
Merge pull request #55042 from markuskowa/fix-update-service
NixOS/auto-upgrade: add git to service path
2019-02-02 00:32:35 +01:00
Markus Kowalewski d788874bdb
NixOS/auto-upgrade: add git to service path
Resolves https://github.com/NixOS/nixpkgs/issues/54946
where nixos-rebuild can not find git, when executed
from inside the systemd service
2019-02-01 23:10:51 +01:00
danbst 27982b408e types.optionSet: deprecate and remove last usages 2019-01-31 00:41:10 +02:00
Jörg Thalheim 859ce47b02
Merge pull request #53965 from mayflower/zfs-autoscrub-fix
nixos/zfs: autoscrub only after boot is complete
2019-01-22 10:48:17 +00:00
Jörg Thalheim a6b97bd1bb
Merge pull request #42183 from kisik21/master
nixos/stage-1, nixos/f2fs: added F2FS resizing
2019-01-17 07:42:32 +00:00
Linus Heckemann 783f2c84e8 nixos/zfs: autoscrub only after boot is complete
Fixes #53583
2019-01-14 21:00:20 +01:00
(cdep)illabout 46ecec8239
nixos/cpufreq: Remove the alias to set the cpu frequency governor
This PR temporarily fixes the issue with PR 53041 as explained
here:

https://github.com/NixOS/nixpkgs/pull/53041#commitcomment-31825338

The alias `powerManagement.cpufreq.governor` to
`powerManagement.cpuFreqGovernor` has been removed.
2019-01-03 20:57:49 +09:00
(cdep)illabout b0f10d2d53
cpufreq: add option for setting the cpu max and min frequencies
This adds a NixOS option for setting the CPU max and min frequencies
with `cpufreq`.  The two options that have been added are:

- `powerManagement.cpufreq.max`
- `powerManagement.cpufreq.min`

It also adds an alias to the `powerManagement.cpuFreqGovernor` option as
`powerManagement.cpufreq.governor`.  This updates the installer to use
the new option name.  It also updates the manual with a note about
the new name.
2019-01-01 19:18:12 +09:00
zimbatm 7b9a553e21
nixos: move system.autoUpgrade
This is not installer-specific
2018-11-17 14:05:30 +01:00
Vladyslav M eb5a932eb7
Merge pull request #49671 from hyperfekt/bcachefs_cryptroot
bcachefs root support
2018-11-10 00:08:55 +02:00
Jörg Thalheim b2099d21cf
Merge pull request #49354 from aanderse/fstab-escaping
filesystems: escape spaces in fstab with \040
2018-11-06 11:09:02 +00:00
hyperfekt 95b2b6f541 nixos/bcachefs: enable encrypted root
Enables automatic decryption for bcachefs-formatted filesystems needed during boot.
2018-11-06 09:26:35 +01:00
hyperfekt 482228919c nixos/bcachefs: remove superfluous fsck from initrd
bcachefs checks the filesystem at mount time, therefore no separate fsck binary is needed in initrd.
2018-11-03 18:07:32 +01:00
Aaron Andersen 36d695f696 filesystems: escape spaces in fstab with \040 2018-10-28 20:49:34 -04:00
Andrew Dunham c3e004799c Hide useless errors when waiting for zpool to be ready 2018-10-16 02:45:25 -07:00
Uli Baum 2742063677 nixos/network-interfaces-scripted: fix container networking bug
When a bridge interface was reconfigured, running containers using
this bridge lost connectivity: restarting network-addresses-brN.service
triggered a restart of network-setup.service via a "partOf" relationship
introduced in 07e0c0e0a2.
This in turn restarted brN-netdev.service.
The bridge was thus destroyed and recreated with the same name but a new
interface id, causing attached veth interfaces to lose their connection.

This change removes the "partOf" relationship between
network-setup.service and network-addresses-brN.service for all bridges.
2018-09-23 23:08:19 +02:00
Erik Arvstedt 7a42623c23 networking.hostId: fix cmd in description
1. Simplify the command by reading directly from /etc/machine-id which
is already a random, lower-case hex string
2. Previously, the command output could be too short because of missing
leading digits. This is now fixed.
2018-09-11 11:29:04 +02:00
Graham Christensen 2d5f599b35
Merge pull request #44347 from zhangyoufu/patch-28620
fix vlan interface bring up on boot
2018-09-01 21:28:31 -04:00
Jörg Thalheim 4360a87c45 linuxPackages.zfsUnstable: 2018-05-22 -> 2018-08-13
spl was merged into zfs master
2018-08-14 14:12:07 +02:00
Franz Pletz 762cea6a5a
fix comment 2018-08-13 20:38:32 +00:00
Jörg Thalheim 43595c7884 zfsLegacyCrypto: remove
This package was only mandatory for migration for people on zfsUnstable
in nixos unstable.
2018-08-13 19:53:50 +02:00
Youfu Zhang ae65ddc8de
add comment for issue #28620 2018-08-10 11:52:16 +08:00
Boris Babic 0ef3119c69 trackpoint: Make the device name configurable 2018-08-06 02:56:32 +02:00
Youfu Zhang 939c6be54e
fix vlan interface bring up on boot
when the parent interface of a vlan interface is not up (yet), ip link cannot bring the vlan interface up
the vlan interface will be automatically brought up when the parent interface is up later
fix NixOS/nixpkgs#28620
2018-08-02 18:10:10 +08:00
volth 2e979e8ceb [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
volth 87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
Graham Christensen 48d292e8a1
networking: Fix timeout when lo has aliased IPs
With a config like

    {
      networking.interfaces."lo".ip4 = [
        { address = "10.8.8.8"; prefixLength = 32; }
      ];
    }

a nixos-rebuild switch would take a long time, and you'd see:

    $ systemctl list-jobs
       JOB UNIT                                TYPE  STATE
    734400 network-interfaces.target           start waiting
    734450 sys-subsystem-net-devices-lo.device start running
    734449 network-link-lo.service             start waiting

and:

    systemd[1]: sys-subsystem-net-devices-lo.device: Job sys-subsystem-net-devices-lo.device/star>
    systemd[1]: sys-subsystem-net-devices-lo.device: Job sys-subsystem-net-devices-lo.device/star>
    systemd[1]: Timed out waiting for device sys-subsystem-net-devices-lo.device.

This removes the device dependency for `lo` and fixes this bug.

Closes #7227
2018-07-06 15:38:52 -04:00
Svein Ove Aas cfd8c4ee88 zfs: Improve import handling 2018-07-02 21:14:45 +01:00
Frank Doepper c5da007af5 nixos/zfs: load encryption keys for all pools (#41846)
fixes #41838

At the moment it works fine for "file://" keys, but does not work for
dataPools with "prompt" keys, because the passphrase cannot be entered
(yet).
2018-06-28 11:04:30 +01:00
Victor Shlein 62d21f2511 nixos/f2fs: fixed autoresize check 2018-06-19 14:31:06 +03:00
Victor Shlein 4fa88fcecb nixos/stage-1, nixos/f2fs: moved f2fs resizing tools include in f2fs module 2018-06-19 14:27:36 +03:00
Frank Doepper 673ecfcbaa nixos/zfs: mount AFTER import 2018-06-15 20:58:43 +02:00
xeji 8e5891b33e
Merge pull request #41853 from volth/patch-153
network-interfaces.nix: remove duplicate code
2018-06-13 23:55:46 +02:00
Frank Doepper bea4323acf nixos/zfs: enable zfs services 2018-06-13 16:31:05 +02:00
volth 4d07170dc0
network-interfaces.nix: remove duplicate code 2018-06-11 16:50:01 +00:00
Svein Ove Aas deb6c6e052 zfs: Fix "zfs-sync" for modern systemd 2018-06-09 01:17:04 +01:00
Nathaniel McCallum 29f75982a6 nixos.modules.tasks.swraid: add raid10 module to initrd 2018-05-28 23:49:35 +03:00
Yegor Timoshenko 332e8b4038
Merge pull request #39982 from tadfisher/scsi-link-policy
nixos/powerManagement: add "med_power_with_dipm" scsiLinkPolicy
2018-05-22 23:53:24 +03:00
Robin Gloster a32b6d5c9a
networking.routes: static routes are proto static 2018-05-22 14:30:53 +02:00
Tad Fisher 19445fa145 nixos/powerManagement: add "med_power_with_dipm" scsiLinkPolicy 2018-05-04 10:33:42 -07:00
Jörg Thalheim 7663de114a lxd: 2.16 -> 3.0.0 2018-04-14 11:02:24 +01:00
volth 49ed1229b6
exfat-utils, fuse_exfat -> exfat
`exfat-utils' and `fuse_exfat' are both aliases of `exfat'
2018-04-12 11:23:52 +00:00
Benjamin Andresen 96f10e7e49 zfs.autoSnapshot: make frequent run every 15 mins
fixes bug that there is 30 minutes between hh:45 and hh:15 every hour.
2018-04-11 16:45:00 +02:00
Matthew Justin Bauer 9c66871784
Merge pull request #38094 from volth/patch-120
nixos/network-scripted: print error details
2018-04-08 21:27:38 -05:00
Franz Pletz 20ad4be383
Merge pull request #38405 from volth/patch-121
network-interfaces-scripted: wlanInterfaces have .device, …
2018-04-05 04:45:50 +00:00
volth b9e01e64b7
network-interfaces.nix: dead code removal
`wlanDeviceUdevScript` is not used below in the text
2018-04-04 13:45:49 +00:00
volth dd9f776509
network-interfaces-scripted: wlanInterfaces have .device, no "${dev}-netdev.service" 2018-04-03 20:00:12 +00:00
volth a6c8e48840
nixos/network-scripted: print error details 2018-03-30 01:18:18 +00:00
Justin Humm d69e0d99e0
nixos/manual: fixed example config for networking.interfaces
The former example gave a "value is a list while a set was expected" error.
2018-03-17 19:53:06 +01:00
Tuomas Tynkkynen 2fec9c6e29 Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/development/tools/build-managers/conan/default.nix
2018-03-13 23:04:18 +02:00
Jan Malakhovski 7079e744d4 Merge branch 'master' into staging
Resolved the following conflicts (by carefully applying patches from the both
branches since the fork point):

   pkgs/development/libraries/epoxy/default.nix
   pkgs/development/libraries/gtk+/3.x.nix
   pkgs/development/python-modules/asgiref/default.nix
   pkgs/development/python-modules/daphne/default.nix
   pkgs/os-specific/linux/systemd/default.nix
2018-03-10 20:38:13 +00:00
Silvan Mosberger 08704aa2f7
nixos/network-interfaces: Fix 2 small typos 2018-03-10 16:16:56 +01:00
Frederik Rietdijk 8bcdb39a27
Merge pull request #27678 from volth/restore-bridge-slaves-dynamically-added-by-libvirt
nixos/networking-scripted: restore bridge slaves dynamically added by…
2018-03-05 17:31:22 +00:00
Shea Levy fec543436d
nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
Shea Levy 8e6520540e
nixos: keymap: Fix cross-compilation. 2018-02-28 15:01:32 -05:00
Franz Pletz 17952ee589
Merge pull request #35141 from abbradar/dhcpcd-order
dhcpcd service: fix service dependencies when default gateways are set
2018-02-20 16:07:49 +00:00
Nikolay Amiantov d77984f571 network-interfaces-scripted service: delay setup if IPv6 is disabled
Even if IPv6 gateway is set, there's no need to set it early if IPv6 is disabled.
2018-02-19 23:33:54 +03:00
rnhmjoj c1bed05e34
nixos/networking-interfaces: rename IP addresses/routes options 2018-02-17 14:01:24 +01:00
rnhmjoj f41111c4da
nixos/tests: add test for static routes 2018-02-17 14:01:23 +01:00
rnhmjoj d00c91c5da
nixos/networking-interfaces: make static routes configurable 2018-02-17 13:57:58 +01:00
Joachim F 7bf049a54c
Merge pull request #34492 from rnhmjoj/privacy
nixos/networking-interfaces: add preferTempAddress option
2018-02-17 08:41:23 +00:00
Jörg Thalheim b6bcba6537 nixos/zfs: fix typo in enableLegacyCrypto description 2018-02-08 10:24:47 +00:00
sjau 0d65e2e0e5 zfs: add migration path for new crypto format
fixes #34559
2018-02-07 20:46:16 +00:00
rnhmjoj 1fec496f38
nixos/networking-interfaces: add preferTempAddress option 2018-02-01 13:14:09 +01:00
rnhmjoj e28ecd5528
fix 2018-02-01 10:51:35 +01:00
rnhmjoj 46c158a32f
nixos/networking-interfaces: set default value for virtualType 2018-01-31 05:51:09 +01:00
Graham Christensen 9f31fe81aa
nixos: zfs: correct the networking.hostId error message
Users were confused that the error message said config.networking.hostId, and indeed that did nothing to fix their problem.

Update the error message to specify the option they should actually set.
2017-12-20 17:56:03 -05:00
Florian Jacob fc21593352 nixos/btrfs: add services.btrfs.autoScrub
for automatic regular scrubbing of mounted btrfs filesystems,
similar to what's already there for zfs.
2017-12-13 11:00:28 +01:00
Florian Jacob fe3751df8a nixos/network-interfaces: Add " around network interface names
in assertion messages to avoid misinterpretations when the interface name contains a dot.
2017-11-09 20:27:33 +01:00
Jörg Thalheim 8d145da64a
Merge pull request #30127 from florianjacob/limit_interface_name_length
nixos/network-interfaces: assertion for too long interface names
2017-11-08 20:35:08 +00:00
Bas van Dijk 07e0c0e0a2 network-interfaces-scripted: fix NixOS/nixops#640
Reverse the PartOf dependency between network-setup and network-addresses-*

This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk
at the NixCon 2017 hackathon.
2017-10-30 20:45:32 +01:00
Franz Pletz 666d9c09c1 Merge pull request #30339 from pvgoran/fileSystems-silentFormatOptions
filesystems: use non-interactive formatOptions by default
2017-10-25 10:46:46 +02:00
edef ea35bc94bf nixos/ecryptfs: init
Currently, ecryptfs support is coupled to `security.pam.enableEcryptfs`, but one
might want to use ecryptfs without enabling the PAM functionality. This commit
splits it out into a `boot.supportedFilesystems` switch.
2017-10-20 17:42:04 +01:00
lassulus 77be4d91f7 encrypted devices: provide working example 2017-10-16 17:46:46 +02:00
lassulus f804a8ff98 encrypted devices: don't override default cryptoModules 2017-10-16 17:46:06 +02:00
Pavel Goran e3f97e514d filesystems: use non-interactive formatOptions by default
When autoFormat is enabled, in order to successfully create a filesystem,
certain filesystems require specific options to be passed to mkfs to prevent
it from asking questions. This commit sets default formatOptions to "-q"
for "jfs" and "reiserfs" filesystems for this purpose.

Resolves #29140.
2017-10-12 09:53:43 +07:00
Jörg Thalheim b256b2778a Merge pull request #30204 from lheckemann/powertop-fix
powertop module: add kmod to path
2017-10-07 22:06:46 +01:00
Linus Heckemann fadb906b2f powertop module: add kmod to path
powertop attempt to load some kernel modules like msr by calling
modprobe. This is the counterpart to
88e43eb39b which has the powertop
executable search PATH for modprobe rather than hardcoding /sbin, and
actually adds the directory containing modprobe to its PATH for the
systemd service.
2017-10-07 21:48:50 +01:00
Tuomas Tynkkynen e86b78363d nixos/filesystems/ext: Don't try to load ext3 module
This module doesn't exist since v4.3, where the ext3 driver was removed
as ext4.ko can mount ext3 filesystems as well.
2017-10-07 11:01:01 +03:00
Florian Jacob 6091e2aa33 nixos/network-interfaces: assertion for too long interface names 2017-10-05 15:49:49 +02:00
Rok Garbas 748ef34f09 assertion should check for encrypted.label of the defined fileSystem 2017-09-29 19:55:28 +02:00
Franz Pletz d0435ba032
network-interfaces: device routes for default gateway
Iff interface is set, it makes sense to add device route by default.
2017-09-28 02:14:07 +02:00
Franz Pletz 0ee866ed72
kbd service: systemd-vconsole-setup is triggered by udev
cc #22470
2017-09-27 23:38:29 +02:00
Alexander Ried 4a2442032e Revert "kbd service: use /dev/tty1 for systemd-vconsole-setup"
This reverts commit 0c81594a29.

It's no longer needed since systemd-vconsole-setup enumerates all ttys
until it finds a suitable one since systemd v234.
2017-09-27 23:37:24 +02:00
Jörg Thalheim 9164517c18 nixos/zfs: import encrypted datasets by default for zfsUnstable 2017-09-26 09:08:53 +01:00
Franz Pletz 263185aa68
nixos/network-interfaces: ensure slave interfaces are up
Fixes #28620.
2017-09-25 14:06:38 +02:00
Franz Pletz 13a110e696
nixos/network-interfaces: cannot delay device units
Systemd is complaining that it can't delay the startup of device units.
We have a before dependency on the respective device unit for every
netdev service, which doesn't make any sense because we create the
actual interface in this service.
2017-09-25 14:06:38 +02:00
Franz Pletz 3a670daa98
nixos/network-interfaces: IPs must always be set
Previously, depending on the environment and the type of interface that
was created, the configured IPs of an interface wouldn't be applied on a
nixos-rebuild switch. It works after a reboot.

This patch ensures that the network-addresses service is started
either via the network-link service or if the networking target is
activated (i.e. on system activation).

Fixes #28474 #16230.
2017-09-25 14:06:38 +02:00
Silvan Mosberger eca23233b2 encrypted devices: add label set assertion (#29651) 2017-09-23 19:02:16 +01:00
Peter Simons 99f759de1c Revert "nixos: add option for bind to not resolve local queries (#29503)"
This reverts commit 670b4e29adc16e0a29aa5b4c126703dcca56aeb6. The change
added in this commit was controversial when it was originally suggested
in https://github.com/NixOS/nixpkgs/pull/29205. Then that PR was closed
and a new one opened, https://github.com/NixOS/nixpkgs/pull/29503,
effectively circumventing the review process. I don't agree with this
modification. Adding an option 'resolveLocalQueries' to tell the locally
running name server that it should resolve local DNS queries feels
outright nuts. I agree that the current state is unsatisfactory and that
it should be improved, but this is not the right way.

(cherry picked from commit 23a021d12e8f939cd0bfddb1c7adeb125028c1e3)
2017-09-23 16:41:34 +02:00
Jörg Thalheim 42be8dbe15 Merge pull request #29344 from Moredread/fix/fileystem-encrypted-keyfile-missing-initrd-support
nixos/fileystems: Fix boot fails with encrypted fs
2017-09-22 12:46:17 +01:00
Jörg Thalheim 743848bb46 Merge pull request #29581 from eqyiel/fix-rpc-gssd
nixos/nfs: allow setting the path to krb5.keytab
2017-09-22 01:41:10 +01:00
Michael Weiss 351f5fc585 fuse3: init at 3.1.1
This includes fuse-common (fusePackages.fuse_3.common) as recommended by
upstream. But while fuse(2) and fuse3 would normally depend on
fuse-common we can't do that in nixpkgs while fuse-common is just
another output from the fuse3 multiple-output derivation (i.e. this
would result in a circular dependency). To avoid building fuse3 twice I
decided it would be best to copy the shared files (i.e. the ones
provided by fuse(2) and fuse3) from fuse-common to fuse (version 2) and
avoid collision warnings by defining priorities. Now it should be
possible to install an arbitrary combination of "fuse", "fuse3", and
"fuse-common" without getting any collision warnings. The end result
should be the same and all changes should be backwards compatible
(assuming that mount.fuse from fuse3 is backwards compatible as stated
by upstream [0] - if not this might break some /etc/fstab definitions
but that should be very unlikely).

My tests with sshfs (version 2 and 3) didn't show any problems.

See #28409 for some additional information.

[0]: https://github.com/libfuse/libfuse/releases/tag/fuse-3.0.0
2017-09-21 23:59:46 +02:00
Ruben Maher 98a2316166 nfs-utils: set /etc/krb5.keytab as default path for rpc-gssd
Currently the `rpc-gssd.service` has a `ConditionPathExists` clause that can
never be met, because it's looking for stateful data inside `/nix/store`.

`auth-rpcgss-module.service` also only starts if this file exists.

Fixes NixOS/nixpkgs#29509.
2017-09-20 15:36:26 +01:00
gwitmond bd52618c9d
nixos: add option for bind to not resolve local queries (#29503)
When the user specifies the networking.nameservers setting in the
configuration file, it must take precedence over automatically
derived settings.

The culprit was services.bind that made the resolver set to
127.0.0.1 and ignore the nameserver setting.

This patch adds a flag to services.bind to override the nameserver
to localhost. It defaults to true. Setting this to false prevents the
service.bind and dnsmasq.resolveLocalQueries settings from
overriding the users' settings.

Also, when the user specifies a domain to search, it must be set in
the resolver configuration, even if the user does not specify any
nameservers.

(cherry picked from commit 670b4e29adc16e0a29aa5b4c126703dcca56aeb6)

This commit was accidentally merged to 17.09 but was intended for
master. This is the cherry-pick to master.
2017-09-18 22:54:29 +02:00
Franz Pletz b179908414
nixos/networking: network is online if default gw set
Previously services depending on network-online.target would wait until
dhcpcd times out if it was enabled and a static network address
configuration was used. Setting the default gateway statically is enough
for the networking to be considered online.

This also adjusts the relevant networking tests to wait for
network-online.target instead of just network.target.
2017-09-18 14:51:38 +02:00
Jörg Thalheim 1ecf3e862f zfsUnstable: init at 2017-09-12 2017-09-15 17:59:37 +02:00
André-Patrick Bubel 2000fba561
nixos/fileystems: Fix boot fails with encrypted fs
Boot fails when a keyfile is configured for all encrypted filesystems
and no other luks devices are configured. This is because luks support is only
enabled in the initrd, when boot.initrd.luks.devices has entries. When a
fileystem has a keyfile configured though, it is setup by a custom
command, not by boot.initrd.luks.

This commit adds an internal config flag to enable luks support in the
initrd file, even if there are no luks devices configured.
2017-09-14 05:27:41 +02:00
davidak 8f389f3316 nixos/bcachefs: init module 2017-08-31 05:39:31 -05:00
Jörg Thalheim 5d4a54ca4d network-interfaces-scripted: don't add 'lo' as device dependency
systemd does not create device units for loopback devices,
since they are not physical.
2017-08-30 13:01:47 +02:00
Richard Yang 64994b3638 tasks/filesystems: Make sure /dev/pts/ptmx is 0666 (#28490)
This is required for running commands likes screen and tmux, especially inside containers.

See also : https://www.kernel.org/doc/Documentation/filesystems/devpts.txt
2017-08-30 01:50:29 +02:00
Volth e123631ed3 add separator in case if a VM connected to more than 1 bridge 2017-08-21 16:52:27 +00:00
Volth d48b12c27c support lxc:/// and ignore weird bridges (like openvswitch) 2017-08-01 10:30:58 +00:00
Robin Gloster 2799a94963
zfs, spl: 0.6.5.11 -> 0.7.0 2017-07-27 19:00:54 +02:00
Volth 10cbb52ae7 nixos/networking-scripted: restore bridge slaves dynamically added by libvirt 2017-07-27 05:58:25 +00:00
Joachim F 0b7c4c1900 Merge pull request #26170 from kirelagin/wlan-fix
wirelessInterfaces: Add a missing parameter
2017-06-17 15:31:22 +01:00
Bjørn Forsman 5b48368386 nixos/bcache: add services.udev.packages = [ bcache-tools ]
Adds /dev/disk/by-{id,label}/* symlinks for bcache device nodes, in the
final rootfs.

Symlinks will only be created for bcache devices that contain
filesystems. So if you have a blank bcache device or run LVM on top of
bcache you will not get this kind of symlink.
2017-06-10 17:10:49 +02:00
Kirill Elagin b1f56b8b0c wirelessInterfaces: Add a missing parameter 2017-05-28 09:34:43 +03:00
Matthew Maurer b0ec4b8cc7 typo: powerManagment -> powerManagement (#25813) 2017-05-16 18:22:44 +02:00
Jörg Thalheim 6b0d8027ef
zfs: zed service is now called zfs-zed
fixes #25566
2017-05-07 10:22:14 +01:00
Ismaïl Senhaji 9497aec292 Add Elantech ETPS/2 Trackpoint (ThinkPad Yoga 260) 2017-04-22 13:42:57 +02:00
Markus Mueller 5042e9d009
network-interfaces-scripted: Add static parameter for default gateway 2017-04-16 22:59:53 +02:00
Jörg Thalheim b9d9083322
powertop: add module 2017-04-15 15:17:02 +02:00
0xABAB 58fbf4a44e nixos/filesystems: skip filesystem check for bindfs (#24671)
Bindfs (FUSE) provides a pseudo-filesystem and as such does not benefit from a file system check.
2017-04-06 12:35:25 +01:00
Eelco Dolstra 01dbf03628
network-link-*.service: Set stopIfChanged = false
This reduces the time window during which IP addresses are gone during
switch-to-configuration. A complication is that with stopIfChanged =
true, preStop would try to delete the *new* IP addresses rather than
the old one (since the preStop script now runs after the switch to the
new configuration). So we now record the actually configured addresses
in /run/nixos/network/addresses/<interface>. This is more robust in
any case.

Issue https://github.com/NixOS/nixops/issues/640.
2017-04-04 15:13:49 +02:00
Arnold Krille 68729958e8
network-interfaces: reload bridges on conf changes
And adopt the tests to add an interface and remove it again.

It should work when deactivating rstp, it will not work when activating
rstp for the first bridge as then the userspace daemon is not yet
available. But once one bridge is active with stp, it should work with
the reload for any further bridge.

Fixes #21745. Also see #22547.
2017-03-26 18:47:43 +02:00
Robin Gloster 6b8ad8b581
networkd: fix setting both defaultGateway{,6} 2017-03-25 14:30:05 +01:00
Franz Pletz fb50cde71e
nixos/treewide: systemd.time is in manvolume 7
cc #23396
2017-03-21 08:28:53 +01:00
Franz Pletz 9536169074
nixos/treewide: remove boolean examples for options
They contain no useful information and increase the length of the
autogenerated options documentation.

See discussion in #18816.
2017-03-17 23:36:19 +01:00
Profpatsch 22c265182f networking/bonds: fix examples
After the change of the bonding options, the examples were not quite correct.
The diff is over-the top because the new `let` needs everything indented.

Also add a small docstring to the `networkd` attr in the networking test.
2017-03-08 04:54:17 +01:00
Graham Christensen 2027f8e74a Merge pull request #23522 from oxij/nixos/mstpd-rstp
nixos: network-interfaces-scripted: don't require mstpd when rstp is off
2017-03-06 20:42:44 -05:00
Jan Malakhovski 55996b8daf nixos: network-interfaces-scripted: don't require mstpd when rstp is off 2017-03-05 14:40:59 +00:00
Franz Pletz 7566b36259
zfs.autoScrub service: init 2017-03-02 17:13:54 +01:00
Ryan Mulligan 41b56b4b8a f2fs module: add crc32 dependency to initrd kernel modules, closes #23093
f2fs.fsck depends on crc32 module being present in the initrd system,
otherwise, if f2fs is used as the root disk, the system is unbootable.
2017-02-24 18:32:50 +01:00
Jörg Thalheim 5b14e91717 Merge pull request #22822 from Mic92/iputils
iputils: 20151218 -> 20161105
2017-02-22 00:37:13 +01:00
Robin Gloster f1e6dc8750
networking.defaultGateway{,6}: fix example 2017-02-21 15:46:00 +01:00
Nikolay Amiantov 2cc4703a2d wrappers service: make /run/wrappers a mountpoint
Also remove some compatibility code because the directory in question would be
shadowed by a mountpoint anyway.
2017-02-21 12:13:35 +03:00
Franz Pletz 313ccd5be3
network-interfaces service: fix typo in bonding options 2017-02-18 15:51:52 +01:00
Franz Pletz c4c23f36ca Merge pull request #22727 from mayflower/fix/netdev-master-bindsto
network-interfaces service: fix bindsTo deps for masters
2017-02-18 13:37:50 +01:00
Franz Pletz 741770c99a
network-interface service: tuntap ifs have netdev services 2017-02-18 13:36:37 +01:00
Jörg Thalheim fd78ff23f7
replace ping6 with ping
reason: after the upgrade of iputils from 20151218 to 20161105
functionality of ping6 and tracepath6 was merged into ping and tracepath.

Ping is now mostly a drop-in replacment for ping6, except that selecting a
specific interface is done by encoding it into the address (ex.: fe80::1%eth0)
rather then specifing it with the `-I` flag.
2017-02-17 16:04:49 +01:00
Profpatsch bb797c1390 networking.networkd: adjust autmatic mapping of bonds
Since the bonds interface changed to a lot more possible values we create a
mapping of kernel bond attribute names and values to networkd attributes.
Those match for the most part, but have to transformed slightly.

There is also an assert that unknown options won’t slip through silently.
2017-02-16 21:24:40 +01:00
Profpatsch 9debdaf512 networking.bonds: add support for arbitrary driverOptions
Until now the four attributes available very selectively provided a small
subset, while copying upstream documentation.

We make driver options an arbitrary key-value set and point to kernel
documentation, which is always up-to-date. This way every option can be set.
The four already existing options are deprecated with a warning.
2017-02-16 21:24:40 +01:00
Nikolay Amiantov 0c81594a29 kbd service: use /dev/tty1 for systemd-vconsole-setup
Fixes #22470
2017-02-16 17:08:14 +03:00
Nikolay Amiantov 109ee2a338 kbd service: use systemd-vconsole-setup even with early setup
This way we have fonts reloaded on switches.
2017-02-16 17:08:13 +03:00
Profpatsch 91d0260feb modules/filesystems: disallow non-empty fstab fields (#22803)
It was possible to pass empty strings / strings with only separator characters;
this lead to broken fstab formatting.
2017-02-15 13:22:48 +01:00
Parnell Springmeyer 9e36a58649
Merging against upstream master 2017-02-13 17:16:28 -06:00
Franz Pletz 76a3c30471
network-interfaces service: fix bindsTo deps for masters
Previously, netdev units for network interfaces defined in the nixos
configurations would bindTo the systemd device unit of the interface if
not in a container.

In situations where you switch to a new nixos configration with changes
to network-setup.service (like nameservers) and have stacked interfaces
like vlans on a bond, it would fail to propagate restarts to the netdevs
correctly resulting with broken networking. The bond would be present
but no vlan interfaces rendering the machine unreachable.

My fear is that the udev events fail to propagate correctly while a systemd
transaction that is also restarting the triggered netdev service is running.
This commit changes this behaviour so netdev services bindTo other netdev
services if present and otherwise fall back to the previous behaviour.

We also noticed that stacked interfaces would sometimes seemingly be stopped
in the wrong order. For instance in the above example, the bond interface
would be deleted before the vlan interfaces resulting in the vlan interfaces
not being present when their service is being stopped. This would cause the
systemd transaction to fail and thus break networking. Their postStop hooks
are now allowed to fail as we have reached the desired state.
2017-02-13 01:57:25 +01:00
Franz Pletz 3fd44e2912
network-interfaces service: add metric option for defaultGateways 2017-02-11 04:53:56 +01:00
Nikolay Amiantov 5ff9a2a2cb kbd service: don't restart systemd-vconsole-setup
Fixes #22470. Also remove non-relevant comment (we don't deviate from upstream
systemd unit anymore).
2017-02-08 21:50:33 +03:00
aszlig 87cc20eddb
nixos/networkd: Fix eval error for defaultGateway
Regression introduced by 0cb487ee04.

This changed the result for defaultGateway to be a submodule instead of
just a plain string, so instead of using just cfg.defaultGateway we need
to pass cfg.defaultGateway.address now.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @abbradar
2017-02-07 07:05:31 +01:00
Nikolay Amiantov 5b043ea361 nfs service: create state directories 2017-02-05 03:17:38 +03:00
Joachim F 17cc22a619 Merge pull request #22225 from bachp/glusterfs-service
glusterfs: add service
2017-02-04 15:15:39 +01:00
Nikolay Amiantov 230c97c944 Merge pull request #22303 from abbradar/nfs4
NFS improvements
2017-02-03 20:04:25 +03:00
Pascal Bach ff3f3399ae filesystems: add support to mount glusterfs 2017-02-02 23:16:52 +01:00
Nikolay Amiantov 0cb487ee04 network-interfaces service: add defaultGateway{,6}.interface 2017-02-02 01:53:00 +03:00
Nikolay Amiantov e0e9fddf56 nfsd service: use upstream systemd units
* Use /etc/nfs.conf as the recommended upstream way to configure services.
* Move server options to nfsd module.
2017-02-01 19:47:33 +03:00
Parnell Springmeyer 3215bcf445
Beebooboop 2017-01-29 05:39:18 -06:00
Parnell Springmeyer a3e9d77640
More derp? It's 5am... 2017-01-29 05:36:47 -06:00