reorganization & hardware

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

View file

@ -1,8 +1,6 @@
{ config, lib, pkgs, ... }:
let
in {
{
imports = [
./hardware.nix
./webapps/default.nix
@ -51,5 +49,6 @@ in {
};
# enable network manager - probably not the best on a single server but Oh Well
# perhaps i could move it next to my router for easier ethernet access
networking.networkmanager.enable = true;
}

View file

@ -1,33 +1,32 @@
{ 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 = [ ];
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 +36,4 @@
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}

View file

@ -39,7 +39,7 @@ in {
locations."/f/".extraConfig = ''
add_header Access-Control-Allow-Origin "*";
'';
# we should perhaps add something to help with this in staticsites?
# TODO: we should perhaps add something to help with this in staticSites?
extraConfig = ''
error_page 404 /404.html;
'';