diff options
author | Will Fancher <elvishjerricco@gmail.com> | 2023-10-21 12:29:34 -0400 |
---|---|---|
committer | Will Fancher <elvishjerricco@gmail.com> | 2023-10-21 12:29:34 -0400 |
commit | b57c850790fa87cf7dcb92a8760e51c5e314aa6f (patch) | |
tree | 1eb7952bd066f0c622df0522fe37c20fa52a065f /nixos/modules/system | |
parent | 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0 (diff) | |
download | nixpkgs-b57c850790fa87cf7dcb92a8760e51c5e314aa6f.tar nixpkgs-b57c850790fa87cf7dcb92a8760e51c5e314aa6f.tar.gz nixpkgs-b57c850790fa87cf7dcb92a8760e51c5e314aa6f.tar.bz2 nixpkgs-b57c850790fa87cf7dcb92a8760e51c5e314aa6f.tar.lz nixpkgs-b57c850790fa87cf7dcb92a8760e51c5e314aa6f.tar.xz nixpkgs-b57c850790fa87cf7dcb92a8760e51c5e314aa6f.tar.zst nixpkgs-b57c850790fa87cf7dcb92a8760e51c5e314aa6f.zip |
nixos/systemd-repart: Add assertion requiring systemd in initrd
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/systemd/repart.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd/repart.nix b/nixos/modules/system/boot/systemd/repart.nix index 2431c68ea17..5ac2ace56ba 100644 --- a/nixos/modules/system/boot/systemd/repart.nix +++ b/nixos/modules/system/boot/systemd/repart.nix @@ -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" |