2023-09-11 20:23:04 +02:00
|
|
|
{
|
|
|
|
nixpkgs,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2019-10-08 15:36:47 +02:00
|
|
|
cfg = config.machine;
|
|
|
|
in {
|
2023-09-11 20:23:04 +02:00
|
|
|
imports = ["${nixpkgs}/nixos/modules/installer/scan/not-detected.nix"];
|
2019-02-26 13:44:40 +01:00
|
|
|
|
|
|
|
boot = {
|
2019-09-29 08:09:26 +02:00
|
|
|
loader.systemd-boot = {
|
|
|
|
enable = true;
|
2023-09-11 20:23:04 +02:00
|
|
|
# signed = true;
|
|
|
|
# signing-key = "${cfg.secretPath}/secureboot/db.key";
|
|
|
|
# signing-certificate = "${cfg.secretPath}/secureboot/db.crt";
|
2019-09-29 08:09:26 +02:00
|
|
|
};
|
2019-02-26 13:44:40 +01:00
|
|
|
loader.efi.canTouchEfiVariables = true;
|
2023-04-16 18:29:48 +02:00
|
|
|
tmp = {
|
|
|
|
useTmpfs = true;
|
2023-09-11 20:23:04 +02:00
|
|
|
cleanOnBoot = true;
|
2023-04-16 18:29:48 +02:00
|
|
|
};
|
2019-05-08 20:18:52 +02:00
|
|
|
|
2020-03-11 02:33:31 +01:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2023-09-11 20:23:04 +02:00
|
|
|
initrd.availableKernelModules = ["xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc"];
|
|
|
|
kernelModules = ["acpi_call" "i915" "kvm-intel" "uinput"];
|
2023-01-29 14:35:38 +01:00
|
|
|
# 5_10 breaks my touchpad/mouse buttons
|
|
|
|
# https://bbs.archlinux.org/viewtopic.php?id=254885
|
|
|
|
# maybe modprobe hid_rmi or i2c_i801
|
|
|
|
# blacklistedKernelModules = [ "i2c_i801" ];
|
2023-09-11 20:23:04 +02:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [acpi_call]; #pkgs.gitpkgs.linuxPackages_latest.hid-nintendo ];
|
|
|
|
kernelParams = ["intel_iommu=on"];
|
2020-03-11 02:33:31 +01:00
|
|
|
extraModprobeConfig = ''
|
|
|
|
options i915 enable_fbc=1 enable_guc=3
|
|
|
|
'';
|
2019-09-29 08:09:26 +02:00
|
|
|
kernel.sysctl = {
|
2019-06-22 20:48:16 +02:00
|
|
|
"kernel.nmi_watchdog" = 0;
|
2020-03-11 02:33:31 +01:00
|
|
|
"fs.inotify.max_user_watches" = 524288;
|
2019-06-22 20:48:16 +02:00
|
|
|
"vm.dirty_writeback_centisecs" = 1500;
|
|
|
|
};
|
2019-02-26 13:44:40 +01:00
|
|
|
};
|
|
|
|
|
2023-09-11 20:23:04 +02:00
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-uuid/b37b48a8-5dcb-4f4d-ad71-1b26500b3e5f";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2023-09-11 20:23:04 +02:00
|
|
|
fileSystems."/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/546A-A3D1";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
2019-02-26 13:44:40 +01:00
|
|
|
|
|
|
|
hardware = {
|
2023-09-11 20:23:04 +02:00
|
|
|
firmware = with pkgs; [firmwareLinuxNonfree];
|
2019-02-26 13:44:40 +01:00
|
|
|
cpu.intel.updateMicrocode = true;
|
2023-01-29 14:35:38 +01:00
|
|
|
enableAllFirmware = false;
|
2019-07-09 12:06:07 +02:00
|
|
|
ksm.enable = true;
|
2019-02-26 13:44:40 +01:00
|
|
|
opengl = {
|
|
|
|
driSupport = true;
|
2023-09-11 20:23:04 +02:00
|
|
|
extraPackages = with pkgs; [intel-media-driver libvdpau-va-gl libva (vaapiIntel.override {enableHybridCodec = true;}) vaapiVdpau intel-media-driver];
|
2019-02-26 13:44:40 +01:00
|
|
|
driSupport32Bit = true;
|
2023-09-11 20:23:04 +02:00
|
|
|
extraPackages32 = with pkgs.pkgsi686Linux; [libvdpau-va-gl libva (vaapiIntel.override {enableHybridCodec = true;}) vaapiVdpau];
|
2019-02-26 13:44:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
pulseaudio = {
|
|
|
|
enable = true;
|
|
|
|
support32Bit = true;
|
|
|
|
package = pkgs.pulseaudioFull;
|
|
|
|
zeroconf.discovery.enable = false;
|
|
|
|
extraClientConf = ''
|
|
|
|
autospawn = no
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
powerOnBoot = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
powerManagement = {
|
|
|
|
enable = true;
|
2019-09-29 08:09:26 +02:00
|
|
|
cpuFreqGovernor = "powersave";
|
2019-02-26 13:44:40 +01:00
|
|
|
};
|
2023-01-29 14:35:38 +01:00
|
|
|
services = {
|
|
|
|
upower.enable = true;
|
2023-09-11 20:23:04 +02:00
|
|
|
xserver.videoDrivers = ["intel"];
|
2023-01-29 14:35:38 +01:00
|
|
|
};
|
2019-02-26 13:44:40 +01:00
|
|
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
}
|