53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{ config, pkgs, inputs, lib, ... }: {
|
|
imports = [ ];
|
|
boot = {
|
|
kernelPackages = pkgs.linuxPackages_rpi4;
|
|
tmpOnTmpfs = true;
|
|
initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
|
|
kernelParams = [
|
|
"8250.nr_uarts=1"
|
|
"console=ttyAMA0,115200"
|
|
"console=tty1"
|
|
# Some gui programs need this
|
|
"cma=128M"
|
|
];
|
|
};
|
|
|
|
boot.loader.raspberryPi = {
|
|
enable = true;
|
|
version = 4;
|
|
};
|
|
boot.loader.grub.enable = false;
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
|
networking = {
|
|
hostName = "rpi4-8";
|
|
networkmanager = { enable = true; };
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [ neovim htop ];
|
|
|
|
services.fail2ban.enable = true;
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
permitRootLogin = "prohibit-password";
|
|
passwordAuthentication = false;
|
|
};
|
|
|
|
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE5Ejx5CAPUfHVXi4GL4WmnZaG8eiiOmsW/a0o1bs1GF cyryl@foureighty"
|
|
];
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "/dev/disk/by-label/NIXOS_SD";
|
|
fsType = "ext4";
|
|
options = [ "noatime" ];
|
|
};
|
|
};
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
|
|
security.allowUserNamespaces = true;
|
|
|
|
time.timeZone = "Europe/London";
|
|
|
|
}
|