Commit graph

1027 commits

Author SHA1 Message Date
Masum Reza 4af8011e2c
[Backport release-25.05] bcachefs-tools: 1.31.0 -> 1.31.6; Bcachefs out of tree module, Bcachefs package and scrub nixos option (#448195) 2025-10-09 13:48:56 +00:00
Wolfgang Walther 5cbdb94f3a
treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.

(cherry picked from commit 91a8fee3aa)
2025-10-05 12:59:25 +02:00
Will Fancher 7a1e72cf76
nixos/bcachefs: fix warning
(cherry picked from commit 62a07189b4)
2025-10-03 15:48:49 +05:30
Will Fancher 388a490cf9
bcachefs-kernel-module: Nest within bcachefs-tools
When you set the bcachefs userspace tools with:

```nix
boot.bcachefs.package = /* custom pacakge */;
```

This now also changes the kernel package. The NixOS module now calls
on the nested `cfg.package.kernelModule` expression with
`kernelPackages.callPackage`. This will enable overriding both
userspace and kernel space from e.g. upstream git.

(cherry picked from commit 6e331d90bd)
2025-10-03 15:48:48 +05:30
Will Fancher 41921adbc6
nixos/bcachefs: Use out-of-tree module when possible.
(partially cherry picked from commit 89e7815828)
2025-10-03 15:47:34 +05:30
Will Fancher 079c62d428
nixos/bcachefs: Don't duplicate assertions.
The first instance is unconditional. No need to have it twice.

(cherry picked from commit 25d56c5a34)
2025-10-03 15:46:41 +05:30
John Titor 24c828789b
Partially revert "nixos/bcachefs: remove linuxPackages_latest requirement"
This reverts commit afbaa572ed.

Bcachefs upstream recommends using the latest kernel for best compatibility.

(cherry picked from commit f93738d6a2)
2025-10-03 15:46:38 +05:30
John Titor c98a141da9
nixos/bcachefs: add boot.bcachefs.package
This allows configuring the userspace bcachefs package to use.
Similar to boot.zfs.package

(cherry picked from commit d6ed16a832)
2025-10-03 15:38:52 +05:30
John Titor 9694599fc9
nixos/bcachefs: remove linuxPackages_latest requirement
Nixpkgs has been on 6.12 for a while

(cherry picked from commit afbaa572ed)
2025-10-02 19:40:46 +05:30
John Titor b3fa982692
nixos/bcachefs: handle / (root filesystem) in autoScrub service
Without this, the service and timer name become like this:

❯  systemctl status bcachefs-scrub--.service
○ bcachefs-scrub--.service - bcachefs scrub on /
     Loaded: loaded (/etc/systemd/system/bcachefs-scrub--.service; linked; preset: ignored)
     Active: inactive (dead)
TriggeredBy: ● bcachefs-scrub--.timer

(cherry picked from commit 74d1da02aa)
2025-10-02 19:31:41 +05:30
Will Fancher 164972a398
nixos/unlock-bcachefs: Support x-systemd.requires/wants-mounts-for=
(cherry picked from commit 45bb7f83f4)
2025-10-02 19:30:53 +05:30
Will Fancher 8de4c8ee8a
nixos/unlock-bcachefs: Fix x-systemd.requires/wants= matching.
It would match options with those keys as a prefix,
e.g. x-systemd.requires-mounts-for=, and fail to extract a sensible
value.

(cherry picked from commit 9d769b6b9d)
2025-10-02 19:30:53 +05:30
Will Fancher 064304445c
nixos/bcachefs: Parse tags
Fixes #317901

(cherry picked from commit c90c29bacc)
2025-10-02 19:30:52 +05:30
Charlotte 0a1a2d3245
bcachefs-unlock: Also handle mount paths
Co-authored-by: Will Fancher <elvishjerricco@gmail.com>
(cherry picked from commit 814bbef95e)
2025-10-02 19:30:52 +05:30
Charlotte 🦝 Deleńkec 563e43e8ce
bcachefs-unlock: respect x-systemd mount options
This will allow unlocking to take place *after* all of the devices have
been probed, as indicated by the x-systemd.wants and x-systemd.requires
options. This allows for multi-device bcachefs volumes to be reliably
unlocked.

(cherry picked from commit ca0c35d813)
2025-10-02 19:30:50 +05:30
John Titor 36a9b7ac79
nixos/bcachefs: init module for autoScrub
Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
(cherry picked from commit 774eadda46)
2025-10-02 19:27:16 +05:30
Guanran Wang fb642259a3 nixos/btrfs: use sha256 instead of sha256_generic
Upstream dropped `sha256_generic` in e96cb9507f

Quoting from upstream:

> sha256_blocks_generic() is moved from lib/crypto/sha256-generic.c into
  lib/crypto/sha256.c.  It's now a static function marked with
  __maybe_unused, so the compiler automatically eliminates it in any
  cases where it's not used.

Co-authored-by: dramforever <dramforever@live.com>
(cherry picked from commit 7faeef0e92)
2025-09-24 10:21:59 +05:30
John Titor 86f63746e4 nixos/bcachefs, bcachefs: add johnrtitor as maintainer
Let's give it a try once again, now that I am back on Bcachefs

Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
(cherry picked from commit 4cd9dd4a87)
2025-09-15 12:46:20 +05:30
Wolfgang Walther aefcb0d50d
treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
qubitnano 3a69ec5f15 nixos/bcachefs: include poly1305 and chacha20 kernel modules for kernel < 6.15
Kernel 6.16-rc1 removed the poly1305 algorithm in
ceef731b0e22df80a13d67773ae9afd55a971f9e

bcachefs switched to the kernel libraries for poly1305 and chacha20 in
6.15 in 4bf4b5046de0ef7f9dc50f3a9ef8a6dcda178a6d

(cherry picked from commit f9bd91aa07)
2025-06-27 03:16:55 +05:30
Michael Hoang 6c701a9573 nixos/networking: fix fqdnOrHostName when FQDN explictly set 2025-04-23 00:45:17 +10:00
Michael Hoang 4d537721f7 nixos/networking: allow users to override FQDN
This may be useful for users where `${cfg.hostname}.${cfg.domain}` isn't
actually the fully quantified domain name of the server.
2025-04-15 18:28:40 +02:00
Shawn8901 9a1d8f09cf zfs: add option to use kernel keyring for encryption credentials 2025-04-03 22:57:06 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
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.
2025-04-01 20:10:43 +02:00
Arne Keller fd9f17ef49
nixos/filesystems: init bindfs (#337697) 2025-03-30 22:10:57 +02:00
h7x4 ab0564bd10
treewide: add documentation for nixos systemd units 2025-03-12 18:00:38 +01:00
Michele Guerini Rocco 64ddb39f99
network: make network setup service do not depend on udev, and fix typo with greTunnels (#373931) 2025-02-25 08:06:51 +01:00
Shawn8901 faadb5162c nixos/fileSystems: omit swap comment if there are no swapDevices 2025-02-23 23:23:32 +01:00
Sandro Jäckel 4a1cad4c46
nixos/filesystems: remove unused variable 2025-02-23 22:01:44 +01:00
Stefan Frijters 45dad721eb
nixos/zfs: make it easier to override Persistent setting of timers 2025-02-22 12:55:04 +01:00
Peder Bergebakken Sundt fc36872297
nixos/fileSystems: link to mount(8) from fileSystems.*.options (#377170) 2025-02-05 11:08:15 +01:00
Peder Bergebakken Sundt 953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Peder Bergebakken Sundt 15391ccd3e nixos/fileSystems: fix mount(8) manpage links 2025-01-27 01:03:14 +01:00
Peder Bergebakken Sundt f259802ac7 nixos/fileSystems: link to mount(8) from fileSystems.*.options 2025-01-27 01:02:27 +01:00
Florian Klink 0b65cf03f0 nixos/network-interfaces-systemd: remove unused arg in genericDhcpNetworks
The first argument is not used (anymore).
2025-01-26 14:51:00 +02:00
Egor Savkin 201f27715e network: make network-setup service do not depend on udevd directly; fix typo with GRE tunnels
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>
2025-01-24 17:40:34 +08:00
github-actions[bot] 51d152f300
Merge master into staging-next 2025-01-13 12:06:21 +00:00
Sefa Eyeoglu f571531078
nixos/networking: fix shellcheck findings with enableStrictShellChecks enabled (#349573) 2025-01-13 09:00:59 +01:00
github-actions[bot] a58f8abed0
Merge staging-next into staging 2025-01-06 00:15:41 +00:00
Christian Kögler 945777b8ed
nixos/zfs: Set scrub default IOSchedulingClass to idle (#312193) 2025-01-05 23:57:50 +01:00
Will Fancher b7ea795937
nixos/overlayfs: add a switch to disable prefixing with /sysroot for initrd mounts (#340763) 2025-01-05 17:56:41 -05:00
Will Fancher 764082c095
nixos/fileSystems: add enable option (#301915) 2025-01-05 17:40:23 -05:00
Wolfgang Walther d63aa1ddbe
nixos/tasks: remove obsolete tty-backgrounds-combine.sh file
This should have been removed in
82e1d0c8b1.
2024-12-29 18:36:48 +01:00
MakiseKurisu dab01f875c
nixos/powertop: add hooks to fix incorrect configurations 2024-12-26 01:12:15 +08:00
Adam C. Stephens c937a5c697
nixos/zfs: fix not auto-importing pools without any fileSystems (#365058) 2024-12-14 10:22:24 -05:00
misuzu 9c54c30f11
tasks/network-interfaces: Disable network-local-commands service if unnecessary (#338622) 2024-12-14 13:17:13 +02:00
Andrew Marshall 4ed27101c6 nixos/zfs: fix not auto-importing pools without any fileSystems
`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.
2024-12-13 19:02:30 -05:00
Arne Keller e3f940648e
nixos/zfs: do not auto-import pools marked noauto (#352391) 2024-12-12 06:51:39 +01:00
Andrew Marshall 7f8278a264 nixos/zfs: do not auto-import pools marked noauto
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.
2024-12-11 22:56:13 -05:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
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
2024-12-10 20:26:33 +01:00