{ 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 ''; }; }; }