diff options
Diffstat (limited to 'machines/rpi3-amadeus/minimal.nix')
-rw-r--r-- | machines/rpi3-amadeus/minimal.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/machines/rpi3-amadeus/minimal.nix b/machines/rpi3-amadeus/minimal.nix new file mode 100644 index 0000000..3f2acc7 --- /dev/null +++ b/machines/rpi3-amadeus/minimal.nix @@ -0,0 +1,32 @@ +{ 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; + + # !!! If your board is a Raspberry Pi 3, select not latest (5.8 at the time) + # !!! as it is currently broken (see https://github.com/NixOS/nixpkgs/issues/97064) + boot.kernelPackages = pkgs.linuxPackages; + + # !!! 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 = { + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + }; + }; + + + services.openssh.enable = true; + services.openssh.permitRootLogin = "yes"; + + + # !!! Adding a swap file is optional, but strongly recommended! + swapDevices = [ { device = "/swapfile"; size = 1024; } ]; +} |