summaryrefslogtreecommitdiff
path: root/hostnix/weebnix/system.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hostnix/weebnix/system.nix')
-rw-r--r--hostnix/weebnix/system.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/hostnix/weebnix/system.nix b/hostnix/weebnix/system.nix
new file mode 100644
index 0000000..94dca6d
--- /dev/null
+++ b/hostnix/weebnix/system.nix
@@ -0,0 +1,45 @@
+{ 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";
+ };
+ };
+
+ time.timeZone = "America/New_York";
+}