When auto-upgrading based on a flake, it might be desirable to
only upgrade to the newer flake, without updating the nixpkgs
from the flake lock. This option makes that possible.
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
Otherwise, when doing nixos switch to major changes (typically when stdenv changes), udevd service gets loaded after addresses, which causes addresses service to wait indefinitely for the device and fail.
Signed-off-by: Egor Savkin <es@m-labs.hk>
`lib.all (_: false) [ ]` is `true`, which is not the semantics we want
here, and interacts poorly with `boot.zfs.extraPools` where
`getPoolFilesystems` may return `[]`. So explicitly handle this case.
This does mean there isn’t a straightforward way to disable auto-import
with `extraPools` and no associated `fileSystems` while keeping the unit
around, but that’s probably okay for now.
See https://github.com/NixOS/nixpkgs/issues/364995.
Broken in 7f8278a264.
This requires all datasets for the pool specified in `fileSystems` to be
marked noauto.
Note that this implicitly skips some tasks for the pool, such as
`expandOnBoot`, as the pool will not be imported at that time.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
Before this change, when both device and label were set, the label would
be silently ignored. This is especially problematic when the device is
set in another module, and it's not immediately obvious why the label is
not having any effect.
Additionally, some other modules use the device option to get the device
of a filesystem, but this option is not populated when only the label is
set, causing those modules to conclude that the filesystem does not have
a backing device.
With this change, we populate the device option using the label when the
label is set. This means that we get a clear error message when both the
device and label are set, and that the device is properly populated
whenever the label is used to specify the backing device.
This changes the following chain after `nixos-rebuild switch` with modified tunnel interfaces:
stop network-setup -> stop TUN-netdev -> stop network-addresses-TUN -> start network-addresses-TUN (fails since it depends on TUN-netdev which is off).
Chain after this change:
stop TUN-netdev -> stop network-setup -> stop network-addresses-TUN -> start TUN-netdev -> start network-addresses-TUN -> start network-setup
Signed-off-by: Egor Savkin <es@m-labs.hk>
`pkgs.zfs_unstable` is pre-release software and may very well have
critical bugs that make it unsuitable for general use. As such, we
should not recommend it as a general solution to the problem of "my
Kernel is too new for stable ZFS".