mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #202132 from ElvishJerricco/systemd-stage-1-tests-hibernate
nixos: ext fixes with systemd-initrd
This commit is contained in:
commit
c107fb66da
@ -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 New Issue
Block a user