Refactor(build-clan): rename to lib/modules
This is a preparation for moving everything into clan, to make it all one module evaluation
This commit is contained in:
29
lib/modules/machineModules/forName.nix
Normal file
29
lib/modules/machineModules/forName.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
name,
|
||||
directory,
|
||||
meta,
|
||||
}:
|
||||
{
|
||||
_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;
|
||||
inherit directory;
|
||||
machine = {
|
||||
inherit name;
|
||||
};
|
||||
};
|
||||
}
|
||||
17
lib/modules/machineModules/overridePkgs.nix
Normal file
17
lib/modules/machineModules/overridePkgs.nix
Normal 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;
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user