NixOS-Config/hosts/cyberspark/system/hardware/default.nix

127 lines
3.8 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, modulesPath, ... }:
2024-08-24 22:16:51 -04:00
{
boot = {
blacklistedKernelModules = [
"pcspkr"
];
2024-08-24 22:16:51 -04:00
initrd = {
availableKernelModules = [
"xhci_pci"
2024-10-20 20:29:38 -04:00
"ehci_pci"
"ahci"
"nvme"
"usbhid"
"sd_mod"
"sr_mod"
2024-08-24 22:16:51 -04:00
];
kernelModules = [
"kvm-intel"
];
};
2024-10-09 03:36:08 -04:00
swraid = {
enable = true;
mdadmConf = "MAILADDR jimbo@${config.domains.jim2}";
2024-10-09 03:36:08 -04:00
};
2024-08-24 22:16:51 -04:00
};
2024-10-24 05:41:55 -04:00
# Main root
2024-08-24 22:16:51 -04:00
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" = {
2024-10-24 05:41:55 -04:00
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@var" ];
};
2024-10-24 05:41:55 -04:00
"/srv/minecraft" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@minecraft" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/.snapshots" = {
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
fsType = "btrfs";
options = [ "subvol=@snapshots" ];
2024-08-24 22:16:51 -04:00
};
"/boot" = {
device = "/dev/disk/by-uuid/CD94-1D3F";
2024-08-24 22:16:51 -04:00
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
2024-08-24 22:16:51 -04:00
};
2024-10-24 05:41:55 -04:00
# Atrocity of subvols
"/export/JimboNFS/Downloads" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@downloads" "compress=zstd" ];
};
2024-10-24 05:41:55 -04:00
"/export/JimboNFS/Documents" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@docs" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/export/JimboNFS/Photos" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@photos" "compress=zstd" ];
2024-08-24 22:16:51 -04:00
};
2024-10-24 05:41:55 -04:00
"/export/JimboNFS/Videos/Random" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@videos-random" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/export/JimboNFS/Videos/Media" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@videos-media" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/export/JimboNFS/Music/Synced" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@music-synced" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/export/JimboNFS/Music/Unsynced" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@music-unsynced" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/export/JimboNFS/Projects" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@projects" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/export/JimboNFS/School" = {
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@school" "compress=zstd" ];
2024-10-24 05:41:55 -04:00
};
"/export/JimboNFS/.snapshots" = {
2024-10-24 05:41:55 -04:00
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
fsType = "btrfs";
options = [ "subvol=@snapshots" "compress=zstd" ];
2024-09-10 14:45:28 -04:00
};
2024-08-24 22:16:51 -04:00
};
2024-09-10 15:54:45 -04:00
2024-10-24 05:41:55 -04:00
2024-08-24 22:16:51 -04:00
swapDevices = [
{ device = "/dev/disk/by-uuid/57178cfc-3e71-4d35-8c7f-e355f9dc84df"; }
2024-08-24 22:16:51 -04:00
];
2024-10-09 03:36:08 -04:00
networking.useDHCP = lib.mkDefault true;
2024-09-22 14:46:51 -04:00
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2024-08-24 22:16:51 -04:00
}