diff --git a/modules/core/hibernation.nix b/modules/core/hibernation.nix index a71ffd37..51f196d0 100644 --- a/modules/core/hibernation.nix +++ b/modules/core/hibernation.nix @@ -12,8 +12,8 @@ in }; resumeDevice = mkOption { - type = types.str; - default = "/dev/sda1"; + type = types.nullOr types.str; + default = null; description = "The location of the hibernation resume swap file."; }; @@ -26,7 +26,7 @@ in config = { boot = mkIf cfg.enable { - resumeDevice = cfg.resumeDevice; + resumeDevice = mkIf (cfg.resumeDevice != null) cfg.resumeDevice; kernelParams = mkIf (cfg.resumeOffset != null) [ "resume_offset=${builtins.toString cfg.resumeOffset}" ]; }; };