Merge pull request #202132 from ElvishJerricco/systemd-stage-1-tests-hibernate
nixos: ext fixes with systemd-initrd
This commit is contained in:
commit
c107fb66da
2 changed files with 5 additions and 3 deletions
|
@ -3,13 +3,14 @@
|
|||
let
|
||||
|
||||
inInitrd = lib.any (fs: fs == "ext2" || fs == "ext3" || fs == "ext4") config.boot.initrd.supportedFilesystems;
|
||||
inSystem = lib.any (fs: fs == "ext2" || fs == "ext3" || fs == "ext4") config.boot.supportedFilesystems;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
config = {
|
||||
|
||||
system.fsPackages = lib.mkIf (config.boot.initrd.systemd.enable -> inInitrd) [ pkgs.e2fsprogs ];
|
||||
system.fsPackages = lib.mkIf (config.boot.initrd.systemd.enable -> (inInitrd || inSystem)) [ pkgs.e2fsprogs ];
|
||||
|
||||
# As of kernel 4.3, there is no separate ext3 driver (they're also handled by ext4.ko)
|
||||
boot.initrd.availableKernelModules = lib.mkIf (config.boot.initrd.systemd.enable -> inInitrd) [ "ext2" "ext4" ];
|
||||
|
|
|
@ -26,8 +26,9 @@ let
|
|||
|
||||
powerManagement.resumeCommands = "systemctl --no-block restart backdoor.service";
|
||||
|
||||
fileSystems = {
|
||||
"/".device = "/dev/vda2";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/vda2";
|
||||
fsType = "ext3";
|
||||
};
|
||||
swapDevices = mkOverride 0 [ { device = "/dev/vda1"; } ];
|
||||
boot.resumeDevice = mkIf systemdStage1 "/dev/vda1";
|
||||
|
|
Loading…
Reference in a new issue