Improve nixosModules checks to include all modules by default.

This commit is contained in:
Fabian Hauser 2025-03-25 15:34:17 +02:00
parent fc39e912ad
commit 85ea7fe030
4 changed files with 8 additions and 5 deletions

View file

@ -12,6 +12,7 @@
formatting = treefmtEval.config.build.check flakeSelf; formatting = treefmtEval.config.build.check flakeSelf;
nixos-modules = pkgs.callPackage ./nixos-modules { nixos-modules = pkgs.callPackage ./nixos-modules {
defaultModule = self.nixosModules.default;
inherit (self.lib) getSubDirs isFolderWithFile; inherit (self.lib) getSubDirs isFolderWithFile;
}; };

View file

@ -4,6 +4,7 @@
getSubDirs, getSubDirs,
lib, lib,
testers, testers,
defaultModule,
}: }:
let let
inherit (lib) inherit (lib)
@ -23,6 +24,7 @@ let
in in
testers.runNixOSTest { testers.runNixOSTest {
inherit name; inherit name;
imports = [ imports = [
(import (getFilePath "test.nix") { (import (getFilePath "test.nix") {
inherit name; inherit name;
@ -30,7 +32,7 @@ let
}) })
]; ];
defaults.imports = [ (getFilePath "default.nix") ]; defaults.imports = [ defaultModule ];
# Calls a `test(...)` python function in the test's python file with the list of nodes and helper functions. # Calls a `test(...)` python function in the test's python file with the list of nodes and helper functions.
# Helper symbols may be added as function args when needed and can be found in: # Helper symbols may be added as function args when needed and can be found in:

6
flake.lock generated
View file

@ -170,10 +170,10 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742903609, "lastModified": 1742910348,
"narHash": "sha256-/RY0aP9QJROQqyaTX2qUy04YQD22l8cTbKqYo3aFzpg=", "narHash": "sha256-ChpGvxY5QN7otvTx4JknqIfDnnmWYHfHSVYvYG+ZJg8=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "9e9c48a02ca9ce6514d609c0f4f0607fa7fa8165", "rev": "f789cff29517e0240525f5a9f2007dbec3ae48e7",
"revCount": 13, "revCount": 13,
"type": "git", "type": "git",
"url": "file:./private" "url": "file:./private"

@ -1 +1 @@
Subproject commit 9e9c48a02ca9ce6514d609c0f4f0607fa7fa8165 Subproject commit f789cff29517e0240525f5a9f2007dbec3ae48e7