From 0ba48ec572099b8cadd0cc578e5a0af6de6de0b4 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 11 Oct 2019 14:26:37 +0200 Subject: [PATCH] Initial commit --- configuration.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..3827763 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,30 @@ +{ 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; + + # !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this: + boot.kernelPackages = pkgs.linuxPackages_latest; + + # !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough. + # If X.org behaves weirdly (I only saw the cursor) then try increasing this to 256M. + # On a Raspberry Pi 4 with 4 GB, you should either disable this parameter or increase to at least 64M if you want the USB ports to work. + boot.kernelParams = ["cma=32M"]; + + # File systems configuration for using the installer's partition layout + fileSystems = { + "/boot" = { + device = "/dev/disk/by-label/NIXOS_BOOT"; + fsType = "vfat"; + }; + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + }; + }; + + # !!! Adding a swap file is optional, but strongly recommended! + swapDevices = [ { device = "/swapfile"; size = 1024; } ]; +}