mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 19:23:01 +03:00
a28cd3a293
This, with the upcoming luks task allows encrypted drives to work!
28 lines
583 B
Nix
28 lines
583 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (config.boot.initrd) luks;
|
|
in
|
|
|
|
lib.mkIf (luks.devices != {} || luks.forceLuksSupportInInitrd) {
|
|
mobile.boot.stage-1 = {
|
|
bootConfig = {
|
|
luksDevices = luks.devices;
|
|
};
|
|
kernel = {
|
|
modules = [
|
|
"dm_mod" "dm_crypt" "cryptd" "input_leds"
|
|
] ++ luks.cryptoModules
|
|
;
|
|
};
|
|
|
|
extraUtils = [
|
|
{ package = pkgs.cryptsetup; }
|
|
# dmsetup is required for device mapper stuff to work in stage-1.
|
|
{ package = lib.getBin pkgs.lvm2; binaries = [
|
|
"lvm" "dmsetup"
|
|
];}
|
|
];
|
|
};
|
|
}
|