]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/profiles/hardware/cubieboard2.nix
carotte: try to upgrade
[sourcephile-nix.git] / nixos / profiles / hardware / cubieboard2.nix
1 { pkgs, lib, config, modulesPath, ... }:
2 {
3 imports = [
4 "${modulesPath}/installer/sd-card/sd-image.nix"
5 ];
6
7 _module.args.CPUs = 2;
8
9 # Too CPU hungry for this hardware, for too little MiB saved
10 nix.settings.auto-optimise-store = false;
11
12 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
13
14 boot.supportedFilesystems = [
15 #"btrfs"
16 #"reiserfs"
17 "vfat"
18 #"f2fs"
19 #"xfs"
20 #"zfs" # ZFS tools coredump with SIGSEGV
21 #"ntfs"
22 #"cifs"
23 ];
24
25 # The serial ports listed here are:
26 # - ttyS0: for Tegra (Jetson TK1)
27 # - ttymxc0: for i.MX6 (Wandboard)
28 # - ttyAMA0: for Allwinner (pcDuino3 Nano) and QEMU's -machine virt
29 # - ttyO0: for OMAP (BeagleBone Black)
30 # - ttySAC2: for Exynos (ODROID-XU3)
31 boot.consoleLogLevel = lib.mkDefault 7;
32 boot.kernelParams = [
33 "console=ttyS0,115200n8"
34 "console=ttymxc0,115200n8"
35 "console=ttyAMA0,115200n8"
36 "console=ttyO0,115200n8"
37 "console=ttySAC2,115200n8"
38 "console=tty0"
39 ];
40 boot.kernelPatches = [
41 /*
42 {
43 name = "0001-core_pattern-fix-too-small-CORENAME_MAX_SIZE";
44 patch = ../../../nixpkgs/patches/linux/0001-core_pattern-fix-too-small-CORENAME_MAX_SIZE.patch;
45 extraConfig = ''
46 '';
47 }
48 */
49 ];
50
51 #nixpkgs.config.allowUnfree = true;
52 #nixpkgs.crossSystem = lib.systems.examples.armv7l-hf-multiplatform;
53 nixpkgs.overlays = [
54 (_final: super: {
55 # https://linux-sunxi.org/Mali_Open_Source_Driver#Configuration_and_Build
56 mesa = super.mesa.override {
57 eglPlatforms = [ "x11" ];
58 enableGalliumNine = false;
59 galliumDrivers = [ "lima" "panfrost" "kmsro" "swrast" ];
60 vulkanDrivers = [ ];
61 };
62 })
63 (_final: super: {
64 linuxPackages_latest_Cubieboard2 = super.linuxPackages_latest.extend (_kfinal: ksuper: {
65 kernel = ksuper.kernel.override {
66 defconfig = "sunxi_defconfig";
67 structuredExtraConfig = with lib.kernel; {
68 # Workaround https://github.com/NixOS/nixpkgs/pull/141942#issuecomment-954301443
69 DEBUG_INFO = lib.mkForce no;
70 DEBUG_INFO_BTF = lib.mkForce no;
71 SUSPEND = no;
72 PM = no;
73 PM_SLEEP = no;
74 NVME_CORE = no;
75 TORTURE_TEST = no; # TODO: check if it's possible
76 USB_SERIAL_CH341 = module;
77 USB_SERIAL_PL2303 = module;
78 REGULATOR = lib.mkForce no;
79 MFD_CORE = no;
80 PCI = yes;
81
82 #
83 # File systems
84 #
85 EXT4_FS = yes;
86 EXT4_USE_FOR_EXT2 = yes;
87 FUSE_FS = module;
88 PSTORE = yes;
89 CONFIGFS_FS = module;
90 VFAT_FS = yes;
91 ZSWAP = yes;
92
93 # misc
94 DAX = module;
95 DRM_DISPLAY_CONNECTOR = module;
96 FB_SIMPLE = lib.mkForce module;
97 NET_SCH_CODEL = module;
98 NET_SCH_FQ_CODEL = module;
99 UIO = module;
100
101 # WiFi
102 # Not built in the Cubieboard2, require an USB dongle
103 WIRELESS = yes;
104 CFG80211 = module;
105 LIB80211 = module;
106 LIB80211_CRYPT_CCMP = module;
107 MAC80211 = module;
108 MAC80211_HWSIM = module;
109 NETDEVICES = yes;
110 WLAN = yes;
111 WLAN_VENDOR_REALTEK = yes;
112 NET_VENDOR_REALTEK = yes;
113 REALTEK_PHY = yes;
114 RTL_CARDS = module;
115 RTL8188EE = module; # For 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
116 RTLWIFI = module;
117 RTLWIFI_PCI = module;
118 RTLWIFI_DEBUG = yes;
119
120 # Sound options
121 SND_SOC_ADI = no;
122 SND_SOC_ADI_AXI_I2S = no;
123 SND_SOC_ADI_AXI_SPDIF = no;
124 SND_SOC_AMD_ACP = no;
125 SND_SOC_AMD_CZ_RT5645_MACH = no;
126 SND_ATMEL_SOC = no;
127 SND_SOC_MIKROE_PROTO = no;
128 SND_BCM63XX_I2S_WHISTLER = no;
129 SND_DESIGNWARE_I2S = no;
130 SND_SOC_FSL_ASRC = no;
131 SND_SOC_FSL_SAI = no;
132 SND_SOC_FSL_MQS = no;
133 SND_SOC_FSL_AUDMIX = no;
134 SND_SOC_FSL_SSI = no;
135 SND_SOC_FSL_SPDIF = no;
136 SND_SOC_FSL_ESAI = no;
137 SND_SOC_FSL_MICFIL = no;
138 SND_SOC_FSL_EASRC = no;
139 SND_SOC_FSL_XCVR = no;
140 SND_SOC_FSL_RPMSG = no;
141 SND_SOC_IMX_AUDMUX = no;
142 SND_I2S_HI6210_I2S = no;
143 SND_SOC_MTK_BTCVSD = no;
144 SND_SOC_XILINX_I2S = no;
145 SND_SOC_XILINX_AUDIO_FORMATTER = no;
146 SND_SOC_XILINX_SPDIF = no;
147 SND_SOC_XTFPGA_I2S = no;
148 SND_SOC_AC97_CODEC = no;
149 SND_SOC_ADAU_UTILS = no;
150 SND_SOC_ADAU1372 = no;
151 SND_SOC_ADAU1372_I2C = no;
152 SND_SOC_ADAU1372_SPI = no;
153 SND_SOC_ADAU1701 = no;
154 SND_SOC_ADAU17X1 = no;
155 SND_SOC_ADAU1761 = no;
156 SND_SOC_ADAU1761_I2C = no;
157 SND_SOC_ADAU1761_SPI = no;
158 SND_SOC_ADAU7002 = no;
159 SND_SOC_ADAU7118 = no;
160 SND_SOC_ADAU7118_HW = no;
161 SND_SOC_ADAU7118_I2C = no;
162 SND_SOC_AK4104 = no;
163 SND_SOC_AK4118 = no;
164 SND_SOC_AK4458 = no;
165 SND_SOC_AK4554 = no;
166 SND_SOC_AK4613 = no;
167 SND_SOC_AK4642 = no;
168 SND_SOC_AK5386 = no;
169 SND_SOC_AK5558 = no;
170 SND_SOC_ALC5623 = no;
171 SND_SOC_BD28623 = no;
172 SND_SOC_BT_SCO = no;
173 SND_SOC_CPCAP = no;
174 SND_SOC_CS35L32 = no;
175 SND_SOC_CS35L33 = no;
176 SND_SOC_CS35L34 = no;
177 SND_SOC_CS35L35 = no;
178 SND_SOC_CS35L36 = no;
179 SND_SOC_CS42L42 = no;
180 SND_SOC_CS42L51 = no;
181 SND_SOC_CS42L51_I2C = no;
182 SND_SOC_CS42L52 = no;
183 SND_SOC_CS42L56 = no;
184 SND_SOC_CS42L73 = no;
185 SND_SOC_CS4234 = no;
186 SND_SOC_CS4265 = no;
187 SND_SOC_CS4270 = no;
188 SND_SOC_CS4271 = no;
189 SND_SOC_CS4271_I2C = no;
190 SND_SOC_CS4271_SPI = no;
191 SND_SOC_CS42XX8 = no;
192 SND_SOC_CS42XX8_I2C = no;
193 SND_SOC_CS43130 = no;
194 SND_SOC_CS4341 = no;
195 SND_SOC_CS4349 = no;
196 SND_SOC_CS53L30 = no;
197 SND_SOC_CX2072X = no;
198 SND_SOC_DA7213 = no;
199 SND_SOC_DMIC = no;
200 SND_SOC_HDMI_CODEC = no;
201 SND_SOC_ES7134 = no;
202 SND_SOC_ES7241 = no;
203 SND_SOC_ES8316 = no;
204 SND_SOC_ES8328 = no;
205 SND_SOC_ES8328_I2C = no;
206 SND_SOC_ES8328_SPI = no;
207 SND_SOC_GTM601 = no;
208 SND_SOC_INNO_RK3036 = no;
209 SND_SOC_MAX98088 = no;
210 SND_SOC_MAX98357A = no;
211 SND_SOC_MAX98504 = no;
212 SND_SOC_MAX9867 = no;
213 SND_SOC_MAX98927 = no;
214 SND_SOC_MAX98373 = no;
215 SND_SOC_MAX98373_I2C = no;
216 SND_SOC_MAX98373_SDW = no;
217 SND_SOC_MAX98390 = no;
218 SND_SOC_MAX9860 = no;
219 SND_SOC_MSM8916_WCD_ANALOG = no;
220 SND_SOC_MSM8916_WCD_DIGITAL = no;
221 SND_SOC_PCM1681 = no;
222 SND_SOC_PCM1789 = no;
223 SND_SOC_PCM1789_I2C = no;
224 SND_SOC_PCM179X = no;
225 SND_SOC_PCM179X_I2C = no;
226 SND_SOC_PCM179X_SPI = no;
227 SND_SOC_PCM186X = no;
228 SND_SOC_PCM186X_I2C = no;
229 SND_SOC_PCM186X_SPI = no;
230 SND_SOC_PCM3060 = no;
231 SND_SOC_PCM3060_I2C = no;
232 SND_SOC_PCM3060_SPI = no;
233 SND_SOC_PCM3168A = no;
234 SND_SOC_PCM3168A_I2C = no;
235 SND_SOC_PCM3168A_SPI = no;
236 SND_SOC_PCM5102A = no;
237 SND_SOC_PCM512x = no;
238 SND_SOC_PCM512x_I2C = no;
239 SND_SOC_PCM512x_SPI = no;
240 SND_SOC_RK3328 = no;
241 SND_SOC_RK817 = no;
242 SND_SOC_RL6231 = no;
243 SND_SOC_RT1308_SDW = no;
244 SND_SOC_RT1316_SDW = no;
245 SND_SOC_RT5616 = no;
246 SND_SOC_RT5631 = no;
247 SND_SOC_RT5640 = no;
248 SND_SOC_RT5645 = no;
249 SND_SOC_RT5659 = no;
250 SND_SOC_RT5682 = no;
251 SND_SOC_RT5682_SDW = no;
252 SND_SOC_RT700 = no;
253 SND_SOC_RT700_SDW = no;
254 SND_SOC_RT711 = no;
255 SND_SOC_RT711_SDW = no;
256 SND_SOC_RT711_SDCA_SDW = no;
257 SND_SOC_RT715 = no;
258 SND_SOC_RT715_SDW = no;
259 SND_SOC_RT715_SDCA_SDW = no;
260 SND_SOC_SGTL5000 = no;
261 SND_SOC_SIGMADSP = no;
262 SND_SOC_SIGMADSP_I2C = no;
263 SND_SOC_SIGMADSP_REGMAP = no;
264 SND_SOC_SIMPLE_AMPLIFIER = no;
265 SND_SOC_SIMPLE_MUX = no;
266 SND_SOC_SPDIF = no;
267 SND_SOC_SSM2305 = no;
268 SND_SOC_SSM2518 = no;
269 SND_SOC_SSM2602 = no;
270 SND_SOC_SSM2602_SPI = no;
271 SND_SOC_SSM2602_I2C = no;
272 SND_SOC_SSM4567 = no;
273 SND_SOC_STA32X = no;
274 SND_SOC_STA350 = no;
275 SND_SOC_STI_SAS = no;
276 SND_SOC_TAS2552 = no;
277 SND_SOC_TAS2562 = no;
278 SND_SOC_TAS2764 = no;
279 SND_SOC_TAS2770 = no;
280 SND_SOC_TAS5086 = no;
281 SND_SOC_TAS571X = no;
282 SND_SOC_TAS5720 = no;
283 SND_SOC_TAS6424 = no;
284 SND_SOC_TDA7419 = no;
285 SND_SOC_TFA9879 = no;
286 SND_SOC_TFA989X = no;
287 SND_SOC_TLV320AIC23 = no;
288 SND_SOC_TLV320AIC23_I2C = no;
289 SND_SOC_TLV320AIC23_SPI = no;
290 SND_SOC_TLV320AIC31XX = no;
291 SND_SOC_TLV320AIC32X4 = no;
292 SND_SOC_TLV320AIC32X4_I2C = no;
293 SND_SOC_TLV320AIC32X4_SPI = no;
294 SND_SOC_TLV320AIC3X = no;
295 SND_SOC_TLV320AIC3X_I2C = no;
296 SND_SOC_TLV320AIC3X_SPI = no;
297 SND_SOC_TLV320ADCX140 = no;
298 SND_SOC_TS3A227E = no;
299 SND_SOC_TSCS42XX = no;
300 SND_SOC_TSCS454 = no;
301 SND_SOC_UDA1334 = no;
302 SND_SOC_WCD9335 = no;
303 SND_SOC_WCD_MBHC = no;
304 SND_SOC_WCD934X = no;
305 SND_SOC_WCD938X = no;
306 SND_SOC_WCD938X_SDW = no;
307 SND_SOC_WM8510 = no;
308 SND_SOC_WM8523 = no;
309 SND_SOC_WM8524 = no;
310 SND_SOC_WM8580 = no;
311 SND_SOC_WM8711 = no;
312 SND_SOC_WM8728 = no;
313 SND_SOC_WM8731 = no;
314 SND_SOC_WM8737 = no;
315 SND_SOC_WM8741 = no;
316 SND_SOC_WM8750 = no;
317 SND_SOC_WM8753 = no;
318 SND_SOC_WM8770 = no;
319 SND_SOC_WM8776 = no;
320 SND_SOC_WM8782 = no;
321 SND_SOC_WM8804 = no;
322 SND_SOC_WM8804_I2C = no;
323 SND_SOC_WM8804_SPI = no;
324 SND_SOC_WM8903 = no;
325 SND_SOC_WM8904 = no;
326 SND_SOC_WM8960 = no;
327 SND_SOC_WM8962 = no;
328 SND_SOC_WM8974 = no;
329 SND_SOC_WM8978 = no;
330 SND_SOC_WM8985 = no;
331 SND_SOC_WSA881X = no;
332 SND_SOC_ZL38060 = no;
333 SND_SOC_MAX9759 = no;
334 SND_SOC_MT6351 = no;
335 SND_SOC_MT6358 = no;
336 SND_SOC_MT6660 = no;
337 SND_SOC_NAU8315 = no;
338 SND_SOC_NAU8540 = no;
339 SND_SOC_NAU8810 = no;
340 SND_SOC_NAU8822 = no;
341 SND_SOC_NAU8824 = no;
342 SND_SOC_TPA6130A2 = no;
343 SND_SOC_LPASS_WSA_MACRO = no;
344 SND_SOC_LPASS_VA_MACRO = no;
345 SND_SOC_LPASS_RX_MACRO = no;
346 SND_SOC_LPASS_TX_MACRO = no;
347 SND_SIMPLE_CARD_UTILS = no;
348 SND_SIMPLE_CARD = no;
349 SND_AUDIO_GRAPH_CARD = no;
350 SND_VIRTIO = no;
351 MOST_SND = no;
352
353 #
354 # Networking options
355 #
356 TCP_CONG_BBR = module;
357 #PPP = no;
358 #PPP_MULTILINK = lib.mkForce no;
359 #PPP_FILTER = lib.mkForce no;
360 #PPPOE = no;
361 NET_DSA = no;
362 L2TP = no;
363 PARPORT = no;
364 PARIDE = no;
365 CDROM = no;
366 GPIOLIB = no;
367 NEW_LEDS = no;
368 #LEDS_CLASS = no;
369
370 IPV6 = yes;
371 IPV6_ROUTER_PREF = yes;
372 IPV6_ROUTE_INFO = yes;
373 IPV6_OPTIMISTIC_DAD = yes;
374 INET6_AH = module;
375 INET6_ESP = module;
376 INET6_ESP_OFFLOAD = module;
377 INET6_ESPINTCP = yes;
378 INET6_IPCOMP = module;
379 IPV6_MIP6 = module;
380 IPV6_ILA = module;
381 INET6_XFRM_TUNNEL = module;
382 INET6_TUNNEL = module;
383 IPV6_VTI = module;
384 IPV6_SIT = module;
385 IPV6_SIT_6RD = yes;
386 IPV6_NDISC_NODETYPE = yes;
387 IPV6_TUNNEL = module;
388 IPV6_MULTIPLE_TABLES = yes;
389 IPV6_SUBTREES = yes;
390 IPV6_MROUTE = yes;
391 IPV6_MROUTE_MULTIPLE_TABLES = yes;
392 IPV6_PIMSM_V2 = yes;
393 IPV6_SEG6_LWTUNNEL = yes;
394 IPV6_SEG6_HMAC = yes;
395 IPV6_RPL_LWTUNNEL = yes;
396 # CONFIG_MPTCP is not set
397 # CONFIG_NETWORK_SECMARK is not set
398 NET_PTP_CLASSIFY = yes;
399 # CONFIG_NETWORK_PHY_TIMESTAMPING is not set
400 NETFILTER = yes;
401 NETFILTER_ADVANCED = yes;
402
403 #
404 # Core Netfilter Configuration
405 #
406 NETFILTER_INGRESS = yes;
407 NETFILTER_NETLINK = module;
408 NETFILTER_FAMILY_ARP = yes;
409 NETFILTER_NETLINK_HOOK = module;
410 NETFILTER_NETLINK_ACCT = module;
411 NETFILTER_NETLINK_QUEUE = module;
412 NETFILTER_NETLINK_LOG = module;
413 NETFILTER_NETLINK_OSF = module;
414 NF_CONNTRACK = module;
415 NF_LOG_SYSLOG = module;
416 NETFILTER_CONNCOUNT = module;
417 NF_CONNTRACK_MARK = yes;
418 NF_CONNTRACK_ZONES = yes;
419 NF_CONNTRACK_PROCFS = yes;
420 NF_CONNTRACK_EVENTS = yes;
421 NF_CONNTRACK_TIMEOUT = yes;
422 NF_CONNTRACK_TIMESTAMP = yes;
423 NF_CONNTRACK_LABELS = yes;
424 NF_CT_PROTO_DCCP = yes;
425 NF_CT_PROTO_SCTP = yes;
426 NF_CT_PROTO_UDPLITE = yes;
427 # CONFIG_NF_CONNTRACK_AMANDA is not set
428 # CONFIG_NF_CONNTRACK_FTP is not set
429 # CONFIG_NF_CONNTRACK_H323 is not set
430 # CONFIG_NF_CONNTRACK_IRC is not set
431 # CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
432 # CONFIG_NF_CONNTRACK_SNMP is not set
433 # CONFIG_NF_CONNTRACK_PPTP is not set
434 # CONFIG_NF_CONNTRACK_SANE is not set
435 # CONFIG_NF_CONNTRACK_SIP is not set
436 # CONFIG_NF_CONNTRACK_TFTP is not set
437 NF_CT_NETLINK = module;
438 NF_CT_NETLINK_TIMEOUT = module;
439 NF_CT_NETLINK_HELPER = module;
440 NETFILTER_NETLINK_GLUE_CT = yes;
441 NF_NAT = module;
442 NF_NAT_REDIRECT = yes;
443 NF_NAT_MASQUERADE = yes;
444 NETFILTER_SYNPROXY = module;
445 NF_TABLES = module;
446 NF_TABLES_INET = yes;
447 NF_TABLES_NETDEV = yes;
448 NFT_NUMGEN = module;
449 NFT_CT = module;
450 NFT_COUNTER = module;
451 NFT_CONNLIMIT = module;
452 NFT_LOG = module;
453 NFT_LIMIT = module;
454 NFT_MASQ = module;
455 NFT_REDIR = module;
456 NFT_NAT = module;
457 NFT_TUNNEL = module;
458 NFT_OBJREF = module;
459 NFT_QUEUE = module;
460 NFT_QUOTA = module;
461 NFT_REJECT = module;
462 NFT_REJECT_INET = module;
463 NFT_COMPAT = module;
464 NFT_HASH = module;
465 NFT_FIB = module;
466 NFT_FIB_INET = module;
467 NFT_XFRM = module;
468 NFT_SOCKET = module;
469 NFT_OSF = module;
470 NFT_TPROXY = module;
471 NFT_SYNPROXY = module;
472 NF_DUP_NETDEV = module;
473 NFT_DUP_NETDEV = module;
474 NFT_FWD_NETDEV = module;
475 NFT_FIB_NETDEV = module;
476 NFT_REJECT_NETDEV = module;
477 # CONFIG_NF_FLOW_TABLE is not set
478 NETFILTER_XTABLES = module;
479
480 #
481 # Xtables combined modules
482 #
483 NETFILTER_XT_MARK = module;
484 NETFILTER_XT_CONNMARK = module;
485 NETFILTER_XT_SET = module;
486
487 #
488 # Xtables targets
489 #
490 NETFILTER_XT_TARGET_CHECKSUM = module;
491 NETFILTER_XT_TARGET_CLASSIFY = module;
492 NETFILTER_XT_TARGET_CONNMARK = module;
493 NETFILTER_XT_TARGET_CT = module;
494 NETFILTER_XT_TARGET_DSCP = module;
495 NETFILTER_XT_TARGET_HL = module;
496 NETFILTER_XT_TARGET_HMARK = module;
497 NETFILTER_XT_TARGET_IDLETIMER = module;
498 NETFILTER_XT_TARGET_LED = module;
499 NETFILTER_XT_TARGET_LOG = module;
500 NETFILTER_XT_TARGET_MARK = module;
501 NETFILTER_XT_NAT = module;
502 NETFILTER_XT_TARGET_NETMAP = module;
503 NETFILTER_XT_TARGET_NFLOG = module;
504 NETFILTER_XT_TARGET_NFQUEUE = module;
505 NETFILTER_XT_TARGET_NOTRACK = module;
506 NETFILTER_XT_TARGET_RATEEST = module;
507 NETFILTER_XT_TARGET_REDIRECT = module;
508 NETFILTER_XT_TARGET_MASQUERADE = module;
509 NETFILTER_XT_TARGET_TEE = module;
510 NETFILTER_XT_TARGET_TPROXY = module;
511 NETFILTER_XT_TARGET_TRACE = module;
512 NETFILTER_XT_TARGET_TCPMSS = module;
513 NETFILTER_XT_TARGET_TCPOPTSTRIP = module;
514
515 #
516 # Xtables matches
517 #
518 NETFILTER_XT_MATCH_ADDRTYPE = module;
519 NETFILTER_XT_MATCH_BPF = module;
520 NETFILTER_XT_MATCH_CGROUP = module;
521 NETFILTER_XT_MATCH_CLUSTER = module;
522 NETFILTER_XT_MATCH_COMMENT = module;
523 NETFILTER_XT_MATCH_CONNBYTES = module;
524 NETFILTER_XT_MATCH_CONNLABEL = module;
525 NETFILTER_XT_MATCH_CONNLIMIT = module;
526 NETFILTER_XT_MATCH_CONNMARK = module;
527 NETFILTER_XT_MATCH_CONNTRACK = module;
528 NETFILTER_XT_MATCH_CPU = module;
529 NETFILTER_XT_MATCH_DCCP = module;
530 NETFILTER_XT_MATCH_DEVGROUP = module;
531 NETFILTER_XT_MATCH_DSCP = module;
532 NETFILTER_XT_MATCH_ECN = module;
533 NETFILTER_XT_MATCH_ESP = module;
534 NETFILTER_XT_MATCH_HASHLIMIT = module;
535 NETFILTER_XT_MATCH_HELPER = module;
536 NETFILTER_XT_MATCH_HL = module;
537 NETFILTER_XT_MATCH_IPCOMP = module;
538 NETFILTER_XT_MATCH_IPRANGE = module;
539 NETFILTER_XT_MATCH_L2TP = module;
540 NETFILTER_XT_MATCH_LENGTH = module;
541 NETFILTER_XT_MATCH_LIMIT = module;
542 NETFILTER_XT_MATCH_MAC = module;
543 NETFILTER_XT_MATCH_MARK = module;
544 NETFILTER_XT_MATCH_MULTIPORT = module;
545 NETFILTER_XT_MATCH_NFACCT = module;
546 NETFILTER_XT_MATCH_OSF = module;
547 NETFILTER_XT_MATCH_OWNER = module;
548 # CONFIG_NETFILTER_XT_MATCH_POLICY is not set
549 NETFILTER_XT_MATCH_PKTTYPE = module;
550 NETFILTER_XT_MATCH_QUOTA = module;
551 NETFILTER_XT_MATCH_RATEEST = module;
552 NETFILTER_XT_MATCH_REALM = module;
553 NETFILTER_XT_MATCH_RECENT = module;
554 NETFILTER_XT_MATCH_SCTP = module;
555 NETFILTER_XT_MATCH_SOCKET = module;
556 NETFILTER_XT_MATCH_STATE = module;
557 NETFILTER_XT_MATCH_STATISTIC = module;
558 NETFILTER_XT_MATCH_STRING = module;
559 NETFILTER_XT_MATCH_TCPMSS = module;
560 NETFILTER_XT_MATCH_TIME = module;
561 NETFILTER_XT_MATCH_U32 = module;
562 # end of Core Netfilter Configuration
563
564 IP_SET = module;
565 IP_SET_MAX.freeform = "256";
566 IP_SET_BITMAP_IP = module;
567 IP_SET_BITMAP_IPMAC = module;
568 IP_SET_BITMAP_PORT = module;
569 IP_SET_HASH_IP = module;
570 IP_SET_HASH_IPMARK = module;
571 IP_SET_HASH_IPPORT = module;
572 IP_SET_HASH_IPPORTIP = module;
573 IP_SET_HASH_IPPORTNET = module;
574 IP_SET_HASH_IPMAC = module;
575 IP_SET_HASH_MAC = module;
576 IP_SET_HASH_NETPORTNET = module;
577 IP_SET_HASH_NET = module;
578 IP_SET_HASH_NETNET = module;
579 IP_SET_HASH_NETPORT = module;
580 IP_SET_HASH_NETIFACE = module;
581 IP_SET_LIST_SET = module;
582 # CONFIG_IP_VS is not set
583
584 #
585 # IP: Netfilter Configuration
586 #
587 NF_DEFRAG_IPV4 = module;
588 NF_SOCKET_IPV4 = module;
589 NF_TPROXY_IPV4 = module;
590 NF_TABLES_IPV4 = yes;
591 NFT_REJECT_IPV4 = module;
592 NFT_DUP_IPV4 = module;
593 NFT_FIB_IPV4 = module;
594 # CONFIG_NF_TABLES_ARP is not set
595 NF_DUP_IPV4 = module;
596 # CONFIG_NF_LOG_ARP is not set
597 # CONFIG_NF_LOG_IPV4 is not set
598 NF_REJECT_IPV4 = module;
599 IP_NF_IPTABLES = module;
600 IP_NF_MATCH_AH = module;
601 IP_NF_MATCH_ECN = module;
602 IP_NF_MATCH_RPFILTER = module;
603 IP_NF_MATCH_TTL = module;
604 IP_NF_FILTER = module;
605 IP_NF_TARGET_REJECT = module;
606 IP_NF_TARGET_SYNPROXY = module;
607 IP_NF_NAT = module;
608 IP_NF_TARGET_MASQUERADE = module;
609 IP_NF_TARGET_NETMAP = module;
610 IP_NF_TARGET_REDIRECT = module;
611 IP_NF_MANGLE = module;
612 IP_NF_TARGET_CLUSTERIP = module;
613 IP_NF_TARGET_ECN = module;
614 IP_NF_TARGET_TTL = module;
615 # CONFIG_IP_NF_RAW is not set
616 # CONFIG_IP_NF_ARPTABLES is not set
617 # end of IP: Netfilter Configuration
618
619 #
620 # IPv6: Netfilter Configuration
621 #
622 NF_SOCKET_IPV6 = module;
623 NF_TPROXY_IPV6 = module;
624 NF_TABLES_IPV6 = yes;
625 NFT_REJECT_IPV6 = module;
626 NFT_DUP_IPV6 = module;
627 NFT_FIB_IPV6 = module;
628 NF_DUP_IPV6 = module;
629 NF_REJECT_IPV6 = module;
630 NF_LOG_IPV6 = module;
631 IP6_NF_IPTABLES = module;
632 IP6_NF_MATCH_AH = module;
633 IP6_NF_MATCH_EUI64 = module;
634 IP6_NF_MATCH_FRAG = module;
635 IP6_NF_MATCH_OPTS = module;
636 IP6_NF_MATCH_HL = module;
637 IP6_NF_MATCH_IPV6HEADER = module;
638 IP6_NF_MATCH_MH = module;
639 IP6_NF_MATCH_RPFILTER = module;
640 IP6_NF_MATCH_RT = module;
641 IP6_NF_MATCH_SRH = module;
642 IP6_NF_TARGET_HL = module;
643 IP6_NF_FILTER = module;
644 IP6_NF_TARGET_REJECT = module;
645 IP6_NF_TARGET_SYNPROXY = module;
646 IP6_NF_MANGLE = module;
647 IP6_NF_RAW = module;
648 IP6_NF_NAT = module;
649 IP6_NF_TARGET_MASQUERADE = module;
650 IP6_NF_TARGET_NPT = module;
651 # end of IPv6: Netfilter Configuration
652
653 NF_DEFRAG_IPV6 = module;
654
655 #
656 # Disabling
657 #
658 ADFS_FS = no;
659 AFFS_FS = no;
660 BEFS_FS = no;
661 BFS_FS = no;
662 BTRFS = no;
663 BTRFS_FS = no;
664 CEPH_FS = no;
665 CIFS = no;
666 CRAMFS = no;
667 ECRYPT_FS = no;
668 EFS_FS = no;
669 EROFS_FS = no;
670 EXT2_FS = no;
671 EXT3_FS = no;
672 F2FS_FS = lib.mkForce no;
673 GFS2_FS = no;
674 HFSPLUS_FS = no;
675 HFS_FS = no;
676 HPFS_FS = no;
677 JFS_FS = no;
678 MINIX_FS = no;
679 NET_9P = no;
680 NFSD = no;
681 NFS_FS = no;
682 NILFS2_FS = no;
683 OMFS_FS = no;
684 ORANGEFS_FS = no;
685 QNX4FS_FS = no;
686 QNX6FS_FS = no;
687 REISERFS_FS = no;
688 ROMFS_FS = no;
689 SQUASHFS = no;
690 SYSV_FS = no;
691 UFS_FS = no;
692 VXFS_FS = no;
693 XFS_FS = no;
694
695 MISC_FILESYSTEMS = no;
696
697 DECNET = no;
698 SCTP = no;
699 RDS = no;
700 DCCP = no;
701 TIPC = no;
702 CAIF = no;
703 CEPH = no;
704 VMW_SOCK = no;
705 HSR = no;
706 QRTR = no;
707 MPI = no;
708 RAID6 = no;
709 STAGING = lib.mkForce no;
710 ATH11K_PCI = no;
711
712 "6LOWPAN" = no;
713 ARCNET = no;
714 B53 = no;
715 BATMAN_ADV = no;
716 BT = no;
717 CAN = no;
718 COMEDI = no;
719 DRM_STM = lib.mkForce no;
720 DRM_PANEL = lib.mkForce no;
721
722 DRM_BRIDGE = no;
723 DRM_PANEL_BRIDGE = no;
724 DRM_CDNS_DSI = no;
725 DRM_CHIPONE_ICN6211 = no;
726 DRM_CHRONTEL_CH7033 = no;
727 #DRM_DISPLAY_CONNECTOR = no;
728 DRM_LONTIUM_LT8912B = no;
729 DRM_LONTIUM_LT9611 = no;
730 DRM_LONTIUM_LT9611UXC = no;
731 DRM_ITE_IT66121 = no;
732 DRM_LVDS_CODEC = no;
733 DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW = no;
734 DRM_NWL_MIPI_DSI = no;
735 DRM_NXP_PTN3460 = no;
736 DRM_PARADE_PS8622 = no;
737 DRM_PARADE_PS8640 = no;
738 DRM_SIL_SII8620 = no;
739 DRM_SII902X = no;
740 DRM_SII9234 = no;
741 DRM_SIMPLE_BRIDGE = no;
742 DRM_THINE_THC63LVD1024 = no;
743 DRM_TOSHIBA_TC358762 = no;
744 DRM_TOSHIBA_TC358764 = no;
745 DRM_TOSHIBA_TC358767 = no;
746 DRM_TOSHIBA_TC358768 = no;
747 DRM_TOSHIBA_TC358775 = no;
748 DRM_TI_TFP410 = no;
749 DRM_TI_SN65DSI83 = no;
750 DRM_TI_SN65DSI86 = no;
751 DRM_TI_TPD12S015 = no;
752 DRM_ANALOGIX_ANX6345 = no;
753 DRM_ANALOGIX_ANX78XX = no;
754 DRM_ANALOGIX_DP = no;
755 DRM_ANALOGIX_ANX7625 = no;
756 DRM_I2C_ADV7511 = no;
757 DRM_I2C_ADV7511_CEC = no;
758 DRM_CDNS_MHDP8546 = no;
759 DRM_DW_HDMI = no;
760 DRM_DW_HDMI_AHB_AUDIO = no;
761 DRM_DW_HDMI_I2S_AUDIO = no;
762 DRM_DW_HDMI_CEC = no;
763 DRM_STI = no;
764 DRM_IMX = no;
765 DRM_IMX_PARALLEL_DISPLAY = no;
766 DRM_IMX_TVE = no;
767 DRM_IMX_LDB = no;
768 DRM_IMX_HDMI = no;
769 DRM_ETNAVIV = no;
770 DRM_ETNAVIV_THERMAL = no;
771 DRM_MXS = no;
772 DRM_MXSFB = no;
773 DRM_ARCPGU = no;
774 DRM_GM12U320 = no;
775 TINYDRM_HX8357D = no;
776 TINYDRM_ILI9225 = no;
777 TINYDRM_ILI9341 = no;
778 TINYDRM_ILI9486 = no;
779 TINYDRM_MI0283QT = no;
780 TINYDRM_REPAPER = no;
781 TINYDRM_ST7586 = no;
782 TINYDRM_ST7735R = no;
783 DRM_PL111 = no;
784 DRM_TVE200 = no;
785 DRM_LIMA = no;
786 DRM_PANFROST = no;
787 DRM_MCDE = no;
788 DRM_TIDSS = no;
789 DRM_GUD = no;
790 DRM_EXPORT_FOR_TESTS = no;
791 DRM_PANEL_ORIENTATION_QUIRKS = no;
792 DRM_LIB_RANDOM = no;
793
794 INFINIBAND = lib.mkForce no;
795 INPUT_TOUCHSCREEN = no;
796 MEDIA_ANALOG_TV_SUPPORT = lib.mkForce no;
797 MEDIA_DIGITAL_TV_SUPPORT = lib.mkForce no;
798 MEDIA_TUNER = no;
799 MPLS = no;
800 MPTCP = lib.mkForce no;
801 NFC = no;
802 NF_TABLES_BRIDGE = lib.mkForce no;
803 NVME = no;
804 OPENVSWITCH = no;
805 PARAVIRT = lib.mkForce no;
806 POWER_SUPPLY = no;
807 USB_GSPCA = lib.mkForce no;
808 VIDEO_STK1160_COMMON = lib.mkForce no;
809 XEN = lib.mkForce no;
810 #NVME_CORE = no;
811 };
812 features.debug = false;
813 #ignoreConfigErrors = true;
814 };
815 });
816 })
817 ];
818 boot.tmp.cleanOnBoot = true;
819 boot.tmp.useTmpfs = lib.mkForce false;
820 # TODO: is that needed?
821 hardware.enableRedistributableFirmware = true;
822 sdImage = {
823 postBuildCommands = ''
824 dd if=${pkgs.ubootCubieboard2}/u-boot-sunxi-with-spl.bin of=$img bs=1024 seek=8 conv=notrunc
825 '';
826 compressImage = true;
827 expandOnBoot = true;
828 firmwareSize = 1;
829 populateFirmwareCommands = "";
830 populateRootCommands = ''
831 mkdir -p ./files/boot
832 ${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
833 '';
834 };
835 boot.loader.grub.enable = false;
836 boot.loader.generic-extlinux-compatible.enable = true;
837 # nix -L build .#nixosConfigurations.${hostName}.config.boot.kernelPackages.kernel.configfile
838 boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest_Cubieboard2;
839 boot.initrd.availableKernelModules = lib.mkForce [
840 "mmc_block"
841 "usbhid"
842 "hid_generic"
843 "hid_microsoft"
844 ];
845 }