NixOS-Config/hosts/cyberspark/system/hardware/default.nix
2024-10-24 05:42:00 -04:00

131 lines
3.7 KiB
Nix

{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
blacklistedKernelModules = [
"pcspkr"
];
initrd = {
availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"nvme"
"usbhid"
"sd_mod"
"sr_mod"
];
kernelModules = [
"kvm-intel"
];
};
swraid = {
enable = true;
mdadmConf = "MAILADDR jimbo@jimbosfiles.com";
};
};
# Main root
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
fsType = "btrfs";
options = [ "subvol=@" ];
};
"/home" = {
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
fsType = "btrfs";
options = [ "subvol=@nix" ];
};
"/var" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@var" ];
};
"/srv/minecraft" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@minecraft" ];
};
"/.snapshots" = {
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
fsType = "btrfs";
options = [ "subvol=@snapshots" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/CD94-1D3F";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
# Atrocity of subvols
"/export/JimboNFS/Downloads" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@downloads" ];
};
"/export/JimboNFS/Documents" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@docs" ];
};
"/export/JimboNFS/Photos" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@photos" ];
};
"/export/JimboNFS/Videos/Random" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@videos-random" ];
};
"/export/JimboNFS/Videos/Media" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@videos-media" ];
};
"/export/JimboNFS/Music/Synced" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@music-synced" ];
};
"/export/JimboNFS/Music/Unsynced" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@music-unsynced" ];
};
"/export/JimboNFS/Projects" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@projects" ];
};
"/export/JimboNFS/School" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@school" ];
};
"/export/JimboNFS/Snapshots" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@snapshots" ];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/57178cfc-3e71-4d35-8c7f-e355f9dc84df"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}