Skip to content

Commit

Permalink
Merge pull request #34 from r-vdp/dont-duplicate-initrd-modules
Browse files Browse the repository at this point in the history
Avoid duplicating modules in the list of initrd modules
  • Loading branch information
brianmcgee authored Sep 20, 2024
2 parents cc817a8 + 9bd5a43 commit 6eb1340
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions modules/nixos/boot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ in
with lib;
mkIf cfg.enable {
boot.initrd.availableKernelModules = filter (dm: dm != null) (
map
(
{
driver_module ? null,
...
}:
driver_module
)
(
unique (flatten [
unique (
map
(
{
driver_module ? null,
...
}:
driver_module
)
(flatten [
# Needed if we want to use the keyboard when things go wrong in the initrd.
(report.hardware.usb_controller or [ ])
# A disk might be attached.
Expand All @@ -31,7 +31,7 @@ in
(report.hardware.disk or [ ])
(report.hardware.storage_controller or [ ])
])
)
)
);
};
}

0 comments on commit 6eb1340

Please sign in to comment.