modules: move nixos modules into nixosModules folder
This commit is contained in:
30
nixosModules/machineModules/forName.nix
Normal file
30
nixosModules/machineModules/forName.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
17
nixosModules/machineModules/overridePkgs.nix
Normal file
17
nixosModules/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