{ inputs, ... }: let getProfiles = pkgs: inputs.openwrt-imagebuilder.lib.profiles { inherit pkgs; release = "snapshot"; }; in { flake.lib.mkOpenwrtImage = { pkgs, hostname, timezone, ipaddr }: inputs.openwrt-imagebuilder.lib.build ((getProfiles pkgs).identifyProfile "glinet_gl-mt6000" // { packages = [ # TODO does this include everything that the web firmware builder includes? "auc" "bridger" "dawn" "luci-app-attendedsysupgrade" "luci-app-dawn" "luci-ssl" "tailscale" ]; files = pkgs.runCommand "image-files" { } '' mkdir -p $out/etc/uci-defaults cat > $out/etc/uci-defaults/99-custom <>/etc/modules.conf # Set up automatic upgrades # TODO download upgrade script from GitHub gist # wget [github gist url] # cat "0 3 * * * /path/to/gist/script" >>/etc/crontabs/root EOF ''; }); }