mob next [ci-skip] [ci skip] [skip ci]
lastFile:flake.nix
This commit is contained in:
27
flake.nix
27
flake.nix
@@ -72,6 +72,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