modules: move nixos modules into nixosModules folder

This commit is contained in:
Johannes Kirschbauer
2025-10-27 17:27:54 +01:00
parent 4239f4d27f
commit a2cec323a2
3 changed files with 3 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
{
name,
directory,
meta,
}:
# The following is a nixos/darwin module
{
_class,
lib,
...
}:
{
imports = builtins.filter builtins.pathExists (
[
"${directory}/machines/${name}/configuration.nix"
]
++ lib.optionals (_class == "nixos") [
"${directory}/machines/${name}/hardware-configuration.nix"
"${directory}/machines/${name}/disko.nix"
]
);
clan.core.settings = {
inherit (meta) name icon tld;
inherit directory;
machine = {
inherit name;
};
};
}

View File

@@ -0,0 +1,17 @@
{
pkgs,
}:
{
lib,
...
}:
{
imports = [
{
# For vars we need to ensure that the system so we run vars generate on
# is in sync with the pkgs of the system
nixpkgs.hostPlatform = lib.mkForce pkgs.system;
nixpkgs.pkgs = lib.mkForce pkgs;
}
];
}