2022-10-04 15:45:11 +02:00
|
|
|
let names = [ "pennyworth" "jarvis" "blackadder" "frumar" "smithers" ];
|
2021-05-29 18:05:31 +02:00
|
|
|
in pkgs: super: {
|
|
|
|
yorick = (super.yorick or { }) // rec {
|
|
|
|
nixos = configuration: extraArgs:
|
2021-05-29 17:22:27 +02:00
|
|
|
let
|
|
|
|
c = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
|
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
2022-05-15 14:35:03 +02:00
|
|
|
specialArgs.inputs = pkgs.flake-inputs;
|
2021-05-29 17:22:27 +02:00
|
|
|
modules =
|
2022-03-16 17:12:11 +01:00
|
|
|
[ ({ lib, ... }: {
|
|
|
|
config.nixpkgs.pkgs = lib.mkDefault pkgs;
|
|
|
|
config._module.args = extraArgs;
|
|
|
|
}) ]
|
2021-05-29 18:05:31 +02:00
|
|
|
++ (if builtins.isList configuration then
|
|
|
|
configuration
|
|
|
|
else
|
|
|
|
[ configuration ]);
|
2021-05-29 17:22:27 +02:00
|
|
|
};
|
2021-05-29 18:05:31 +02:00
|
|
|
in c.config.system.build // c;
|
|
|
|
machine = pkgs.lib.genAttrs names
|
2022-10-04 10:39:49 +02:00
|
|
|
(name: nixos [ ./roles (./machines + "/${name}/default.nix") ] { inherit name; });
|
2021-05-29 17:22:27 +02:00
|
|
|
};
|
|
|
|
}
|