NixOS-Config/hosts/kitty/hardware/default.nix
2024-11-12 04:25:51 -05:00

101 lines
2.3 KiB
Nix

{ config, lib, pkgs, modulesPath, ... }:
{
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@${config.domains.jim2}";
};
};
# Main root
fileSystems = {
"/" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@" ];
};
"/home" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
"/nix" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@nix" ];
};
"/var" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@var" ];
};
"/srv/minecraft" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@minecraft" "compress=zstd" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/CD94-1D3F";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
# Files
"/export/JimboNFS/Downloads" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@downloads" "compress=zstd" ];
};
"/export/JimboNFS/Documents" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@docs" "compress=zstd" ];
};
# Media
"/export/JimboNFS/Photos" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@photos" "compress=zstd" ];
};
"/export/JimboNFS/Videos" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@videos" "compress=zstd" ];
};
# Music
"/export/JimboNFS/Music" = {
device = "/dev/server/root";
fsType = "btrfs";
options = [ "subvol=@music" "compress=zstd" ];
};
};
swapDevices = [
{ device = "/dev/server/root/swap"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}