nixos/systemd-repart: Add assertion requiring systemd in initrd

This commit is contained in:
Will Fancher 2023-10-21 12:29:34 -04:00
parent 7c9cc5a6e5
commit b57c850790

View File

@ -74,6 +74,15 @@ in
};
config = lib.mkIf (cfg.enable || initrdCfg.enable) {
assertions = [
{
assertion = initrdCfg.enable -> config.boot.initrd.systemd.enable;
message = ''
'boot.initrd.systemd.repart.enable' requires 'boot.initrd.systemd.enable' to be enabled.
'';
}
];
boot.initrd.systemd = lib.mkIf initrdCfg.enable {
additionalUpstreamUnits = [
"systemd-repart.service"