2022-03-10 12:25:23 +00:00
|
|
|
{ config, pkgs, inputs, lib, ... }: {
|
|
|
|
imports = [ ];
|
2021-12-04 21:47:27 +00:00
|
|
|
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";
|
2022-03-10 12:25:23 +00:00
|
|
|
networkmanager = { enable = true; };
|
2021-12-04 21:47:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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";
|
|
|
|
|
|
|
|
}
|