From ee8fef414961d3d04250a03cb5a071882f286f44 Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 00:01:21 +1300 Subject: [PATCH] Use the module assertions option, instead - Assertion (failure) when trying to use microsoft/surface/default.nix --- microsoft/surface/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/microsoft/surface/default.nix b/microsoft/surface/default.nix index 5ed9046..395e05d 100644 --- a/microsoft/surface/default.nix +++ b/microsoft/surface/default.nix @@ -1,12 +1,10 @@ -{ lib, ... }: +{ ... }: -let - inherit (lib) warn; - -in { - imports = [ - ( warn - "Please do not import microsoft/surface/ (default.nix) directly; use microsoft/surface/old or see microsoft/surface/old/README.md for more details." - ./deprecated ) +{ + assertions = [ + { + assertion = false; + message = "Importing microsoft/surface/ (default.nix) directly is deprecated! See microsoft/surface/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + } ]; }