2023-12-09 16:42:45 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
2023-12-10 16:38:53 +00:00
|
|
|
imports = [
|
|
|
|
../../modules/outputs/jffs2.nix
|
|
|
|
];
|
2023-12-09 16:42:45 +00:00
|
|
|
config = {
|
|
|
|
kernel = {
|
|
|
|
config = {
|
|
|
|
MTD = "y";
|
|
|
|
MTD_BLOCK = "y";
|
|
|
|
MTD_CMDLINE_PARTS = "y";
|
|
|
|
MTD_PHRAM = "y";
|
|
|
|
|
|
|
|
VIRTIO_MENU = "y";
|
|
|
|
PCI = "y";
|
|
|
|
VIRTIO_PCI = "y";
|
|
|
|
BLOCK = "y";
|
|
|
|
VIRTIO_BLK = "y";
|
|
|
|
VIRTIO_NET = "y";
|
|
|
|
};
|
2024-06-12 21:10:27 +00:00
|
|
|
conditionalConfig = {
|
2025-02-10 21:55:08 +00:00
|
|
|
WLAN = {
|
2024-06-12 21:10:27 +00:00
|
|
|
MAC80211_HWSIM = "m";
|
|
|
|
};
|
|
|
|
};
|
2023-12-09 16:42:45 +00:00
|
|
|
};
|
|
|
|
hardware =
|
|
|
|
let
|
2025-02-10 21:55:08 +00:00
|
|
|
mac80211 = pkgs.kmodloader.override {
|
2024-06-12 21:10:27 +00:00
|
|
|
inherit (config.system.outputs) kernel;
|
2025-02-10 21:55:08 +00:00
|
|
|
targets = [ "mac80211_hwsim" ];
|
2023-12-09 16:42:45 +00:00
|
|
|
};
|
2025-02-10 21:55:08 +00:00
|
|
|
in
|
|
|
|
{
|
2023-12-09 16:42:45 +00:00
|
|
|
defaultOutput = "vmroot";
|
|
|
|
rootDevice = "/dev/mtdblock0";
|
2023-12-21 19:17:14 +00:00
|
|
|
dts.src = pkgs.lib.mkDefault null;
|
2023-12-09 16:42:45 +00:00
|
|
|
flash.eraseBlockSize = 65536;
|
|
|
|
networkInterfaces =
|
2025-02-10 21:55:08 +00:00
|
|
|
let
|
|
|
|
inherit (config.system.service.network) link;
|
|
|
|
in
|
|
|
|
{
|
2023-12-09 16:42:45 +00:00
|
|
|
wan = link.build {
|
|
|
|
devpath = "/devices/pci0000:00/0000:00:13.0/virtio0";
|
|
|
|
ifname = "wan";
|
|
|
|
};
|
|
|
|
lan = link.build {
|
|
|
|
devpath = "/devices/pci0000:00/0000:00:14.0/virtio1";
|
|
|
|
ifname = "lan";
|
|
|
|
};
|
|
|
|
|
|
|
|
wlan_24 = link.build {
|
|
|
|
ifname = "wlan0";
|
|
|
|
dependencies = [ mac80211 ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|