melodypond/platforms/melodypond.nix

64 lines
1.5 KiB
Nix
Raw Normal View History

{pkgs, lib, modulesPath, ...}:
2023-08-03 20:00:12 +00:00
{
imports = [
"${modulesPath}/installer/sd-card/sd-image-aarch64.nix"
];
2023-08-03 20:00:12 +00:00
nixpkgs.hostPlatform.system = "aarch64-linux";
sdImage.imageName = "orange.img";
2023-09-20 22:37:50 +00:00
boot.loader.raspberryPi.version = 4;
boot.supportedFilesystems = lib.mkForce [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" ];
2023-09-20 22:37:50 +00:00
hardware.raspberry-pi."4" = {
fkms-3d.enable = true;
apply-overlays-dtmerge.enable = true;
audio.enable = false;
2023-09-20 22:37:50 +00:00
};
boot.blacklistedKernelModules = [ "snd_bcm2835" ];
2023-09-20 22:37:50 +00:00
console.enable = false;
environment.systemPackages = with pkgs; [
libraspberrypi
raspberrypi-eeprom
];
2023-08-03 20:00:12 +00:00
2023-09-20 23:19:09 +00:00
networking.hostName = "melodypond";
2023-09-29 20:26:43 +00:00
networking.interfaces.wlan0 = {
useDHCP = false;
ipv4.addresses = [{
address = "192.168.24.1";
prefixLength = 24;
}];
};
services.hostapd = {
enable = true;
interface = "wlan0";
ssid = "mmelodies";
wpaPassphrase = "myPhyzzySounds";
extraConfig = ''
ignore_broadcast_ssid=0
'';
};
services.dnsmasq = {
enable = true;
2023-09-30 03:44:55 +00:00
resolveLocalQueries = false;
2023-09-29 20:26:43 +00:00
settings = {
2023-09-30 03:44:55 +00:00
bind-interfaces = true;
expand-hosts = true;
no-hosts = true;
local = "/lan/";
domain = "lan";
2023-09-29 20:26:43 +00:00
interface = [ "wlan0" ];
dhcp-range = [ "192.168.24.100,192.168.24.200" ];
2023-09-30 03:44:55 +00:00
dhcp-option= "6,0.0.0.0";
host-record = "melodypond,melodypond.lan,192.168.24.1";
2023-09-29 20:26:43 +00:00
};
};
2023-09-30 03:44:55 +00:00
networking.firewall.allowedUDPPorts = [ 53 67 ];
2023-08-03 20:00:12 +00:00
}