reorganization & hardware

This commit is contained in:
Reid 2025-01-28 22:03:36 -08:00
parent b4b6ffc3b9
commit 1ae4c328f8
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
6 changed files with 48 additions and 50 deletions

View file

@ -1,33 +1,34 @@
{ config, lib, pkgs, modulesPath, ... }:
{ inputs, config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
inputs.hardware.nixosModules.common-pc-ssd
inputs.hardware.nixosModules.common-pc
# uses mkDefault to set to a patched kernel,
# but it conflicts with one of our mkDefault settings
#inputs.hardware.nixosModules.raspberry-pi-4
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
# TODO: move bootloader, networking, boot speed to another file?
kernelPackages = pkgs.linuxPackages_latest;
loader = {
# use u-boot over grub
grub.enable = lib.mkForce false;
generic-extlinux-compatible.enable = true;
};
};
(modulesPath + "/installer/scan/not-detected.nix")
];
fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
# use better power management for a device that's always on
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
# for some god forsaken reason, generic-extlinux-compatible doesn't disable grub like systemd-boot does
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
options = [ "noatime" "nodiratime" "discard" ];
};
swapDevices =
[ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
@ -37,5 +38,4 @@
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}