Make resume_offset optional

This commit is contained in:
Hendrik Sokolowski 2022-10-23 18:33:11 +02:00
parent 51d03f0de7
commit eece344083
Signed by: hensoko
GPG key ID: 5C36A01B80BCCC59

View file

@ -27,9 +27,7 @@ in
config = { config = {
boot = mkIf cfg.enable { boot = mkIf cfg.enable {
resumeDevice = cfg.resumeDevice; resumeDevice = cfg.resumeDevice;
kernelParams = kernelParams = mkIf (cfg.resumeOffset != null) [ "resume_offset=${builtins.toString cfg.resumeOffset}" ];
if (cfg.resumeOffset == null && cfg.enable) then builtins.abort "config.pub-solar.resumeOffset has to be set if config.pub-solar.enable is true."
else [ "resume_offset=${builtins.toString cfg.resumeOffset}" ];
}; };
}; };
} }