From 25126fd8cacaf0b83eca6d56e30a1994bb9a874e Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Wed, 2 Nov 2022 20:55:05 +0100 Subject: [PATCH] Make resumeDevice optional --- modules/core/hibernation.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/hibernation.nix b/modules/core/hibernation.nix index c0dd97b..74befd7 100644 --- a/modules/core/hibernation.nix +++ b/modules/core/hibernation.nix @@ -15,8 +15,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."; }; @@ -29,7 +29,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}"]; }; };