2021-05-28 00:15:51 +02:00
|
|
|
{
|
2022-03-23 13:10:18 +01:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2021-05-28 00:15:51 +02:00
|
|
|
boot = {
|
|
|
|
initrd = {
|
2022-03-23 13:10:18 +01:00
|
|
|
availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
|
|
|
luks.devices."enc".device = "/dev/disk/by-uuid/1f1e51d6-3084-4f4d-9b4b-6caa0352f542";
|
2021-05-28 00:15:51 +02:00
|
|
|
};
|
2022-12-24 00:20:51 +01:00
|
|
|
kernelModules = ["kvm-intel" "acpi_call" "nvidia"];
|
2022-05-28 15:53:38 +02:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [acpi_call];
|
2022-03-23 13:10:18 +01:00
|
|
|
supportedFilesystems = ["btrfs"];
|
2022-05-28 15:53:38 +02:00
|
|
|
kernelParams = ["acpi_backlight=native"];
|
2021-05-28 00:15:51 +02:00
|
|
|
};
|
|
|
|
|
2021-06-05 16:01:49 +02:00
|
|
|
powerManagement = {
|
|
|
|
enable = true;
|
2022-05-28 15:53:38 +02:00
|
|
|
cpuFreqGovernor = "powersave";
|
2021-06-11 16:07:24 +02:00
|
|
|
powertop.enable = true;
|
2021-06-05 16:01:49 +02:00
|
|
|
};
|
2021-05-28 00:15:51 +02:00
|
|
|
|
2021-11-11 11:51:21 +01:00
|
|
|
services.tlp = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
START_CHARGE_THRESH_BAT0 = 75;
|
2022-05-28 15:53:38 +02:00
|
|
|
STOP_CHARGE_THRESH_BAT0 = 85;
|
2021-11-11 11:51:21 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-04-17 15:32:53 +02:00
|
|
|
services.tp-auto-kbbl = {
|
|
|
|
enable = true;
|
|
|
|
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.upower.enable = true;
|
|
|
|
|
2022-03-12 23:23:53 +01:00
|
|
|
settings.nvidiaUsed = true;
|
|
|
|
|
2021-05-28 00:15:51 +02:00
|
|
|
hardware = {
|
2021-06-01 12:06:21 +02:00
|
|
|
# Enable bluetooth
|
|
|
|
bluetooth.enable = true;
|
|
|
|
|
2022-12-24 00:20:51 +01:00
|
|
|
nvidia.modesetting.enable = true;
|
2023-09-04 10:32:00 +02:00
|
|
|
# nvidia.dynamicBoost.enable = true;
|
|
|
|
nvidia.nvidiaSettings = true;
|
2022-04-17 15:32:53 +02:00
|
|
|
nvidia.powerManagement.enable = true;
|
2021-05-28 00:15:51 +02:00
|
|
|
nvidia.prime = {
|
2023-09-04 10:32:00 +02:00
|
|
|
offload.enable = true;
|
2021-05-28 00:15:51 +02:00
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
|
|
intelBusId = "PCI:0:2:0";
|
|
|
|
};
|
2021-11-06 09:27:57 +01:00
|
|
|
|
2021-05-30 19:55:13 +02:00
|
|
|
opengl = {
|
|
|
|
enable = true;
|
2021-11-06 09:27:57 +01:00
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
2021-05-30 19:55:13 +02:00
|
|
|
extraPackages = with pkgs; [
|
|
|
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
|
|
|
vaapiVdpau
|
|
|
|
libvdpau-va-gl
|
2021-06-11 19:54:08 +02:00
|
|
|
libva
|
2021-05-30 19:55:13 +02:00
|
|
|
];
|
|
|
|
};
|
2021-05-28 00:15:51 +02:00
|
|
|
|
|
|
|
trackpoint.enable = true;
|
|
|
|
trackpoint.emulateWheel = lib.mkDefault config.hardware.trackpoint.enable;
|
|
|
|
};
|
|
|
|
|
2021-06-16 16:47:50 +02:00
|
|
|
services.blueman.enable = true;
|
2022-12-24 00:20:51 +01:00
|
|
|
services.xserver.videoDrivers = ["nvidia"];
|
2021-06-16 16:47:50 +02:00
|
|
|
|
2021-05-30 19:55:13 +02:00
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
2022-03-23 13:10:18 +01:00
|
|
|
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
2021-05-30 19:55:13 +02:00
|
|
|
};
|
|
|
|
|
2021-05-28 00:15:51 +02:00
|
|
|
services.fprintd.enable = true;
|
2021-05-31 14:39:02 +02:00
|
|
|
services.hardware.bolt.enable = true;
|
2021-05-28 00:15:51 +02:00
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-uuid/d9fd201a-f9f5-4d6f-9706-cc698699704d";
|
|
|
|
fsType = "btrfs";
|
2022-03-23 13:10:18 +01:00
|
|
|
options = ["subvol=root" "compress=zstd"];
|
2021-05-28 00:15:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/B767-2B7C";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/home" = {
|
|
|
|
device = "/dev/disk/by-uuid/d9fd201a-f9f5-4d6f-9706-cc698699704d";
|
|
|
|
fsType = "btrfs";
|
2022-03-23 13:10:18 +01:00
|
|
|
options = ["subvol=home" "compress=zstd"];
|
2021-05-28 00:15:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
"/nix" = {
|
|
|
|
device = "/dev/disk/by-uuid/d9fd201a-f9f5-4d6f-9706-cc698699704d";
|
|
|
|
fsType = "btrfs";
|
2022-03-23 13:10:18 +01:00
|
|
|
options = ["subvol=nix" "compress=zstd"];
|
2021-05-28 00:15:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
"/persist" = {
|
|
|
|
device = "/dev/disk/by-uuid/d9fd201a-f9f5-4d6f-9706-cc698699704d";
|
|
|
|
fsType = "btrfs";
|
2022-03-23 13:10:18 +01:00
|
|
|
options = ["subvol=persist" "compress=zstd"];
|
2021-05-28 00:15:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
"/var/log" = {
|
|
|
|
device = "/dev/disk/by-uuid/d9fd201a-f9f5-4d6f-9706-cc698699704d";
|
|
|
|
fsType = "btrfs";
|
2022-03-23 13:10:18 +01:00
|
|
|
options = ["subvol=log" "compress=zstd"];
|
2021-05-28 00:15:51 +02:00
|
|
|
neededForBoot = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-23 13:10:18 +01:00
|
|
|
swapDevices = [{device = "/dev/disk/by-uuid/6948f567-03b3-4a38-b3c4-e05e0bbfbf55";}];
|
2021-05-28 00:15:51 +02:00
|
|
|
}
|