mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
nixos/systemd-repart: Add assertion requiring systemd in initrd
This commit is contained in:
parent
7c9cc5a6e5
commit
b57c850790
@ -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 New Issue
Block a user