Update
This commit is contained in:
parent
cd5194967a
commit
a1c3fc3649
2 changed files with 88 additions and 0 deletions
51
raspberry-pi/rpi4-configuration.nix
Normal file
51
raspberry-pi/rpi4-configuration.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# This configuration worked on 09-03-2021 nixos-unstable @ commit 102eb68ceec
|
||||
# The image used https://hydra.nixos.org/build/134720986
|
||||
|
||||
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 = "20.09";
|
||||
}
|
37
server/test-configuration.nix
Normal file
37
server/test-configuration.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, ... }: # A pinned version of Nixpkgs passed to the configuration by Nix
|
||||
|
||||
{
|
||||
# Enable Nix flakes and the unified Nix CLI
|
||||
nix.settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
|
||||
# Networking configuration
|
||||
networking.hostName = "fedora-p1";
|
||||
|
||||
# Enable OpenSSH
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Root filesystem
|
||||
fileSystems."/" = {
|
||||
device = "/dev/sda1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# Create a user
|
||||
users.users.albert = {
|
||||
isNormalUser = false;
|
||||
initialPassword = "Password";
|
||||
};
|
||||
|
||||
# CLI tools, language runtimes, shells, and other desired packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
jq
|
||||
wget
|
||||
git
|
||||
python
|
||||
openssl
|
||||
zsh
|
||||
];
|
||||
}sssss
|
Loading…
Reference in a new issue