2024-05-03 21:32:27 +00:00
|
|
|
# Minisforum UM340
|
2024-05-07 22:02:59 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
modulesPath,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
boot = {
|
|
|
|
supportedFilesystems = [ "btrfs" ];
|
|
|
|
kernelModules = [ "kvm-amd" ];
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
initrd = {
|
|
|
|
supportedFilesystems = [ "btrfs" ];
|
|
|
|
availableKernelModules = [
|
|
|
|
"nvme"
|
|
|
|
"xhci_pci"
|
|
|
|
"ahci"
|
|
|
|
"usb_storage"
|
|
|
|
"usbhid"
|
|
|
|
"sd_mod"
|
|
|
|
"btrfs"
|
|
|
|
];
|
|
|
|
kernelModules = [ ];
|
|
|
|
};
|
2024-05-16 16:19:04 +00:00
|
|
|
|
|
|
|
# Enable mdadm for Sapana (RAID 5 primary storage).
|
|
|
|
swraid = {
|
|
|
|
enable = true;
|
2024-06-24 22:28:22 +00:00
|
|
|
mdadmConf = ''
|
2024-05-16 16:19:04 +00:00
|
|
|
ARRAY /dev/md/Sapana metadata=1.2 UUID=51076daf:efdb34dd:bce48342:3b549fcb
|
2024-05-16 17:35:11 +00:00
|
|
|
MAILADDR ${config.secrets.users.aires.email}
|
2024-05-16 16:19:04 +00:00
|
|
|
'';
|
|
|
|
};
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-uuid/2c76c660-3573-4622-8771-f23fa7ee302a";
|
|
|
|
fsType = "btrfs";
|
2024-06-09 18:36:40 +00:00
|
|
|
options = [ "subvol=@,compress=zstd,discard" ];
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
|
|
|
"/home" = {
|
|
|
|
device = "/dev/disk/by-uuid/2c76c660-3573-4622-8771-f23fa7ee302a";
|
|
|
|
fsType = "btrfs";
|
2024-06-09 18:36:40 +00:00
|
|
|
options = [ "subvol=@home,compress=zstd,discard" ];
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
|
|
|
"/swap" = {
|
|
|
|
device = "/dev/disk/by-uuid/2c76c660-3573-4622-8771-f23fa7ee302a";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "subvol=@swap" ];
|
|
|
|
};
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/0120-A755";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "/swap/swapfile";
|
|
|
|
size = 16384;
|
|
|
|
}
|
|
|
|
];
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
networking = {
|
|
|
|
useDHCP = lib.mkDefault true;
|
|
|
|
hostName = "Haven";
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2024-02-29 14:53:34 +00:00
|
|
|
}
|