hitagi: Reinstall in VM
This commit is contained in:
parent
7cb1698467
commit
0c381b35ef
|
@ -6,54 +6,43 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
sbruder.machine.isVm = true;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
# Intel arc
|
# Intel arc
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
# fan control configuration from https://gist.github.com/bakman2/e801f342aaa7cade62d7bd54fd3eabd8
|
kernelParams = [ "console=ttyS0" ];
|
||||||
kernelModules = [ "kvm-amd" "it87" ];
|
|
||||||
kernelParams = [ "acpi_enforce_resources=lax" ]; # allow it87 to load
|
|
||||||
extraModulePackages = with config.boot.kernelPackages; [ it87 ];
|
|
||||||
extraModprobeConfig = ''
|
|
||||||
options it87 force_id=0x8688
|
|
||||||
'';
|
|
||||||
loader = {
|
loader = {
|
||||||
grub.enable = false;
|
grub.enable = false;
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "aesni_intel" "ahci" "ehci_pci" "nvme" "sd_mod" "sr_mod" "usb_storage" "usbhid" "xhci_pci" ];
|
availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "virtio_blk" ];
|
||||||
kernelModules = [ "dm-snapshot" ];
|
kernelModules = [ "dm-snapshot" ];
|
||||||
luks.devices = {
|
|
||||||
root = {
|
|
||||||
name = "root";
|
|
||||||
device = "/dev/disk/by-uuid/63c6aa7c-47c5-43f5-b0eb-c32b0768327b";
|
|
||||||
preLVM = true;
|
|
||||||
allowDiscards = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-uuid/3994f497-9848-459e-9642-cbc14a7d3c97";
|
device = "/dev/disk/by-uuid/db6c8826-ea3c-4bd6-bcb3-5a9ae3089519";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "discard=async" "noatime" "compress=zstd" ];
|
options = [ "discard=async" "noatime" "compress=zstd" "ssd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/96B6-34BD";
|
device = "/dev/disk/by-uuid/77DB-CC39";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
"/data/steam" = {
|
||||||
{ device = "/dev/disk/by-uuid/98de7ced-4d7c-4915-bf5b-1a0300458ea6"; }
|
device = "steam";
|
||||||
];
|
fsType = "virtiofs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# GPU
|
# GPU
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
|
@ -81,57 +70,4 @@
|
||||||
capabilities = "cap_perfmon+p";
|
capabilities = "cap_perfmon+p";
|
||||||
source = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top";
|
source = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://www.reddit.com/r/gigabyte/comments/p5ewjn/b550i_pro_ax_f13_bios_sleep_issue_on_linux/
|
|
||||||
systemd.services.suspend-fix = {
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
description = "Fix suspend";
|
|
||||||
|
|
||||||
script = ''
|
|
||||||
if grep -q "GPP0 .* \*enabled" /proc/acpi/wakeup; then
|
|
||||||
echo GPP0 > /proc/acpi/wakeup
|
|
||||||
echo "Disabled wakeup for GPP0"
|
|
||||||
else
|
|
||||||
echo "Wakeup for GPP0 already disabled"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sbruder.fancontrol = {
|
|
||||||
enable = false; # no hwmon for intel arc (yet)
|
|
||||||
enableDefaultMapping = true;
|
|
||||||
fans = {
|
|
||||||
front = {
|
|
||||||
pwmFile = "/sys/class/hwmon/hwmon1/pwm4";
|
|
||||||
rpmFile = "/sys/class/hwmon/hwmon1/fan4_input";
|
|
||||||
pwmLineStart = 50;
|
|
||||||
neverStop = true;
|
|
||||||
};
|
|
||||||
back = {
|
|
||||||
pwmFile = "/sys/class/hwmon/hwmon1/pwm2";
|
|
||||||
rpmFile = "/sys/class/hwmon/hwmon1/fan2_input";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
sensors = {
|
|
||||||
cpu = {
|
|
||||||
file = "/sys/class/hwmon/hwmon2/temp3_input";
|
|
||||||
min = 50;
|
|
||||||
max = 80;
|
|
||||||
};
|
|
||||||
gpu = {
|
|
||||||
file = "/sys/class/hwmon/hwmon4/temp1_input";
|
|
||||||
min = 50;
|
|
||||||
max = 70;
|
|
||||||
};
|
|
||||||
nvme = {
|
|
||||||
file = "/sys/class/hwmon/hwmon0/temp1_input";
|
|
||||||
min = 40;
|
|
||||||
max = 70;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue