Unverified Commit c107fb66 authored by Janne Heß's avatar Janne Heß Committed by GitHub
Browse files

Merge pull request #202132 from ElvishJerricco/systemd-stage-1-tests-hibernate

nixos: ext fixes with systemd-initrd
parents 73eab78f 71c74bf1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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" ];
+3 −2
Original line number Diff line number Diff line
@@ -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";