mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
still working
This commit is contained in:
parent
64235f2775
commit
0712b63194
14 changed files with 508 additions and 174 deletions
73
sysConfig/desktop/hardware.nix
Normal file
73
sysConfig/desktop/hardware.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
# Kernel
|
||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [ "intel_iommu=on" ];
|
||||
boot.kernelModules = [ "kvm-intel" "virtio" "vfio-pci" "coretemp" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Bootloader
|
||||
boot.loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
useOSProber = true;
|
||||
devices = [ "nodev" ];
|
||||
efiSupport = true;
|
||||
configurationLimit = 5;
|
||||
};
|
||||
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
# FStab
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/af24c5b3-8a6e-4333-a61d-922a97928cae";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/1639ee20-28d6-4649-814d-ba981c138b35";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/74B9-4AAF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
# GPU
|
||||
programs.sway.extraOptions = "--unsupported-gpu";
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware = {
|
||||
opengl.enable = true;
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
modesetting.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Virtualisation
|
||||
nix.system-features = "kvm";
|
||||
environment.systemPackages = pkgs.virt-manager;
|
||||
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
runAsRoot = true;
|
||||
ovmf.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# CPU
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue