Created
July 19, 2021 14:39
-
-
Save SCOTT-HAMILTON/b4bd3eee0c2ae85e8ff91c702e59dab7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, lib, ... }: | |
let | |
user = "nixos"; | |
password = "nixos"; | |
SSID = "MyBox"; | |
SSIDpassword = "..."; | |
interface = "wlan0"; | |
hostname = "MyPi"; | |
in { | |
imports = ["${fetchTarball "https://github.com/NixOS/nixos-hardware/archive/936e4649098d6a5e0762058cb7687be1b2d90550.tar.gz" }/raspberry-pi/4"]; | |
fileSystems = { | |
"/" = { | |
device = "/dev/disk/by-label/NIXOS_SD"; | |
fsType = "ext4"; | |
options = [ "noatime" ]; | |
}; | |
}; | |
networking = { | |
hostName = hostname; | |
wireless = { | |
enable = true; | |
networks."${SSID}".psk = SSIDpassword; | |
interfaces = [ interface ]; | |
}; | |
}; | |
environment.systemPackages = with pkgs; [ vim ]; | |
services.openssh.enable = true; | |
users = { | |
mutableUsers = false; | |
users."${user}" = { | |
isNormalUser = true; | |
password = password; | |
extraGroups = [ "wheel" ]; | |
}; | |
}; | |
# Enable GPU acceleration | |
hardware.raspberry-pi."4".fkms-3d.enable = true; | |
hardware.enableRedistributableFirmware = true; | |
hardware.pulseaudio.enable = true; | |
sound.enable = true; | |
boot.loader.raspberryPi.firmwareConfig = '' | |
dtparam=audio=on | |
''; | |
boot.kernelParams = [ | |
"console=ttyS1,115200n8" | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment