1
0
Fork 0
nix-configuration/hosts/Haven/hardware-configuration.nix

59 lines
1.2 KiB
Nix
Raw Normal View History

# Minisforum UM340
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
2024-02-29 09:53:34 -05:00
2024-06-02 14:16:44 -04:00
# Format and configure the disk using Disko
host.base.disko = {
enable = false;
primaryDisk = "nvme0n1";
enableTPM = true;
swapFile = {
enable = true;
size = "16G";
};
};
boot = {
supportedFilesystems = [ "btrfs" ];
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
2024-02-29 09:53:34 -05:00
initrd = {
supportedFilesystems = [ "btrfs" ];
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
"btrfs"
];
kernelModules = [ ];
};
2024-05-16 12:19:04 -04:00
# Enable mdadm for Sapana (RAID 5 primary storage).
swraid = {
enable = true;
mdadmConf = lib.mkIf (config.networking.hostName == "Haven") ''
ARRAY /dev/md/Sapana metadata=1.2 UUID=51076daf:efdb34dd:bce48342:3b549fcb
MAILADDR ${config.secrets.users.aires.email}
2024-05-16 12:19:04 -04:00
'';
};
};
2024-02-29 09:53:34 -05:00
networking = {
useDHCP = lib.mkDefault true;
hostName = "Haven";
};
2024-02-29 09:53:34 -05:00
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
2024-02-29 09:53:34 -05:00
}