forked from colonelpanic/dotfiles
[NixOS] Use bumblebee on blade
This commit is contained in:
parent
cdb1afc6ab
commit
e530968875
@ -4,12 +4,14 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||||
../configuration.nix
|
../configuration.nix
|
||||||
../extra.nix
|
../extra.nix
|
||||||
../dfinity.nix
|
../dfinity.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
hardware.bumblebee.enable = true;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
@ -20,29 +22,29 @@
|
|||||||
|
|
||||||
services.xserver.libinput.enable = true;
|
services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/58218a04-3ba1-4295-86bb-ada59f75e3b6";
|
device = "/dev/disk/by-uuid/58218a04-3ba1-4295-86bb-ada59f75e3b6";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/8142784e-45c6-4a2b-91f1-09df741ac00f";
|
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/8142784e-45c6-4a2b-91f1-09df741ac00f";
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/36E1-BE93";
|
device = "/dev/disk/by-uuid/36E1-BE93";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.resume-fix = {
|
systemd.services.resume-fix = {
|
||||||
description = "Fixes acpi immediate resume after suspend";
|
description = "Fixes acpi immediate resume after suspend";
|
||||||
wantedBy = [ "multi-user.target" "post-resume.target" ];
|
wantedBy = [ "multi-user.target" "post-resume.target" ];
|
||||||
after = [ "multi-user.target" "post-resume.target" ];
|
after = [ "multi-user.target" "post-resume.target" ];
|
||||||
script = ''
|
script = ''
|
||||||
if ${pkgs.gnugrep}/bin/grep -q '\bXHC\b.*\benabled\b' /proc/acpi/wakeup; then
|
if ${pkgs.gnugrep}/bin/grep -q '\bXHC\b.*\benabled\b' /proc/acpi/wakeup; then
|
||||||
echo XHC > /proc/acpi/wakeup
|
echo XHC > /proc/acpi/wakeup
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user