nixos: kexec: Disable on non-keexecable systems.

This commit is contained in:
Shea Levy 2018-02-27 20:34:13 -05:00
parent d61a22fb0e
commit a929301281
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27

View File

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
config = lib.mkIf (pkgs.kexectools != null) {
environment.systemPackages = [ pkgs.kexectools ];
systemd.services."prepare-kexec" =
@ -17,5 +18,5 @@
exec kexec --load $p/kernel --initrd=$p/initrd --append="$(cat $p/kernel-params) init=$p/init"
'';
};
};
}