nixos/types/rpi4.nix

43 lines
1020 B
Nix

{ config, pkgs, lib, flake-inputs, ... }:
{
imports = [
../modules/session.nix
../modules/users.nix
../modules/serial-console.nix
../modules/pragmatic-bin.nix
];
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
boot.extraModulePackages = [ ];
boot.loader = {
grub.enable = false;
generic-extlinux-compatible.enable = lib.mkForce true;
};
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
services.openssh.enable = true;
networking.firewall.enable = false;
environment.systemPackages = with pkgs; [
neovim
htop
];
systemd.network.wait-online.enable = lib.mkDefault false;
security.sudo = {
enable = true;
extraRules = [
{ users = [ "%wheel" ];
commands = [ { command = "ALL"; options = [ "NOPASSWD" ]; } ];
}
];
};
}