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:
commit
9b20e22b88
1 changed files with 9 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue