1
0
Fork 0

executive decision: rotuer example should build on gl-ar750

This commit is contained in:
Daniel Barlow 2024-07-16 21:32:29 +01:00
parent 1edf20c08f
commit 3012c91b47
1 changed files with 13 additions and 14 deletions

View File

@ -1,10 +1,8 @@
# This is not part of Liminix per se. This is my "scratchpad" # This is an example that uses the "gateway" profile to create a
# configuration for the device I'm testing with. # "typical home wireless router" configuration suitable for a Gl.inet
# # gl-ar750 router. It should be fairly simple to edit it for other
# Parts of it do do things that Liminix eventually needs to do, but # devices: mostly you will need to attend to the number of wlan and lan
# don't look in here for solutions - just for identifying the # interfaces
# problems.
{ config, pkgs, lib, modulesPath, ... } : { config, pkgs, lib, modulesPath, ... } :
let let
@ -30,21 +28,18 @@ in rec {
imports = [ imports = [
"${modulesPath}/profiles/gateway.nix" "${modulesPath}/profiles/gateway.nix"
"${modulesPath}/schnapps"
"${modulesPath}/outputs/btrfs.nix"
"${modulesPath}/outputs/extlinux.nix"
]; ];
hostname = "rotuer"; hostname = "rotuer";
rootfsType = "btrfs";
rootOptions = "subvol=@";
boot.loader.extlinux.enable = true;
profile.gateway = { profile.gateway = {
lan = { lan = {
interfaces = with config.hardware.networkInterfaces; interfaces = with config.hardware.networkInterfaces;
[ [
# EDIT: these are the interfaces exposed by the gl.inet gl-ar750:
# if your device has more or differently named lan interfaces,
# specify them here
wlan wlan5 wlan wlan5
lan0 lan1 lan2 lan3 lan4 lan
]; ];
inherit (secrets.lan) prefix; inherit (secrets.lan) prefix;
address = { address = {
@ -68,6 +63,10 @@ in rec {
rules = secrets.firewallRules; rules = secrets.firewallRules;
}; };
wireless.networks = { wireless.networks = {
# EDIT: if you have more or fewer wireless radios, here is where
# you need to say so. hostapd tuning is hardware-specific and
# left as an exercise for the reader :-).
"${secrets.ssid}" = { "${secrets.ssid}" = {
interface = config.hardware.networkInterfaces.wlan; interface = config.hardware.networkInterfaces.wlan;
hw_mode = "g"; hw_mode = "g";