Commit graph

803 commits

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