Skip to content

Commit 241c878

Browse files
Mic92mergify[bot]
authored andcommitted
drop deprecated boot.initrd.services.swraid.enable option
1 parent b32f0e2 commit 241c878

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

lib/tests.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,14 @@ let
171171
lib.optional (lib.meta.availableOn pkgs.stdenv.hostPlatform config.boot.zfs.package) "zfs";
172172
networking.hostId = "8425e349";
173173
})
174+
175+
(if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then {
176+
boot.swraid.enable = true;
177+
} else {
178+
boot.initrd.services.swraid.enable = true;
179+
})
174180
];
175181

176-
boot.initrd.services.swraid.enable = true;
177182
systemd.services.mdmonitor.enable = false; # silence some weird warnings
178183

179184
environment.systemPackages = [
@@ -265,4 +270,3 @@ let
265270
};
266271
in
267272
testLib
268-

lib/types/mdadm.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@
5959
internal = true;
6060
readOnly = true;
6161
default =
62-
[{ boot.initrd.services.swraid.enable = true; }] ++
62+
[
63+
(if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then {
64+
boot.swraid.enable = true;
65+
} else {
66+
boot.initrd.services.swraid.enable = true;
67+
})
68+
] ++
6369
lib.optional (config.content != null) config.content._config;
6470
description = "NixOS configuration";
6571
};

0 commit comments

Comments
 (0)