1
0
forked from dan/liminix
liminix/modules/outputs/tplink.nix
2024-01-27 17:47:47 +01:00

31 lines
601 B
Nix

{
config
, pkgs
, lib
, ...
}:
let
inherit (lib) mkOption types concatStringsSep;
o = config.system.outputs;
in {
options.system.outputs = {
tplink = mkOption {
type = types.package;
description = ''
tplink
******
For creating tp-link 'safeloader' images
'';
};
};
config = {
system.outputs = rec {
tplink =
pkgs.runCommand "tplink" { nativeBuildInputs = with pkgs.pkgsBuildBuild; [ firmware-utils ]; } ''
tplink-safeloader -B ARCHER-AX23-V1 -k "${o.uimage}" -r "${o.rootfs}" -o $out
'';
};
};
}