Add preliminaries for bakersfield rpi4

This commit is contained in:
albert 2024-04-24 10:40:47 +09:00
parent 687a0f78b7
commit daee10acee
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
5 changed files with 76 additions and 17 deletions

View file

@ -6,7 +6,8 @@ keys:
- &host_milan-linode-01 264f9137377eda3b95c82c86cebd6d17984b8d4e
- &host_piaware-rpi4 4216b645667670a6130bb95a72a56f8269cd0818
- &host_backups-rpi4 8b37122bb46dc98c208002d65e94778ecd94bd4e
- &host_quitman-rpi4 7184f4fb827fbacf3d4100c24eb80976cfdd8975
- &host_quitman-rpi4
- &host_bakersfield-rpi4
creation_rules:
- path_regex: secrets\/secrets\.yaml$
@ -19,7 +20,6 @@ creation_rules:
- *host_framework-server
- *host_piaware-rpi4
- *host_backups-rpi4
- *host_quitman-rpi4
- path_regex: secrets\/wireguard\.yaml$
key_groups:

View file

@ -22,15 +22,16 @@ nix develop -c /etc/nixos/git/docs/setup.sh
# Machines
| Name | Description | Status |
| ----------------- | ----------------------------------------------------- | -------- |
| backups-rpi4 | Japan Raspberry Pi 4 for backups from nuc-server | Done |
| framework-server | sysctl.io - main server, framework 13th gen mainboard | Done |
| nixos-desktop | My main desktop | Done |
| nixos-framework | My AMD Framework 13 laptop | Done |
| osaka-linode-01 | Osaka Linode relay for sysctl.io external connections | Done |
| milan-linode-01 | Milan Linode DERP relay for Tailscale | Done |
| piaware-rpi4 | FlightAware for Raspberry Pi | Done |
| ----------------- | ------------------------------------------------------ | -------- |
| backups-rpi4 | Japan Raspberry Pi 4 for backups from nuc-server | Complete |
| framework-server | sysctl.io - main server, framework 13th gen mainboard | Complete |
| nixos-desktop | My main desktop | Complete |
| nixos-framework | My AMD Framework 13 laptop | Complete |
| osaka-linode-01 | Osaka Linode relay for sysctl.io external connections | Complete |
| milan-linode-01 | Milan Linode DERP relay for Tailscale | Complete |
| piaware-rpi4 | FlightAware for Raspberry Pi | Complete |
| quitman-rpi4 | Raspberry Pi at my parents house. Headscale Exit Node | On Hold |
| bakersfield-rpi4 | Raspberry Pi at my brothers house. Headscale Exit Node | Complete |
| nuc-server | Second NUC server at my brothers house | On Hold |
# Images

View file

@ -0,0 +1,58 @@
{ lib, pkgs, modulesPath, ... }: {
imports = [
# inputs.nixos-hardware.nixosModules.raspberry-pi-4
(modulesPath + "/installer/scan/not-detected.nix")
../../common/services/tailscale-autoconnect.nix
];
# Enable distributed Builds
nix.distributedBuilds = true;
console.enable = true;
environment.systemPackages = with pkgs; [
libraspberrypi
raspberrypi-eeprom
];
# Set your time zone.
time.timeZone = "America/Los_Angeles";
#####################################################################################
# BEGIN hardware config
#####################################################################################
boot = {
initrd.availableKernelModules = [
"xhci_pci"
"usbhid"
"usb_storage"
"vc4"
"pcie_brcmstb" # required for the pcie bus to work
"reset-raspberrypi" # required for vl805 firmware to load
];
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
loader.generic-extlinux-compatible.enable = true;
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
hardware.enableRedistributableFirmware = true;
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
networking.hostName = "bakersfield-rpi4";
#####################################################################################
# END hardware config
#####################################################################################
services.tailscale.extraUpFlags = [ "--advertise-exit-node" ];
boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; };
}

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, system, ... }: {
{ lib, ... }: {
# Build this image with:
# nix build .#nixosConfigurations.nixos-rpi4-img.config.system.build.sdImage

View file

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, modulesPath, hostname, ... }: {
{ inputs, lib, pkgs, modulesPath, ... }: {
imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4
(modulesPath + "/installer/scan/not-detected.nix")