tweak: host configs
This commit is contained in:
parent
22b0967adf
commit
faaec49338
2 changed files with 41 additions and 39 deletions
|
|
@ -58,16 +58,36 @@
|
||||||
timeout = lib.mkDefault 5;
|
timeout = lib.mkDefault 5;
|
||||||
};
|
};
|
||||||
initrd.systemd.enable = true;
|
initrd.systemd.enable = true;
|
||||||
};
|
};i
|
||||||
|
|
||||||
|
# cpu settings
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
# gpu monitoring and control
|
# gpu monitoring and control
|
||||||
services.lact = {
|
services.lact = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
hardware.amdgpu.overdrive = {
|
|
||||||
enable = true;
|
# gpu firmware - https://nixos.wiki/wiki/AMD_GPU
|
||||||
#ppfeaturemask = "0xfffd7fff"; # default
|
boot = {
|
||||||
ppfeaturemask = "0xffffffff"; # all overdrive features
|
# gpu drivers during boot and pre boot
|
||||||
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
# exposes gpu drivers to system
|
||||||
|
kernelModules = [ "amdgpu" "kvm-amd" ];
|
||||||
|
};
|
||||||
|
hardware = {
|
||||||
|
# amd discrete graphics support
|
||||||
|
graphics.enable = true;
|
||||||
|
amdgpu = {
|
||||||
|
# fixes early video issues
|
||||||
|
initrd.enable = true;
|
||||||
|
# amd sanctioned overclocking
|
||||||
|
overdrive = {
|
||||||
|
enable = true;
|
||||||
|
#ppfeaturemask = "0xfffd7fff"; # default
|
||||||
|
ppfeaturemask = "0xffffffff"; # all overdrive features
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# fstrim for ssd
|
# fstrim for ssd
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,7 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
# important
|
# important
|
||||||
imports = [
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
# kernel modules to include
|
# kernel modules to include
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
|
|
@ -31,34 +29,11 @@
|
||||||
"sd_mod"
|
"sd_mod"
|
||||||
];
|
];
|
||||||
|
|
||||||
# enable amd radeon gpu drivers
|
# generic kernel module options
|
||||||
# https://nixos.wiki/wiki/AMD_GPU
|
|
||||||
boot = {
|
boot = {
|
||||||
# exposes gpu drivers
|
initrd.kernelModules = [ ];
|
||||||
kernelModules = [
|
kernelModules = [ "kvm-amd" ];
|
||||||
"amdgpu"
|
extraModulePackages = [ ];
|
||||||
"kvm-amd"
|
|
||||||
];
|
|
||||||
# gpu drivers during boot and pre boot
|
|
||||||
initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
};
|
|
||||||
hardware = {
|
|
||||||
# discrete graphics support
|
|
||||||
graphics.enable = true;
|
|
||||||
# fixes early video issues
|
|
||||||
amdgpu.initrd.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# luks device mapping
|
|
||||||
boot.initrd.luks.devices."luks-35440a88-293e-455b-a018-ee1086b07321".device =
|
|
||||||
"/dev/disk/by-uuid/35440a88-293e-455b-a018-ee1086b07321";
|
|
||||||
boot.initrd.luks.devices."luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d".device =
|
|
||||||
"/dev/disk/by-uuid/55f7d546-fac9-4ea0-a21e-4c50ecc0d67d";
|
|
||||||
|
|
||||||
# root partition
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/mapper/luks-35440a88-293e-455b-a018-ee1086b07321";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# boot partition
|
# boot partition
|
||||||
|
|
@ -71,15 +46,22 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# swap
|
# root device configuration
|
||||||
|
boot.initrd.luks.devices."luks-35440a88-293e-455b-a018-ee1086b07321".device =
|
||||||
|
"/dev/disk/by-uuid/35440a88-293e-455b-a018-ee1086b07321";
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/mapper/luks-35440a88-293e-455b-a018-ee1086b07321";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# swap device configuration
|
||||||
|
boot.initrd.luks.devices."luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d".device =
|
||||||
|
"/dev/disk/by-uuid/55f7d546-fac9-4ea0-a21e-4c50ecc0d67d";
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "/dev/mapper/luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d";
|
device = "/dev/mapper/luks-55f7d546-fac9-4ea0-a21e-4c50ecc0d67d";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# enables cpu microcode updates
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue