mob next [ci-skip] [ci skip] [skip ci]
lastFile:flake.lock
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
};
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
openwrt-imagebuilder = {
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-parts.follows = "flake-parts";
|
||||
url = "github:astro/nix-openwrt-imagebuilder";
|
||||
};
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -79,6 +84,33 @@
|
||||
packages.think-be = pkgs.think-backend-gtcm;
|
||||
packages.file-uploader = pkgs.gtcm-file-uploader;
|
||||
};
|
||||
|
||||
flake.packages.x86_64-linux.myrouter =
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||
profiles = inputs.openwrt-imagebuilder.lib.profiles { inherit pkgs; };
|
||||
config = profiles.identifyProfile "glinet_gl-mt6000" // {
|
||||
# add package to include in the image, ie. packages that you don't
|
||||
# want to install manually later
|
||||
packages = [ "tcpdump" ];
|
||||
|
||||
disabledServices = [ "dnsmasq" ];
|
||||
|
||||
# include files in the images.
|
||||
# to set UCI configuration, create a uci-defauts scripts as per
|
||||
# official OpenWRT ImageBuilder recommendation.
|
||||
files = pkgs.runCommand "image-files" { } ''
|
||||
mkdir -p $out/etc/uci-defaults
|
||||
cat > $out/etc/uci-defaults/99-custom <<EOF
|
||||
uci -q batch << EOI
|
||||
set system.@system[0].hostname='testap'
|
||||
commit
|
||||
EOI
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
in
|
||||
inputs.openwrt-imagebuilder.lib.build config;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user