refactor(lib): moved helper function to lib

This commit is contained in:
Mohammad Rafiq 2025-05-14 15:56:46 +08:00
parent c5aca4a755
commit 6c9fbe5682
No known key found for this signature in database
2 changed files with 33 additions and 21 deletions

28
lib/default.nix Normal file
View file

@ -0,0 +1,28 @@
{
inputs,
self,
workingDir,
...
}:
{
mkSystem = type: hostname: bootDisk: {
name = "${hostname}";
value = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit
self
inputs
type
hostname
bootDisk
;
};
modules = [
"${workingDir}/modules/nixos"
"${workingDir}/modules/hm"
"${workingDir}/hosts/common.nix"
"${workingDir}/hosts/${hostname}.nix"
];
};
};
}