From f5681326f3c01e52cbf6cbc625224c1a95f8fe17 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 21 Mar 2023 22:57:19 -0400 Subject: add config for turret (openwrt router) --- hosts/turret/default.nix | 38 +++++ hosts/turret/files/etc/config/dhcp | 55 +++++++ hosts/turret/files/etc/config/dropbear | 5 + hosts/turret/files/etc/config/firewall | 189 ++++++++++++++++++++++++ hosts/turret/files/etc/config/https-dns-proxy | 18 +++ hosts/turret/files/etc/config/luci | 41 +++++ hosts/turret/files/etc/config/network | 29 ++++ hosts/turret/files/etc/config/rpcd | 10 ++ hosts/turret/files/etc/config/system | 16 ++ hosts/turret/files/etc/config/ucitrack | 56 +++++++ hosts/turret/files/etc/config/uhttpd | 31 ++++ hosts/turret/files/etc/config/wireless | Bin 0 -> 827 bytes hosts/turret/files/etc/dropbear/authorized_keys | 1 + 13 files changed, 489 insertions(+) create mode 100644 hosts/turret/default.nix create mode 100644 hosts/turret/files/etc/config/dhcp create mode 100644 hosts/turret/files/etc/config/dropbear create mode 100644 hosts/turret/files/etc/config/firewall create mode 100644 hosts/turret/files/etc/config/https-dns-proxy create mode 100644 hosts/turret/files/etc/config/luci create mode 100644 hosts/turret/files/etc/config/network create mode 100644 hosts/turret/files/etc/config/rpcd create mode 100644 hosts/turret/files/etc/config/system create mode 100644 hosts/turret/files/etc/config/ucitrack create mode 100644 hosts/turret/files/etc/config/uhttpd create mode 100644 hosts/turret/files/etc/config/wireless create mode 100644 hosts/turret/files/etc/dropbear/authorized_keys (limited to 'hosts') diff --git a/hosts/turret/default.nix b/hosts/turret/default.nix new file mode 100644 index 0000000..faac3d2 --- /dev/null +++ b/hosts/turret/default.nix @@ -0,0 +1,38 @@ +{ + pkgs, + openwrt-imagebuilder, + ... +}: let + inherit (pkgs) runCommand; + inherit (pkgs.stdenv) mkDerivation; + inherit (openwrt-imagebuilder.lib) build profiles; + wrtProfiles = profiles { + inherit pkgs; + release = "22.03.3"; + }; + config = mkDerivation { + name = "openwrt-config-files"; + src = ./files; + installPhase = '' + mkdir -p $out + cp -r * $out/ + ''; + }; + image = + wrtProfiles.identifyProfile "netgear_wac104" + // { + packages = ["https-dns-proxy"]; + + files = runCommand "image-files" {} '' + mkdir -p $out/etc/uci-defaults + cat > $out/etc/uci-defaults/99-custom <