Clean up config & add comments.

This commit is contained in:
Fern Garden 2025-07-16 18:46:12 +08:00
parent b504700e61
commit c2fc35e12d
18 changed files with 162 additions and 114 deletions

57
hosts/weebill/default.nix Normal file
View file

@ -0,0 +1,57 @@
{pkgs, ...}: {
# Boot loader.
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = [
"xhci_pci"
"usbhid"
"usb_storage"
];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
fileSystems = {
# Root filesystem.
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = ["noatime"];
};
# AFP share.
"/srv/iMac" = {
device = "/dev/disk/by-uuid/48843b25-4d8c-4638-a5f8-fb3901e1165e";
fsType = "ext4";
};
};
# Enable WebOne HTTP proxy.
services.webone.enable = true;
# Enable Netatalk AFP fileserver.
services.netatalk = {
enable = true;
settings = {
Global = {
"uam list" = "uams_guest.so";
};
iMac = {
path = "/srv/iMac";
browsable = "yes";
"read-only" = "yes";
};
};
};
# Open ports for services.
networking.firewall = {
allowedUDPPorts = [
53 # DHCP server.
67 # DHCP server.
];
allowedTCPPorts = [8080 548]; # WebOne & Netatalk.
};
}