2020-12-06 10:53:40 +01:00
|
|
|
{ config, lib, modulesPath, pkgs, ... }:
|
2020-10-17 23:18:22 +02:00
|
|
|
|
|
|
|
{
|
2020-12-06 10:53:40 +01:00
|
|
|
imports = [
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
];
|
2020-10-17 23:18:22 +02:00
|
|
|
|
2020-12-06 10:53:40 +01:00
|
|
|
boot = {
|
|
|
|
kernelModules = [ "kvm-intel" ];
|
|
|
|
extraModulePackages = [ ];
|
2021-05-04 23:15:05 +02:00
|
|
|
loader.grub.device = "/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_250GB_S4EUNJ0N412342P";
|
2020-12-06 10:53:40 +01:00
|
|
|
initrd = {
|
2021-05-04 23:15:05 +02:00
|
|
|
availableKernelModules = [ "aesni_intel" "ahci" "ehci_pci" "nvme" "sd_mod" "sr_mod" "usb_storage" "usbhid" "xhci_pci" ];
|
2022-04-03 08:30:22 +02:00
|
|
|
kernelModules = [ "dm-snapshot" "sg" ];
|
2020-12-06 11:03:23 +01:00
|
|
|
luks.devices = {
|
|
|
|
root = {
|
|
|
|
name = "root";
|
2021-05-04 23:15:05 +02:00
|
|
|
device = "/dev/disk/by-uuid/1607bb2a-329b-4252-b11a-b43eb6b7bf0c";
|
2020-12-06 11:03:23 +01:00
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
|
|
|
};
|
|
|
|
};
|
2020-12-06 10:53:40 +01:00
|
|
|
};
|
|
|
|
};
|
2020-10-17 23:18:22 +02:00
|
|
|
|
2020-12-06 10:53:40 +01:00
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
2021-05-04 23:15:05 +02:00
|
|
|
device = "/dev/disk/by-uuid/9e6b279e-6995-44da-b673-21b9e23a5278";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "discard=async" "noatime" "compress=zstd" ];
|
2020-10-17 23:18:22 +02:00
|
|
|
};
|
|
|
|
|
2020-12-06 10:53:40 +01:00
|
|
|
"/boot" = {
|
2021-05-04 23:15:05 +02:00
|
|
|
device = "/dev/disk/by-uuid/7b8b75d2-f779-4a49-b09d-b2a1bbd801bb";
|
2020-10-17 23:18:22 +02:00
|
|
|
fsType = "ext2";
|
|
|
|
};
|
2020-12-06 11:03:23 +01:00
|
|
|
|
|
|
|
"/data" = {
|
|
|
|
device = "/dev/mapper/data";
|
2021-05-04 23:15:05 +02:00
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "compress=zstd" ];
|
2020-12-06 11:03:23 +01:00
|
|
|
encrypted = {
|
|
|
|
label = "data";
|
|
|
|
enable = true;
|
2021-05-04 23:15:05 +02:00
|
|
|
blkDev = "/dev/disk/by-uuid/7f4ba71e-3aca-4294-b37f-49f37b584dbd";
|
|
|
|
keyFile = "/mnt-root/root/luks-data";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
"/data/ssd" = {
|
|
|
|
device = "/dev/mapper/data-ssd";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "discard=async" "noatime" "compress=zstd" ];
|
|
|
|
encrypted = {
|
2021-05-07 14:37:53 +02:00
|
|
|
# !!! HACK
|
|
|
|
label = "data-ssd --allow-discards";
|
2021-05-04 23:15:05 +02:00
|
|
|
enable = true;
|
|
|
|
blkDev = "/dev/disk/by-uuid/41baa168-7fa0-4eb3-b314-50766ddf126d";
|
2021-03-01 15:27:18 +01:00
|
|
|
keyFile = "/mnt-root/root/luks-data";
|
2020-12-06 11:03:23 +01:00
|
|
|
};
|
|
|
|
};
|
2020-12-06 10:53:40 +01:00
|
|
|
};
|
2020-10-17 23:18:22 +02:00
|
|
|
|
2020-12-06 10:53:40 +01:00
|
|
|
swapDevices = [
|
2021-05-04 23:15:05 +02:00
|
|
|
{ device = "/dev/disk/by-uuid/2774d182-ddc9-4d79-886e-995fcd60a88a"; }
|
2020-12-06 10:53:40 +01:00
|
|
|
];
|
2020-10-17 23:18:22 +02:00
|
|
|
|
2021-01-29 15:54:59 +01:00
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
2021-01-29 15:50:16 +01:00
|
|
|
|
|
|
|
# GPU
|
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
|
|
rocm-opencl-icd
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
clinfo
|
2021-05-24 22:12:33 +02:00
|
|
|
radeontop
|
2021-01-29 15:50:16 +01:00
|
|
|
rocm-smi
|
|
|
|
];
|
2020-10-17 23:18:22 +02:00
|
|
|
}
|