2019-10-11 14:26:37 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
# NixOS wants to enable GRUB by default
|
|
|
|
boot.loader.grub.enable = false;
|
|
|
|
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
2019-10-11 19:14:18 +02:00
|
|
|
|
2019-10-11 14:26:37 +02:00
|
|
|
# !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this:
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
2019-10-11 19:14:18 +02:00
|
|
|
|
|
|
|
# A bunch of boot parameters needed for optimal runtime on RPi 3B
|
2019-10-15 00:12:22 +02:00
|
|
|
boot.kernelParams = ["cma=32M"];
|
2019-10-11 19:14:18 +02:00
|
|
|
boot.loader.raspberryPi.enable = true;
|
|
|
|
boot.loader.raspberryPi.version = 3;
|
|
|
|
boot.loader.raspberryPi.uboot.enable = true;
|
2019-10-16 18:40:50 +02:00
|
|
|
boot.loader.raspberryPi.firmwareConfig = ''
|
|
|
|
hdmi_force_hotplug=1
|
|
|
|
'';
|
2019-10-11 19:14:18 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
raspberrypi-tools
|
2019-10-17 01:28:40 +02:00
|
|
|
(import ./vim.nix)
|
2019-10-11 19:14:18 +02:00
|
|
|
];
|
|
|
|
|
2019-10-11 14:26:37 +02:00
|
|
|
# File systems configuration for using the installer's partition layout
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-label/NIXOS_SD";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
};
|
2019-10-11 19:14:18 +02:00
|
|
|
|
2019-10-11 14:26:37 +02:00
|
|
|
# !!! Adding a swap file is optional, but strongly recommended!
|
|
|
|
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
|
2019-10-11 19:14:18 +02:00
|
|
|
|
|
|
|
# Configure basic SSH access
|
|
|
|
services.openssh.enable = true;
|
2019-10-15 00:18:57 +02:00
|
|
|
services.openssh.permitRootLogin = "yes";
|
|
|
|
|
|
|
|
# Cleanup tmp on startup
|
|
|
|
boot.cleanTmpDir = true;
|
|
|
|
|
|
|
|
# Set hostname
|
|
|
|
networking.hostName = "zion";
|
2019-10-16 22:17:37 +02:00
|
|
|
|
2019-10-17 01:28:40 +02:00
|
|
|
# Create coolneng user
|
2019-10-16 22:17:37 +02:00
|
|
|
users.users.coolneng = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/coolneng";
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDG7JtfAqcbZV28wkNTfSWSqTOo5buH+dyT0w6SlTqq+KFh5DxREB0yGuM1UfjLpyLQ0XI7UbhCwNG28Li4yv/hwPGq63TF1kl+w4sjQKFn4bOUv1NvsfSN3oTamjfYoVsrapCiXqOvZkzEKMF47MSwOfPkqZ6ihU5V3INA0IZbl1Ri+r9MsIzvY76ZHBiF6rVqQJjdXVDbcLMViOrM56FpyK+ICo+uTkErsEbYFwevVTv9memOh778RRPesBobpZjggWOI4HXXxqk35myInYjHve9K4ox6YZMjwnwnEftONr2HyoBBcBNT+wWd1jtYxCoCWQ3vVkn4LGBDOQ3+HKb4rT3JxI66VfFyQWGJPdgJL5/ZNRlBqA7CpAtE7JaR6l7d3mCCoGW2B0atWiEXecwb8dz4CzzYm1r9Wz27L74OtPzUqcV7mQjCVDcnRsY/MtfhzyWzhB3tujVqnRtF3VrFSrm0YXS1ZWG4dltX1cfgud8s8XwwBKcFw5NdCrVxq3nRMNlGcSqbXC+RnrkK/i6ciAriZdXgFrmnBl+6qEmqIO15u2IPvDhnQs18DzRkHnPQegphhHhHix5aaqNbLfSRZNCTQaqE774X+0kuU/RWylI4muIyf4k9x+et4txeU2OC6l0W0LMpbsELzXIRr/ZBFrGHbE7/KLi8HNiAJ0KmAQ== coolneng@monolith" ];
|
|
|
|
};
|
|
|
|
|
2019-10-17 01:28:40 +02:00
|
|
|
# Set vim as default editor
|
|
|
|
programs.vim.defaultEditor = true;
|
|
|
|
|
2019-10-17 01:01:20 +02:00
|
|
|
# Import other configuration modules
|
2019-10-11 14:26:37 +02:00
|
|
|
}
|