mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 02:54:03 -06:00
Update configuration-pi4b.nix
This commit is contained in:
parent
ddee886e48
commit
f719eb4aa8
2 changed files with 56 additions and 51 deletions
|
@ -1,51 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# This configuration worked on 08-20-2022 nixos-unstable
|
||||
# The image used https://hydra.nixos.org/build/188033711
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_rpi4;
|
||||
tmpOnTmpfs = true;
|
||||
initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
|
||||
# ttyAMA0 is the serial console broken out to the GPIO
|
||||
kernelParams = [
|
||||
"8250.nr_uarts=1"
|
||||
"console=ttyAMA0,115200"
|
||||
"console=tty1"
|
||||
# A lot GUI programs need this, nearly all wayland applications
|
||||
"cma=128M"
|
||||
];
|
||||
};
|
||||
|
||||
boot.loader.raspberryPi = {
|
||||
enable = true;
|
||||
version = 4;
|
||||
};
|
||||
boot.loader.grub.enable = false;
|
||||
|
||||
# Required for the Wireless firmware
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
networking = {
|
||||
hostName = "nixos-raspi-4"; # Define your hostname.
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
autoOptimiseStore = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
# Free up to 1GiB whenever there is less than 100MiB left.
|
||||
extraOptions = ''
|
||||
min-free = ${toString (100 * 1024 * 1024)}
|
||||
max-free = ${toString (1024 * 1024 * 1024)}
|
||||
'';
|
||||
};
|
||||
system.stateVersion = "22.11";
|
||||
}
|
56
nix-configs/rpi4.nix
Normal file
56
nix-configs/rpi4.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
SSID = "Honeycutt-5G";
|
||||
SSIDpassword = "Frappe92";
|
||||
interface = "wlan0";
|
||||
hostname = "NixOS";
|
||||
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 = "NixOS";
|
||||
networkmanager.enable = true;
|
||||
|
||||
wireless = {
|
||||
enable = true;
|
||||
networks."${SSID}".psk = SSIDpassword;
|
||||
interfaces = [ interface ];
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Denver";
|
||||
|
||||
environment.systemPackages = with pkgs; [ vim ];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Define user accounts
|
||||
users.extraUsers.aaronh = {
|
||||
description = "Aaron Honeycutt";
|
||||
home = "/home/aaronh";
|
||||
extraGroups = [ "wheel" "networkmanager" "adm"];
|
||||
isNormalUser = true;
|
||||
hashedPassword = "$6$aAcbLtqiqzySifls$jdKMOQjoWITHD/dWNNZVUH/qNc6aoJ7v4zYofi0U7IJSVTbmOfChS3mzaJbp57AodjdPNKPrnrip8Nlh2Qanx.";
|
||||
};
|
||||
|
||||
# Enable GPU acceleration
|
||||
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.lightdm.enable = true;
|
||||
desktopManager.xfce.enable = true;
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue