Merge pull request #262573 from ElvishJerricco/systemd-repart-stage-1-assertion

nixos/systemd-repart: Add assertion requiring systemd in initrd
This commit is contained in:
nikstur 2023-10-22 11:53:59 +02:00 committed by GitHub
commit 9b20e22b88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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"