2022-01-11 18:44:40 +01:00
|
|
|
{ inputs, lib, pkgs, ... }:
|
|
|
|
|
2022-09-05 18:16:09 +02:00
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
mkHost = path: attrs@{ system, ... }:
|
2022-01-11 18:44:40 +01:00
|
|
|
nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
specialArgs = { inherit lib inputs system; };
|
|
|
|
modules = [
|
|
|
|
{
|
|
|
|
nixpkgs.pkgs = pkgs;
|
2022-09-05 18:16:09 +02:00
|
|
|
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
2022-01-11 18:44:40 +01:00
|
|
|
}
|
2022-09-05 18:16:09 +02:00
|
|
|
(filterAttrs (n: v: !elem n [ "system" ]) attrs)
|
|
|
|
|
2022-01-11 18:44:40 +01:00
|
|
|
../.
|
2022-09-05 18:16:09 +02:00
|
|
|
|
2022-01-11 18:44:40 +01:00
|
|
|
(import path)
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|