feat(openwrt): update config
This commit is contained in:
parent
9555a51409
commit
4eab62fe3b
|
@ -1,10 +1,16 @@
|
||||||
{ self, inputs, ... }: {
|
{ self, ... }: {
|
||||||
perSystem = { self', pkgs, lib, ... }: {
|
perSystem = { self', pkgs, lib, ... }: {
|
||||||
packages.doctr = self.lib.mkOpenwrtImage {
|
packages.doctr = self.lib.mkOpenwrtImage {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
hostname = "doctr";
|
hostname = "doctr";
|
||||||
timezone = "Europe/Berlin";
|
timezone = "Europe/Berlin";
|
||||||
ipaddr = "192.168.1.1";
|
ipaddr = "192.168.1.1";
|
||||||
|
packages = [
|
||||||
|
"tang" # for automatic LUKS decryption with clevis
|
||||||
|
];
|
||||||
|
uci = ''
|
||||||
|
uci set tang.config.enabled='1'
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ self, inputs, ... }: {
|
{ self, ... }: {
|
||||||
perSystem = { self', pkgs, lib, ... }: {
|
perSystem = { self', pkgs, lib, ... }: {
|
||||||
packages.penguin = self.lib.mkOpenwrtImage {
|
packages.penguin = self.lib.mkOpenwrtImage {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
|
@ -6,19 +6,21 @@ let
|
||||||
release = "snapshot";
|
release = "snapshot";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
flake.lib.mkOpenwrtImage = { pkgs, hostname, timezone, ipaddr }:
|
flake.lib.mkOpenwrtImage =
|
||||||
|
{ pkgs, hostname, timezone, ipaddr, packages ? [ ], uci ? "" }:
|
||||||
inputs.openwrt-imagebuilder.lib.build
|
inputs.openwrt-imagebuilder.lib.build
|
||||||
((getProfiles pkgs).identifyProfile "glinet_gl-mt6000" // {
|
((getProfiles pkgs).identifyProfile "glinet_gl-mt6000" // {
|
||||||
packages = [
|
packages = [
|
||||||
# TODO does this include everything that the web firmware builder includes?
|
# TODO does this include everything that the web firmware builder includes?
|
||||||
"auc"
|
"auc"
|
||||||
"bridger"
|
|
||||||
"dawn"
|
"dawn"
|
||||||
"luci-app-attendedsysupgrade"
|
"luci-app-attendedsysupgrade"
|
||||||
"luci-app-dawn"
|
"luci-app-dawn"
|
||||||
|
"luci-app-nextdns"
|
||||||
"luci-ssl"
|
"luci-ssl"
|
||||||
|
"nextdns"
|
||||||
"tailscale"
|
"tailscale"
|
||||||
];
|
] ++ packages;
|
||||||
|
|
||||||
files = pkgs.runCommand "image-files" { } ''
|
files = pkgs.runCommand "image-files" { } ''
|
||||||
mkdir -p $out/etc/uci-defaults
|
mkdir -p $out/etc/uci-defaults
|
||||||
|
@ -32,6 +34,7 @@ in {
|
||||||
uci set system.@system[0].timezone="$timezone"
|
uci set system.@system[0].timezone="$timezone"
|
||||||
uci set network.lan.ipaddr="$ipaddr"
|
uci set network.lan.ipaddr="$ipaddr"
|
||||||
uci set uhttpd.main.redirect_https='1'
|
uci set uhttpd.main.redirect_https='1'
|
||||||
|
${uci}
|
||||||
uci commit
|
uci commit
|
||||||
/etc/init.d/system reload
|
/etc/init.d/system reload
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue