Commit Graph

913 Commits

Author SHA1 Message Date
github-actions[bot]
2dc3af6ef9
Merge staging-next into staging 2023-10-04 12:01:34 +00:00
Florian Klink
42f2e2dadd
Merge pull request #257510 from ign0tus/fix/wake-on-lan-policy
Fix: WakeOnLan policy
2023-10-04 11:36:16 +03:00
Daniel Hill
d6bf8b47ec bcachefs: 2023-06-28 -> 2023-09-29
Includes prep work for mainline bcachefs release.
2023-10-03 22:00:26 +01:00
Jade Lovelace
28ab2b278d nixos/networkd: make wait-online not time out
A further bug to our strange multi-user.target depending on
network-online.target issue is that systemd recently changed the
behaviour of systemd-networkd-wait-online to no longer consider the
absence of interfaces with RequiredForOnline to be sufficient to be
online: https://github.com/systemd/systemd/pull/27825

On the advice of the systemd developers
(https://github.com/systemd/systemd/issues/29388), this commit changes
the configuration of systemd-networkd-wait-online to pass --any by
default, and lets the default DHCP interfaces be RequiredForOnline
as they would be by default if the option is omitted.

It is plausible that systemd-networkd-wait-online may still fail if
there are no interfaces at all. However, that probably cannot be
avoided.
2023-10-02 14:47:21 -07:00
Majiir Paktu
0ba49949b0 nixos/network-interfaces-systemd: don't set network-level domains
systemd.network(5) describes Domains= as a "list of domains which should
be resolved using the DNS servers on this link." This setting is read by
systemd-resolved.service, and it's used to configure both search domains
and DNS query routing.

Adding the search domains from `networking.search` is unnecessary
because these are already configured globally in `resolved.conf` through
the default value of `services.resolved.domains`.

Adding the system's `networking.domain` to each network is unexpected
and probably incorrect. A user may not expect that the domain is in
effect automatically added to the search domains even if not specified
in `networking.search`.

Both of these network-level assignments are problematic in cases where
the NixOS networkd module is not managing every interface on the system.
In that scenario, the managed interfaces will have Domains= set while
the others do not. That will cause systemd-resolved to route DNS queries
for the search domains and the system domain to only those managed
interfaces.
2023-10-02 17:36:08 -04:00
ign0tus
27d0a8a0cd network.interfaces: Add option to configure WakeOnLan policy
Adds an option to configure a custom WakeOnLan policy instead of the
hard-coded "magic" policy. To ensure compatibility with current
behavior, "magic" is kept as default.
2023-09-28 20:14:02 +02:00
Nick Cao
37cac5f032
nixos/stage-1-systemd: makeFstabEntries: drop rootPrefix parameter 2023-09-27 18:31:56 -04:00
Nick Cao
0fecd7edc8
nixos/stage-1-systemd: fix initrd-fstab generation for bind mounts, again
See https://github.com/NixOS/nixpkgs/pull/185089
2023-09-27 14:34:17 -04:00
Will Fancher
4bd4976b87
Merge pull request #251290 from Majiir/systemd-initrd-networking-features
nixos/network-interfaces-systemd: support `vlans`, `bridges` in systemd-initrd
2023-09-25 05:07:23 -04:00
Adam Stephens
b4e162a109
nixos/networking: warn when both networkd and dhcpcd can collide 2023-09-21 20:05:25 -04:00
Lin Jian
759ec1113d
nixos/network-interfaces: stop wrapping ping with cap_net_raw
From systemd 243 release note[1]:

This release enables unprivileged programs (i.e. requiring neither
setuid nor file capabilities) to send ICMP Echo (i.e. ping) requests
by turning on the "net.ipv4.ping_group_range" sysctl of the Linux
kernel for the whole UNIX group range, i.e. all processes.

So this wrapper is not needed any more.

See also [2] and [3].

This patch also removes:
- apparmor profiles in NixOS for ping itself and the wrapped one
- other references for the wrapped ping

[1]: 8e2d9d40b3/NEWS (L6457-L6464)
[2]: https://github.com/systemd/systemd/pull/13141
[3]: https://fedoraproject.org/wiki/Changes/EnableSysctlPingGroupRange
2023-09-21 16:52:16 +08:00
Christian Theune
697312fb82
nixos/swraid: only warn if swraid was explicitly enabled (#255426)
The default just recently changed in 23.11. Users that had
swraid enabled implicitly by NixOS in previous releases got surprised
by warnings even though they do not actually use software RAID.

Fixes #254807
2023-09-16 12:19:19 +02:00
Artturin
696353fcf4 nixos/zfs: disable redundant scheduler
I (according to the comment) wrote this somewhere and since then it has
spread to many configs.

https://github.com/search?q=artturin+ENV%7BID_FS_TYPE%7D%3D%3D%22zfs_member%22%2C+ATTR%7B..%2Fqueue%2Fscheduler%7D%3D%22none%22&type=code

https://github.com/NixOS/nixpkgs/issues/169457#issuecomment-1523873402
2023-09-13 21:36:36 +02:00
K900
a604b522be
Merge pull request #254429 from ctheune/fix-swraid-for-old-init
nixos/swraid: fix regression for old initrd and add test coverage
2023-09-11 09:11:10 +03:00
Artturi
4c22001bbf
Merge pull request #253973 from trofi/bcache-make-optional 2023-09-11 08:10:19 +03:00
Christian Theune
0e1a8027d1 nixos/swraid: fix regression for old initrd and add test coverage 2023-09-10 17:16:33 +02:00
Christian Theune
7f341bb450 nixos/swraid: fix monitor service 2023-09-10 15:34:11 +02:00
Sergei Trofimovich
566e32dd42 nixos/bcache: add a boot.bcache.enable kill switch
My system does not use `bcache` and I sould prever my `systemPackages`
not to have bcache tools.

The change does not change the default but proviced usual `enable` knob.
2023-09-10 14:26:53 +01:00
Robert Obryk
44fde723be nixos/security/wrappers: generate a separate and more complete apparmor policy fragment for each wrapper
This change includes some stuff (e.g. reading of the `.real` file,
execution of the wrapper's target) that belongs to the apparmor policy
of the wrapper. This necessitates making them distinct for each wrapper.
The main reason for this change is as a preparation for making each
wrapper be a distinct binary.
2023-08-27 14:10:07 +02:00
Majiir Paktu
1f34babe84 nixos/network-interfaces-systemd: add bridge interfaces in systemd-initrd 2023-08-25 13:11:40 -04:00
Majiir Paktu
2cb4671ebc nixos/network-interfaces-systemd: add VLAN interfaces in systemd-initrd 2023-08-25 10:44:43 -04:00
Daniel Carosone
4ffc1c82c6 zfs: 'want', don't 'require', systemd-udev-settle
This completes changes in #227208
Fixes: #244737, #245089.
2023-07-28 16:57:12 +10:00
Will Fancher
0ddc9d0250 zfs: Relate import services to zfs-import.target instead of local-fs
Being wanted by and ordered before local-fs.target isn't strictly
correct. And in systemd initrd, it's very incorrect because
local-fs.target is for the initrd file system, not the real root file
system.
2023-07-23 14:12:53 -04:00
Matti
162039a233 nixos/swraid: Add missing mkRenamedOption 2023-07-15 03:56:54 +02:00
Will Fancher
11fec97761
Merge pull request #183314 from DeterminateSystems/optional-swraid
Make swraid optional
2023-07-13 16:24:34 -04:00
nikstur
3b6bc9b536 nixos/filesystems: init squashfs 2023-07-10 22:02:36 +02:00
Linus Heckemann
7d2124f9e3 stage-1: Only copy mdadm and mdmon into initramfs if enabled 2023-07-10 20:31:13 +02:00
Linus Heckemann
c0f963a338 boot.initrd.services.swraid -> boot.swraid
Since the option affects both stage-1 and stage-2, it does not make
sense to keep it within the boot.initrd namespace.
2023-07-10 20:20:08 +02:00
Linus Heckemann
0b277bcc2b nixos/swraid: make entire module optional
swraid support will now only be enabled by default if stateVersion is
older than 23.11. nixos-generate-config will now generate explicit
config for enabling support if needed.
2023-07-10 16:39:35 +02:00
Ryan Lahfa
ed2f009130
Merge pull request #237873 from Mic92/fix-aarch64-zfs 2023-07-08 14:41:00 +02:00
Michele Guerini Rocco
d0b4889418
Merge pull request #240295 from sysvinit/sysvinit/udev-privacy-address-scope
network-interfaces: restrict ipv6 udev rules
2023-07-06 18:03:36 +02:00
Will Fancher
e520c2e278
Merge pull request #240600 from lilyinstarlight/fix/luksroot-lvm-default-off
nixos/lvm: toggle initrd enable option independently of main options
2023-07-05 12:42:45 -04:00
Lily Foster
7b514d2175
nixos/lvm: toggle initrd enable option independently of main options 2023-07-05 04:59:04 -04:00
Will Fancher
73a8ca1674
Merge pull request #240601 from lilyinstarlight/fix/lvm-root-sd-stage-1-unhide
nixos/*: unhide remaining systemd stage-1 options
2023-07-03 13:38:12 -04:00
Lily Foster
e9207b0501
nixos/*: unhide remaining systemd stage-1 options
These options were missed in NixOS/nixpkgs#226237, but they all were
specifically added for systemd stage-1.
2023-07-03 08:41:38 -04:00
Jörg Thalheim
4d719f101c nixos/bcachefs: add new mount.bcachefs util 2023-07-01 17:10:10 +02:00
Molly Miller
3e96fd980d nixos/network-interfaces: restrict IPv6 privacy address overrides to interface
Only trigger the privacy address override for a given interface when
that interface is added. Without restricting the rule to the
interface, this command would be run when any interface is added.
2023-06-27 16:15:02 +02:00
Raito Bezarius
d4cab20b3a zfs: add option to restore kernel_neon for linux 6.2 support on aarch64
Introduced in aaeca98456
with the usual disdain for ZFS.

We have been there in the past with
<https://www.phoronix.com/news/NixOS-Linux-5.0-ZFS-FPU-Drop> /
https://github.com/NixOS/nixpkgs/pull/61076.

This fixes ZFS on aarch64 until the next breakage.

See https://github.com/openzfs/zfs/issues/14555 for original upstream
issue.
2023-06-16 11:07:33 +02:00
Daniel Carosone
86ecee627a typo 2023-06-16 12:25:34 +10:00
Daniel Carosone
2dcb1b3ed7 nixos/zfs: assert that pool names are not empty
a zfs fileSystems entry with an absolute (e.g. device) path rather than
a zfs dataser is parsed as an empty pool name, causing a doomed-to-fail
import job to be created as a boot dependency. Catch this as an assertion
2023-06-16 10:40:09 +10:00
Will Fancher
b497502357 nixos: Use systemd-growfs for autoResize 2023-06-04 22:57:22 -04:00
Will Fancher
5176a4f113 nixos: Use systemd-makefs for autoFormat 2023-06-04 22:57:20 -04:00
rnhmjoj
6732106210
network-interfaces-scripted: fix interface cleanup
There is apparently a bug in the parser of iproute2 where the command
`ip link show <devname>` will not show the device but list all
interfaces (equivalent to `ip link show`) if devname is equal to one of
the flags of `ip-address(8)`. For example, `home`, or `optimistic`.

This bug causes a false positive in the clean up command of the
<devname>-netdev.service, the service fails and the interface is never
configured.

To avoid the bug we can simply use `ip link show dev <devname>`.
2023-05-27 15:09:22 +02:00
Will Fancher
fe43923a70
Merge pull request #229767 from mberndt123/mberndt123/stratis-rootfs
nixos/stratis: initrd support for stratis root volumes
2023-05-25 14:06:31 -04:00
figsoda
701bcdbead nixos: fix typos 2023-05-19 22:31:04 -04:00
Will Fancher
edcd3d3056
Merge pull request #229318 from ReneHollander/fix/nixos-zfs-systemd-unlock-times-out
nixos/zfs: disable unlock timeout with systemd
2023-05-18 12:42:21 -04:00
Matthias Berndt
cb410a8c59 Merge remote-tracking branch 'upstream/master' into mberndt123/stratis-rootfs 2023-05-17 21:47:19 -04:00
Matthias Berndt
92814241a8 improve stratis initrd support
it is now possible to supply a stratis pool uuid
for every filesystem, and if that filesystem
is required for boot, the relevant pool will be
started in the initramfs.
2023-05-16 22:48:36 -04:00
Rene Hollander
dbb940f433
nixos/zfs: disable unlock timeout with systemd
Currently systemd-ask-passwd times out after 1m30s. After 3 tries this
causees systemd to enter the emergency shell and basically lead to an
unbootable system requiring a reboot to be able to try to unlock again.

Also if a pool is imported but not unlocked, the unlock step will no
longer be skipped.
2023-05-13 13:53:22 +02:00
nikstur
fa09e0a3c7 nixos/filesystems: init erofs
Enable using an erofs filesystem as one of the filesystems needed to
boot the system. This is useful for example in image based deployments
where the Nix store is mounted read only.
[erofs](https://docs.kernel.org/filesystems/erofs.html) offers multiple
benefits over older filesystems like squashfs. Skip fsck.erofs because
it is still experimental.
2023-05-12 19:55:32 +02:00
Jörg Thalheim
3288479636 nixos/envfs: make mounts non-critical
We usually don't want to bring the whole machine into emergency mode
just because we couldn't mount envfs. It's usually not on the critical
path.
2023-05-08 11:24:18 +02:00
Florian Klink
6b27ed3229
Merge pull request #169116 from ElvishJerricco/systemd-stage-1-networkd
Systemd stage 1 networkd
2023-04-21 18:40:59 +02:00
Will Fancher
748f1329fc systemd-initrd: Automatically configure networking.interfaces 2023-04-17 16:41:35 -04:00
Felix Buehler
327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
Martin Weinelt
9e4d592114
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/eve/default.nix
2023-03-14 16:49:37 +01:00
Izorkin
3e3367aa6a
nixos/profiles/base: remove duplicate and optimize fsPackages 2023-03-03 23:32:48 +03:00
Florian Klink
ab566b8656
Merge pull request #208269 from ElvishJerricco/systemd-stage-1-fsck
Systemd stage 1 fsck
2023-02-17 10:06:39 +02:00
Sandro Jäckel
1c664befd4
nixos/envfs: add extraFallbackPathCommands options
this is mainly useful for restricted platforms like wsl which require
some extra entries in /bin/
2023-02-08 15:52:38 +01:00
Will Fancher
14b77582da systemd-stage-1: fsck 2023-02-08 00:43:10 -05:00
Will Fancher
1b39491326 systemd-stage-1: Use x-initrd.mount for better unit dependencies 2023-02-07 22:22:39 -05:00
Sandro Jäckel
d9f07dcee5
nixos/envfs: use configured environment.usrbinenv and environment.binsh
Taken from upstream
d91aeefccb
2023-01-30 16:52:43 +01:00
pennae
cf792cfde3 nixos/envfs: fix envfs package option default
mdDoc is not valid here, but isn't currently rejected for xslt reasons.
2023-01-22 17:50:09 +01:00
Victor Fuentes
d3528cdc3d
nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId 2023-01-14 16:19:06 -05:00
Jörg Thalheim
655e072533 nixos/bcachefs: fix boot with systemd enabled initrd 2023-01-01 19:58:16 +01:00
Will Fancher
3d7270abd5
Merge pull request #203171 from ElvishJerricco/zfs-fix-requested-credentials
nixos/zfs: Ensure pool has datasets to decrypt
2022-12-29 00:00:29 -05:00
Jörg Thalheim
741a0f5a7f envfs: init at 1.0.0 2022-12-28 16:03:49 +01:00
Lily Foster
8b4fd74782 nixos/filesystems: require fstab options list be non-empty
When the option list is empty, the fstab generator does not
automatically add "defaults" and generates a non-working fstab (since it
just emits two spaces around where the options would have been which is
only technically one fstab separator).
2022-12-26 17:11:05 +01:00
Will Fancher
a45968c1e4 nixos/zfs: Ensure pool has datasets to decrypt 2022-12-24 17:13:32 -05:00
Jakub Sokołowski
c70f047315
nixos/zfs: assert no force import with hibernation
According to a ZFS issue about hibernation causing data corruption:
https://github.com/openzfs/zfs/issues/12842

The way this happens is if the system force imports a pool that was
suspended during hibernation. I've had this happen twice on NixOS and
I'd like to avoid having this happen again, to me or others.

To do this I've added an assertion that makes sure you can't have
`forceImportRoot` or `forceImportAll` enabled with `allowHibernation`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-12-17 13:11:23 +01:00
Artturin
05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
Ryan Lahfa
bc7c15825b
Merge pull request #117371 from grahamc/sysctl-hostname
network-interfaces: set hostname from sysctl if defined
2022-12-01 16:03:04 +01:00
Vladimír Čunát
cdad0ce127
nixos/filesystems: fix a typo in docs 2022-11-27 21:57:35 +01:00
Sandro
f92201f461
Merge pull request #197925 from SuperSandro2000/lvm2 2022-11-24 13:58:29 +01:00
Will Fancher
71c74bf173 nixos: Add ext to fsPackages in stage 2 with systemd-initrd enabled 2022-11-20 22:30:01 -05:00
Martin Weinelt
c021df5792
Merge pull request #197254 from Atemu/fstab-escape-options 2022-11-19 18:08:40 +01:00
Will Fancher
acecd1ec7b Revert "nixos: Fix fsck with systemd 251.6 and later"
This reverts commit d9b1bde390.
2022-11-15 17:45:38 -05:00
aszlig
d9b1bde390
nixos: Fix fsck with systemd 251.6 and later
Version 251.6 of systemd introduced a small change[1] that now checks
whether the fsck command is available in *addition* to the filesystem
specific fsck.$fsname executable.

When bumping systemd to version 251.7 on our side[2], we introduced that
change. This subsequently caused our "fsck" test to fail and it looks
like this was an oversight during the pull request[3] introducing the
bump.

Since the fsck wrapper binary is in util-linux, I decided to address
this by adding util-linux to fsPackages because util-linux is already
part of the closure of any NixOS system so the impact should be pretty
low.

[1]: 73db7d9932
[2]: 844a08cc06
[3]: https://github.com/NixOS/nixpkgs/pull/199618

Signed-off-by: aszlig <aszlig@nix.build>
2022-11-15 02:15:54 +01:00
Sandro Jäckel
5452a26077
nixos/lvm: replace boot.isContainer with services.lvm.enable 2022-11-09 23:47:37 +01:00
Robert Hensing
93a905ec4f
Merge pull request #194759 from hercules-ci/fqdn-or-hostname
nixos: Add `networking.fqdnOrHostName`
2022-11-09 13:53:57 +01:00
Naïm Favier
8f571534c9
Merge pull request #194766 from ncfavier/proxy-arp 2022-10-31 09:59:56 +01:00
Thiago Kenji Okada
f83198ab9c
Merge pull request #171680 from bryanasdev000/zfshibernation
nixos/zfs: introduce option to control hibernation
2022-10-29 10:37:52 +01:00
Bryan A. S
a53858010b nixos/zfs: introduce option to control hibernation 2022-10-29 04:46:27 -03:00
Bjørn Forsman
3ec90ef87f nixos/filesystems: add nfs4 to fsToSkipCheck
This change fixes this system journal warning for
`fileSystems.<name>.fsType = "nfs4"` configurations:

  systemd-fstab-generator[714]: Checking was requested for "192.168.0.6:/data", but it is not a device.
2022-10-23 20:08:08 +02:00
Atemu
7e2aec079c nixos/filesystems: escape mount options in fstab
Some mount options might include path names and those often contain spaces and
therefore must be escaped. An example which prompted me to make this change is
the path of a btrfs subvolume.
2022-10-22 20:00:56 +02:00
Robert Hensing
18e3f431e1 networking.fqdnOrHostName: Elaborate and format the descriptions 2022-10-15 11:57:58 +02:00
Edward Tjörnhammar
a72e138b78 nixos/jfs: correct broken toplevel reference 2022-10-06 19:26:13 +00:00
Naïm Favier
52c58c8bbe
nixos/network-interfaces: reflect negative settings of proxyARP
Currently, setting `proxyARP` to true enables `proxy_arp`, but setting
it to false doesn't disable it. This is surprising and stateful.
2022-10-06 16:46:17 +02:00
Robert Hensing
f43716f28e nixos: Add networking.fqdnOrHostName option, readOnly 2022-10-06 16:21:09 +02:00
Christian Kögler
d3fc91e579
Merge pull request #191352 from maifel-maifel/mr-networking-deprecation-note
nixos/networking: add a suggestion to use networkd options
2022-10-01 09:10:30 +02:00
digital
12d64e041b nixos/networking: add a suggestion to use networkd options 2022-09-15 18:07:24 +02:00
Nick Cao
ca03f2dc0f
nixos/stratis: init 2022-09-12 15:19:36 +08:00
pennae
bd56368848 nixos/*: md-convert hidden plaintext options
most of these are hidden because they're either part of a submodule that
doesn't have its type rendered (eg because the submodule type is used in
an either type) or because they are explicitly hidden. some of them are
merely hidden from nix-doc-munge by how their option is put together.
2022-08-31 16:32:54 +02:00
pennae
9547123258 nixos/*: convert internal option descriptions to MD
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
pennae
ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
pennae
9217509ece nixos/network-interfaces: convert option descriptions to MD 2022-08-27 19:18:29 +02:00
pennae
51a11254a7 nixos/*: literalDocBook -> literalMD
no change to rendered output
2022-08-27 19:18:29 +02:00
Will Fancher
2239c5d55f
Merge pull request #186163 from lilyinstarlight/feature/systemd-stage-1-fs-label
nixos/systemd-stage-1: unify initrd fstab generation logic with system fstab
2022-08-20 18:29:07 -04:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae
7e7d68a250 nixos/*: mark pre-existing markdown descriptions as mdDoc 2022-08-19 22:40:58 +02:00
pennae
e4ed177f82 nixos/* eliminate inner whitespace in tags that was missed earlier
nix-doc-munge won't match tags that contain newlines anywhere. most of
these have already been removed, but a few obviously made it through.
2022-08-19 22:40:58 +02:00
Pierre Bourdon
4ae5da5394
nixos/network-interfaces-systemd: do not ignore /0 gateway routes
While it might seem odd, 0.0.0.0/0 or ::/0 gateways are valid and
commonly used on point-to-point links (e.g. a wireguard tunnel) to
indicate that all traffic needs to be sent to a given interface.

systemd-networkd actually documents this as a valid configuration in its
man pages [1].

Tested to do the right thing in one of my NixOS containers using
a Wireguard tunnel as its default route.

[1] https://www.freedesktop.org/software/systemd/man/systemd.network.html#DefaultRouteOnDevice=
2022-08-19 02:25:41 +02:00
Lily Foster
69d7943101 nixos/systemd-stage-1: unify initrd fstab generation logic with system fstab 2022-08-18 13:33:43 -04:00
ajs124
9fd1ae2f4e
Merge pull request #185413 from Luflosi/skip-fsck-for-more-filesystems 2022-08-15 20:09:59 +02:00
pennae
50f9b3107a
Merge pull request #185474 from pennae/option-docs-md
nixos/*: more options md conversion
2022-08-12 23:23:26 +02:00
Franz Pletz
a7f89ddd63
Merge pull request #185763 from srhb/zfs-scrub-synchronously
nixos/zfs: scrub synchronously
2022-08-10 15:20:52 +02:00
Sarah Brofeldt
ab2e77ea82 nixos/zfs: scrub synchronously
This prevents spurious systemd failures if the timer unit starts a new
scrub before a long-running one has finished.
2022-08-09 07:06:09 +02:00
Paul Haerle
944a466373
fix whitespace 2022-08-06 21:57:14 +02:00
Paul Haerle
cc477fb34d
zfs: Make zpool available for zpool-expand-pools
...if cfgExpandOnBoot == "all", otherwise it fails during runtime:
```
Aug 06 19:38:05 nixos zpool-expand-pools-start[981]: /nix/store/ka3vivdray82mi9dql12yf258gkw643l-unit-script-zpool-expand-pools-start/bin/zpool-expand-pools-start: line 3: zpool: command not found
```
2022-08-06 21:51:31 +02:00
pennae
087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
Luflosi
dd80fa1e9b
nixos/filesystems: skip fsck for more filesystems
This commit prevents warning messages like
```
systemd-fstab-generator: Checking was requested for "/path/to/device", but it is not a device.
```
in `dmesg` when one of the filesystems 9p, cifs, prl_fs or vmhgfs is added to the list of `fileSystems`.
This happens because the generated /etc/fstab entry contains a non-zero fsck pass number, which doesn't make sense for these filesystems.
2022-08-06 15:21:57 +02:00
pennae
423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +02:00
pennae
61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae
3aebb4a2be nixos/*: normalize link format
make (almost) all links appear on only a single line, with no
unnecessary whitespace, using double quotes for attributes. this lets us
automatically convert them to markdown easily.

the few remaining links are extremely long link in a gnome module, we'll
come back to those at a later date.
2022-08-03 21:57:46 +02:00
pennae
694d5b19d3 nixos/*: replace </para><para> with double linebreaks
our xslt already replaces double line breaks with a paragraph close and
reopen. not using explicit para tags lets nix-doc-munge convert more
descriptions losslessly.

only whitespace changes to generated documents, except for two
strongswan options gaining paragraph two breaks they arguably should've
had anyway.
2022-08-03 20:39:21 +02:00
pennae
6b13dd0e9e
Merge pull request #183491 from pennae/automatic-md-conversions
treewide: automatically md-convert option descriptions
2022-08-02 02:15:30 +02:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Alexandre Badez
8457d9277a system.autoUpgrade: add boot option. 2022-07-29 08:21:07 +02:00
pennae
a16b25432e
Merge pull request #182685 from pennae/invariant-option-conversions
treewide: invariant option conversions to MD
2022-07-27 15:39:47 +02:00
ajs124
66e9ea4827
Merge pull request #180008 from Luflosi/skip-fsck-for-bind-mount 2022-07-25 23:56:12 +02:00
pennae
b115622f4b nixos/tasks: invariant option docs MD conversions 2022-07-24 13:01:47 +02:00
ajs124
c386f8658b (k)vdo: 8.1.1.360 -> 8.2.0.2 2022-07-20 15:00:53 +02:00
Artturi
6dc4ee65f7
Merge pull request #179163 from cmm/network-setup-bindTo
nixos/network-interfaces-scripted: don't bindTo absent network-setup.service
2022-07-19 01:33:14 +03:00
Luflosi
db4fdd6247
nixos/filesystems: skip fsck for bind mounts
Without this change, configurations like
```nix
fileSystems."/path/to/bindMountedDirectory" = {
  device = "/path/to/originalDirectory";
  options = [ "bind" ];
};
```
will lead to a warning message in `dmesg`:
```
systemd-fstab-generator: Checking was requested for "/path/to/originalDirectory", but it is not a device.
```
This happens because the generated /etc/fstab entry contains a non-zero fsck pass number, which doesn't make sense for a bind mount.
2022-07-12 16:51:25 +02:00
Lassulus
92c4b16caf
Merge pull request #171401 from klemensn/filesystems-zfs
Small ZFS handling improvements
2022-07-03 18:07:53 +02:00
Michael Livshin
cd13a2074b nixos/network-interfaces-scripted: don't bindTo absent network-setup.service 2022-06-26 11:03:57 +03:00
Naïm Favier
e1c1fdd8c2
nixos/networkd: add IPv6PrivacyExtensions=kernel for default networks
Maybe this could go in `genericNetwork`, but I don't know if it makes
sense for bridges, bonds etc. and I don't want to break anything.
2022-06-21 17:12:01 +02:00
Naïm Favier
f8a83b4260
nixos/networkd: make default networks RequiredForOnline when possible
When `systemd.network.wait-online.anyInterface` is enabled,
`RequiredForOnline` really means "sufficient for online", so enable it.
2022-06-21 17:12:01 +02:00
pennae
9e109ffdb5
Merge pull request #178110 from pennae/fix-networkd-gateways
nixos/networking: fix v4+v6 default gateways with networkd
2022-06-20 14:17:41 +00:00
pennae
da28b26d64 nixos/networking: fix v4+v6 default gateways with networkd
fixes #178078
2022-06-18 09:33:35 +02:00
Sandro
8effa309cc
Merge pull request #176379 from SuperSandro2000/network-setup
nixos/network-interfaces-scripted: remove network-setup unit if unused
2022-06-17 22:36:45 +02:00
Sandro Jäckel
ec00b4bb11
nixos/network-interfaces-scripted: remove network-setup unit if unused 2022-06-05 13:35:55 +02:00
Alexandru Scvortov
3a09010b9d nixos/network-interfaces: add networking.interfaces.<name>.ipv[46].routes.type 2022-06-02 19:16:25 +01:00
Janne Heß
e6fb1e63d1
Merge pull request #171650 from helsinki-systems/feat/config-systemd-package
treewide: pkgs.systemd -> config.systemd.package
2022-05-09 10:23:04 +02:00
Maximilian Bosch
f0bb39d4b7
Merge pull request #167327 from lheckemann/networkd-usedhcp
nixos/networkd: reimplement useDHCP in a sensible way
2022-05-07 00:05:44 +02:00
Janne Heß
57cd07f3a9
treewide: pkgs.systemd -> config.systemd.package
This ensures there is only one systemd package when e.g. testing the
next systemd version.
2022-05-05 20:00:31 +02:00
Will Fancher
f989e13983 zfs: Support zfs_force=y on the command line as well. 2022-05-04 18:32:27 -04:00
Will Fancher
e0b5ba5479 nixos: Don't use grep to request ZFS credentials, and consider keystatus 2022-05-03 14:56:50 -04:00
Will Fancher
0a16158078 zfs: Update comment for https://github.com/zfsonlinux/zfs/pull/4943 2022-05-03 12:55:01 -04:00
Will Fancher
8555a7fdbf zfs: Allow three tries to decrypt datasets 2022-05-03 12:55:01 -04:00
Will Fancher
44a6882f55 nixos/stage-1-systemd: ZFS support 2022-05-03 12:55:00 -04:00
Klemens Nanni
d1754b1ab0 nixos/filesystems/zfs: Use proper script mode
Tell zpool-list(8) to format output rather than modifying it afterwards.

Furthermore, pool names may contain spaces and would thus break due to
awk(1)'s word splitting.
2022-05-03 16:28:39 +02:00
Klemens Nanni
2a341bd2f4 nixos/filesystems/zfs: Escape dataset names
Although unlikely, ZFS happily accepts names like 'zroot/foo -r'.

Escape names and separate command line options from arguments to avoid
any kind of misinterpretation.
2022-05-03 15:56:54 +02:00
Maximilian Bosch
196c877c85
nixos/network-interfaces: remove outdated deprecation information 2022-04-30 12:40:10 +02:00
Maximilian Bosch
aa849e1478
nixos/network-interfaces-systemd: actually set catchall-iface if useDHCP = true;
Previously this wasn't done in the `forEach`-expression for
`cfg.interfaces` and thus `networking.useDHCP` didn't have any effect if
no further interface was statically configured.
2022-04-30 00:30:03 +02:00
Linus Heckemann
d30dbf38b9
nixos/networkd: reimplement useDHCP in a sensible way 2022-04-30 00:30:01 +02:00
Will Fancher
2e96b64e02
Merge pull request #170123 from ElvishJerricco/systemd-shutdown-ramfs-fixup
Systemd shutdown ramfs fixup
2022-04-28 20:17:23 -04:00
Will Fancher
50925651bb zfs: Sync pools on shutdown. 2022-04-28 14:12:16 -04:00
Janne Heß
69d1acda00
nixos/xfs: Fix evaluation (#170471) 2022-04-26 21:43:01 +02:00
Janne Heß
acca69992c
nixos/btrfs: Add systemd stage 1 support 2022-04-24 16:32:54 +02:00
Janne Heß
160fb93fdc
nixos/filesystems: Make most simple filesystems compatible with systemd
This includes disabling some features in the initrd by default, this is
only done when the new initrd is used. Namely, ext and bcache are
disabled by default. bcache gets an own enable option while ext is
detected like any other filesystem.
2022-04-24 16:32:34 +02:00