reorganization
This commit is contained in:
parent
f1cd1e461f
commit
f2c9e4d5b7
12 changed files with 140 additions and 30 deletions
|
|
@ -43,6 +43,13 @@
|
|||
};
|
||||
|
||||
modules = {
|
||||
core = {
|
||||
# security
|
||||
security.useDoas = true;
|
||||
};
|
||||
hardware = {
|
||||
networking.enable = true;
|
||||
};
|
||||
services = {
|
||||
ssh.enable = true;
|
||||
ssh.enableMoshSupport = true;
|
||||
|
|
@ -50,8 +57,6 @@
|
|||
postgres.enable = true;
|
||||
mysql.enable = true;
|
||||
};
|
||||
|
||||
security.useDoas = true;
|
||||
};
|
||||
|
||||
security.doas = {
|
||||
|
|
@ -65,5 +70,5 @@
|
|||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager.wifi.backend = "iwd";
|
||||
networking.networkmanager.wifi.powersave = false;
|
||||
networking.wireless.iwd.settings.Settings.AutoConnect = true;
|
||||
networking.wireless.iwd.settings.Settings.AutoConnect = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,15 +6,14 @@
|
|||
inputs.hardware.nixosModules.common-pc
|
||||
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
|
||||
./raspberry-pi-4b.nix
|
||||
];
|
||||
|
||||
# use better power management for a device that's always on
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
|
||||
# i have a couple others i don't noramlly include, such as:
|
||||
# uas (uasp, scsi over usb), usbcore (needed(???) for the drive at boot)
|
||||
# pcie_brcmstb (required for pcie), reset-raspberrypi (needed for vl805 firmware to load)
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "pcie_brcmstb" "reset-raspberrypi" "uas" "usbcore" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
|
@ -23,18 +22,10 @@
|
|||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
||||
# needed for initial framebuffer logs to appear on raspberry pi
|
||||
# i think. this fixes it but idk if they are all required
|
||||
boot.kernelParams = [
|
||||
"8250.nr_uarts=1"
|
||||
"cma=128M"
|
||||
"console=tty0"
|
||||
];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/04542424-6899-4b94-9414-fffa569f2c03";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" "nodiratime" "discard" ];
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
|||
14
hosts/nixos-server-reid/raspberry-pi-4b.nix
Normal file
14
hosts/nixos-server-reid/raspberry-pi-4b.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
# uas (uasp, scsi over usb), usbcore (needed(???) for the drive at boot)
|
||||
# pcie_brcmstb (required for pcie), reset-raspberrypi (needed for vl805 firmware to load)
|
||||
boot.initrd.availableKernelModules = [ "pcie_brcmstb" "reset-raspberrypi" "uas" "usbcore" ];
|
||||
|
||||
# needed for initial framebuffer logs to appear on raspberry pi
|
||||
# i think. this fixes it but idk if they are all required
|
||||
boot.kernelParams = [
|
||||
"8250.nr_uarts=1"
|
||||
"cma=128M"
|
||||
"console=tty0"
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue