Make resume_offset optional

This commit is contained in:
Hendrik Sokolowski 2022-10-23 18:33:11 +02:00 committed by teutat3s
parent 42c4cda12e
commit cc3979d724
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -27,9 +27,7 @@ in
config = {
boot = mkIf cfg.enable {
resumeDevice = cfg.resumeDevice;
kernelParams =
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}" ];
kernelParams = mkIf (cfg.resumeOffset != null) [ "resume_offset=${builtins.toString cfg.resumeOffset}" ];
};
};
}