Commit graph

751 commits

Author SHA1 Message Date
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