2021-07-10 13:39:40 -06:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
kernelPackages = pkgs.linuxPackages_rpi4;
|
|
|
|
tmpOnTmpfs = true;
|
|
|
|
loader = {
|
|
|
|
grub.enable = false;
|
|
|
|
generic-extlinux-compatible.enable = true;
|
|
|
|
raspberryPi = {
|
|
|
|
enable = true;
|
|
|
|
version = 4;
|
|
|
|
firmwareConfig = ''
|
|
|
|
dtparam=audio=on
|
|
|
|
hdmi_drive=2
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
|
|
|
networking.useDHCP = false;
|
|
|
|
networking.interfaces.eth0.useDHCP = true;
|
|
|
|
networking.interfaces.wlan0.useDHCP = true;
|
|
|
|
|
|
|
|
powerManagement.cpuFreqGovernor = "ondemand";
|
|
|
|
|
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-label/NIXOS_SD";
|
|
|
|
fsType = "ext4";
|
|
|
|
options = [ "noatime" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
raspberrypi-eeprom
|
2021-07-11 22:13:10 -06:00
|
|
|
piclone
|
2021-07-10 13:39:40 -06:00
|
|
|
];
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
autoOptimiseStore = true;
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|