From 006652da36831cd45cb6c27c5a67962da852fd3d Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 21 Aug 2025 05:12:31 -0400 Subject: [PATCH] fix minecraft test --- lib.nix | 26 ++++++++++++++------------ tests/minecraft.nix | 1 + 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lib.nix b/lib.nix index bb21808..64fa140 100644 --- a/lib.nix +++ b/lib.nix @@ -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`"; + } + ]; + }; }; } ) diff --git a/tests/minecraft.nix b/tests/minecraft.nix index 12ac132..bfb706c 100644 --- a/tests/minecraft.nix +++ b/tests/minecraft.nix @@ -32,6 +32,7 @@ let https = { domain = "test.local"; }; + zpool_ssds = ""; }; username = "testuser"; })