0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-20 17:10:46 +03:00
nixpkgs/nixos/modules/system/boot/nix-store-veritysetup.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
804 B
Nix
Raw Normal View History

2025-06-14 21:44:46 +02:00
{
config,
lib,
pkgs,
...
}:
let
cfg = config.boot.initrd.nix-store-veritysetup;
in
{
meta.maintainers = with lib.maintainers; [ nikstur ];
options.boot.initrd.nix-store-veritysetup = {
enable = lib.mkEnableOption "nix-store-veritysetup";
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = config.boot.initrd.systemd.dmVerity.enable;
message = "nix-store-veritysetup requires dm-verity in the systemd initrd.";
}
];
boot.initrd.systemd = {
contents = {
"/etc/systemd/system-generators/nix-store-veritysetup-generator".source =
"${lib.getExe pkgs.nix-store-veritysetup-generator}";
};
storePaths = [
"${config.boot.initrd.systemd.package}/bin/systemd-escape"
];
};
};
}