dotfiles/nixos/boxes/homescreen/default.nix

61 lines
1.4 KiB
Nix
Raw Normal View History

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;
2022-08-04 09:55:56 +01:00
2021-12-04 21:47:27 +00:00
networking = {
2022-08-04 09:55:56 +01:00
hostName = "homescreen";
2022-03-10 12:25:23 +00:00
networkmanager = { enable = true; };
2021-12-04 21:47:27 +00:00
};
2022-08-04 09:55:56 +01:00
environment.systemPackages = with pkgs; [ neovim htop btop atop ];
2021-12-04 21:47:27 +00:00
services.fail2ban.enable = true;
services.openssh = {
enable = true;
permitRootLogin = "prohibit-password";
passwordAuthentication = false;
};
2022-08-04 09:55:56 +01:00
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
2021-12-04 21:47:27 +00:00
users.extraUsers.root.openssh.authorizedKeys.keys = [
2022-08-04 09:55:56 +01:00
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEo4R+6J3h6Ix3xWpOMdU7Es1/YxFchHw0c+kcCOJxFb cyryl@foureighty"
2021-12-04 21:47:27 +00:00
];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
security.allowUserNamespaces = true;
time.timeZone = "Europe/London";
2022-08-04 09:55:56 +01:00
system.stateVersion = "22.05";
2021-12-04 21:47:27 +00:00
}