blob: f625efdc3a57d097da01567565af989da00b825f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{ pkgs, lib, ... }:
{
boot.loader.systemd-boot.enable = true;
# Raspberry Pi has no NVRAM.
boot.loader.efi.canTouchEfiVariables = false;
boot.kernelPackages = pkgs.linuxPackages_rpi4;
# https://github.com/NixOS/nixpkgs/issues/122130#issuecomment-1568815007
# It's unclear if these are strictly necessary with the downstream kernel,
# but let's leave them in to keep working with mainline.
boot.initrd.availableKernelModules = [ "uas" "pcie-brcmstb" "reset-raspberrypi" ];
networking.hostName = "weebnix";
networking.domain = "mou.fo";
# TODO secrets management or switch to wired
networking.wireless = {
enable = true;
networks."oldschool".psk = builtins.readFile /var/lib/secrets/oldschool.wpa-psk;
};
systemd.network.enable = true;
networking.dhcpcd.enable = false;
networking.tempAddresses = "disabled";
systemd.network.networks = let
default = {
networkConfig = {
DHCP = "yes";
MulticastDNS = "yes";
};
ipv6AcceptRAConfig.Token = "prefixstable"; # RFC 7217
};
in {
"10-wlan" = lib.recursiveUpdate default {
matchConfig.Name = "wlan0";
};
"10-eth" = lib.recursiveUpdate default {
matchConfig.Name = "end0";
linkConfig.RequiredForOnline = "no";
};
};
# Problematic when the clock is unreliable (Pi has no RTC).
services.resolved.dnssec = "false";
time.timeZone = "America/New_York";
}
|