mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 15:13:56 +02:00
33 lines
761 B
Nix
33 lines
761 B
Nix
{ pkgs
|
|
, nixosSystem
|
|
, formatModule
|
|
, system
|
|
, specialArgs ? { }
|
|
, modules ? [ ]
|
|
}:
|
|
let
|
|
image = nixosSystem {
|
|
inherit pkgs specialArgs;
|
|
modules =
|
|
[
|
|
formatModule
|
|
(
|
|
{ lib, ... }: {
|
|
options = {
|
|
fileExtension = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "Declare the path of the wanted file in the output directory";
|
|
default = "";
|
|
};
|
|
formatAttr = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = "Declare the default attribute to build";
|
|
};
|
|
};
|
|
}
|
|
)
|
|
]
|
|
++ modules;
|
|
};
|
|
in
|
|
image.config.system.build.${image.config.formatAttr}
|