From b7508b2b43c5d8de95e997eda2b043c6a9b17361 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Tue, 28 Oct 2025 11:25:20 +0100 Subject: [PATCH] clan/checks: fix clanLib not checking --- flakeModules/clan.nix | 15 --------------- lib/dir_test.nix | 14 ++++++++++++-- modules/clan/checks.nix | 16 ++++++++++++++++ modules/clan/default.nix | 1 + 4 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 modules/clan/checks.nix diff --git a/flakeModules/clan.nix b/flakeModules/clan.nix index bb9d402da..ec45927b7 100644 --- a/flakeModules/clan.nix +++ b/flakeModules/clan.nix @@ -39,21 +39,6 @@ in }; modules = [ clan-core.modules.clan.default - { - checks.minNixpkgsVersion = { - assertion = lib.versionAtLeast nixpkgs.lib.version "25.11"; - message = '' - Nixpkgs version: ${nixpkgs.lib.version} is incompatible with clan-core. (>= 25.11 is recommended) - --- - Your version of 'nixpkgs' seems too old for clan-core. - Please read: https://docs.clan.lol/guides/nixpkgs-flake-input - - You can ignore this check by setting: - clan.checks.minNixpkgsVersion.ignore = true; - --- - ''; - }; - } ]; }; # Important: !This logic needs to be kept in sync with lib.clan function! diff --git a/lib/dir_test.nix b/lib/dir_test.nix index 1c35a8989..3be34f6f5 100644 --- a/lib/dir_test.nix +++ b/lib/dir_test.nix @@ -53,7 +53,12 @@ in }; }; }).clan - { config.directory = rootPath; }; + { + directory = rootPath; + self = { + inputs.nixpkgs.lib.version = "25.11"; + }; + }; in { inherit vclan; @@ -94,7 +99,12 @@ in }; }; }).clan - { config.directory = rootPath; }; + { + directory = rootPath; + self = { + inputs.nixpkgs.lib.version = "25.11"; + }; + }; in { inherit vclan; diff --git a/modules/clan/checks.nix b/modules/clan/checks.nix new file mode 100644 index 000000000..55f7879e5 --- /dev/null +++ b/modules/clan/checks.nix @@ -0,0 +1,16 @@ +{ lib, nixpkgs, ... }: +{ + checks.minNixpkgsVersion = { + assertion = lib.versionAtLeast nixpkgs.lib.version "25.11"; + message = '' + Nixpkgs version: ${nixpkgs.lib.version} is incompatible with clan-core. (>= 25.11 is recommended) + --- + Your version of 'nixpkgs' seems too old for clan-core. + Please read: https://docs.clan.lol/guides/nixpkgs-flake-input + + You can ignore this check by setting: + clan.checks.minNixpkgsVersion.ignore = true; + --- + ''; + }; +} diff --git a/modules/clan/default.nix b/modules/clan/default.nix index 2c7d59b8e..f35ca8b2e 100644 --- a/modules/clan/default.nix +++ b/modules/clan/default.nix @@ -19,5 +19,6 @@ imports = [ ./top-level-interface.nix ./module.nix + ./checks.nix ]; }