Add new file

This commit is contained in:
Aaron Honeycutt 2022-08-21 03:09:30 +00:00
parent 0ce421de45
commit afc764ba6e

View file

@ -0,0 +1,51 @@
{ config, pkgs, lib, ... }:
{
# This configuration worked on 08-20-2022 nixos-unstable
# The image used https://hydra.nixos.org/build/188033711
boot = {
kernelPackages = pkgs.linuxPackages_rpi4;
tmpOnTmpfs = true;
initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
# ttyAMA0 is the serial console broken out to the GPIO
kernelParams = [
"8250.nr_uarts=1"
"console=ttyAMA0,115200"
"console=tty1"
# A lot GUI programs need this, nearly all wayland applications
"cma=128M"
];
};
boot.loader.raspberryPi = {
enable = true;
version = 4;
};
boot.loader.grub.enable = false;
# Required for the Wireless firmware
hardware.enableRedistributableFirmware = true;
networking = {
hostName = "nixos-raspi-4"; # Define your hostname.
networkmanager = {
enable = true;
};
};
nix = {
autoOptimiseStore = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
# Free up to 1GiB whenever there is less than 100MiB left.
extraOptions = ''
min-free = ${toString (100 * 1024 * 1024)}
max-free = ${toString (1024 * 1024 * 1024)}
'';
};
system.stateVersion = "20.09";
}