nishimiya: Fix up

This commit is contained in:
PapaTutuWawa 2022-01-06 14:34:44 +01:00
parent 8dd411e6d9
commit c69aeddb1e
4 changed files with 9 additions and 55 deletions

View File

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = with inputs.nixos-hardware.nixosModules; [
common-cpu-intel common-pc-ssd
];
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/d06b511d-1970-421d-b006-231a7af91942"; device = "/dev/disk/by-uuid/d06b511d-1970-421d-b006-231a7af91942";
@ -14,7 +18,9 @@
swapDevices = [ ]; # TODO swapDevices = [ ]; # TODO
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci"
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/common/pc/laptop/acpi_call.nix
"acpi_call" ];
kernelModules = [ "dm-snapshot" ]; kernelModules = [ "dm-snapshot" ];
luks.devices = { luks.devices = {
cryptroot = { cryptroot = {
@ -25,6 +31,8 @@
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
# NOTE: See https://github.com/NixOS/nixos-hardware/blob/master/lenovo/thinkpad/e495/default.nix#L12
kernelParams = [ "acpi_backlight=native" ];
}; };
ptw = { ptw = {
@ -97,9 +105,6 @@
primaryInterface = "wlp5s0"; primaryInterface = "wlp5s0";
}; };
virtualisation.enable = true; virtualisation.enable = true;
hardware = {
intel.enable = true;
};
}; };
services = { services = {

View File

@ -1,13 +0,0 @@
{ config, lib, ... }:
let
cfg = config.ptw.hardware.amdcpu;
in {
options.ptw.hardware.amdcpu = {
enable = lib.mkEnableOption "Enable support for AMD CPUs";
};
config = lib.mkIf cfg.enable {
hardware.cpu.amd.updateMicrocode = true;
};
}

View File

@ -1,19 +0,0 @@
{
config, lib, pkgs, ...
}:
let
cfg = config.ptw.hardware.amdgpu;
in {
options.ptw.hardware.amdgpu = {
enable = lib.mkEnableOption "Enable support for AMDGPU GPUs";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
unstable.mesa
unstable.firmwareLinuxNonfree
];
services.xserver.videoDrivers = [ "amdgpu" ];
};
}

View File

@ -1,19 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.ptw.hardware.intel;
in {
options.ptw.hardware.intel = {
enable = lib.mkEnableOption "Enable support for Intel CPUs";
};
config = lib.mkIf cfg.enable {
hardware = {
cpu.intel.updateMicrocode = true;
# NOTE: Assuming each Intel CPU has integrated graphics
opengl.extraPackages = with pkgs; [ vaapiIntel intel-media-driver ];
};
# TODO: Remove?
services.xserver.videoDrivers = [ "modesetting" "fbdev" ];
};
}