fix minecraft test

This commit is contained in:
2025-08-21 05:12:31 -04:00
parent 3557a2e6c8
commit 006652da36
2 changed files with 15 additions and 12 deletions

26
lib.nix
View File

@@ -83,19 +83,21 @@ inputs.nixpkgs.lib.extend (
serviceName: zpool:
{ config, ... }:
{
systemd.services.${serviceName} = {
wants = [ "zfs-import-${zpool}.service" ];
after = [ "zfs-import-${zpool}.service" ];
requires = [ "zfs-import-${zpool}.service" ];
};
config = lib.mkIf (zpool != "") {
systemd.services.${serviceName} = {
wants = [ "zfs-import-${zpool}.service" ];
after = [ "zfs-import-${zpool}.service" ];
requires = [ "zfs-import-${zpool}.service" ];
};
# assert that the pool is even enabled
config.assertions = [
{
assertion = builtins.elem zpool config.boot.zfs.extraPools;
message = "${zpool} is not enabled in `boot.zfs.extraPools`";
}
];
# assert that the pool is even enabled
assertions = [
{
assertion = builtins.elem zpool config.boot.zfs.extraPools;
message = "${zpool} is not enabled in `boot.zfs.extraPools`";
}
];
};
};
}
)