{
networking.hostName = "brontes";
mjm.profiles.raspberry-pi.enable = true;
system.stateVersion = "21.03";
<<config>>
_class = "nixos";
}brontes is a Raspberry Pi 4B that doesn't really have a purpose at the moment. It can be a useful test machine for common infrastructure.
=> raspberry-pi profile module
fileSystems."/persist" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
neededForBoot = true;
};
mjm.state.persistDir = "/persist";
system.etc.overlay.mutable = false;brontes is using a transient root filesystem, so persistent content from /var is bind-mounted into place from /persist/var. This setup also makes it easy to use the immutable etc overlay.
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/59BB-AB82";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};My Raspberry Pi systems use firmware that supports UEFI, so I need an ESP to use with systemd-boot.
swapDevices = [
{
device = "/persist/swap";
size = 8 * 1024;
}
];
boot.zswap.enable = true;brontes has an 8G swap file. Since it has disk-backed swap, it can use zswap.
mjm.server.enable = true;
This machine is running as a server, so it needs the common server infrastructure for my lab.
boot.kernelParams = [ "acpi=force" ];
Raspberry Pis running UEFI firmware can support either devicetree or ACPI. It seems like by default, they will choose to use devicetree. From what I can tell, ACPI doesn't currently expose the fan for the PoE hat that I use in a way that it can actually be used. So I leave DT enabled for the other two Pis that are doing real work. On this one that is basically idle, I have ACPI forced on to be able to investigate how it behaves if I want. It's okay that the fan doesn't come on for this one: the machine doesn't really do much and doesn't get particularly hot.
mjm.nut = {
enable = true;
connectedUPSName = "or500";
};All physical hosts in my homelab run NUT to be able to be shutdown properly in the case of power loss. Since I have two UPSes in the rack, each machine is configured with the one it is connected to, so that will be the one that it monitors.
text/gemini;lang=en-USThis content has been proxied by September (UNKNO).