2015-03-18 02:24:24 +01:00
|
|
|
# I'm modifying this file anyways.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
2015-09-29 14:54:55 +02:00
|
|
|
./modules/powerdown.nix
|
2015-03-18 02:24:24 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader.grub = {
|
|
|
|
enable = true;
|
|
|
|
device = "/dev/sda";
|
|
|
|
};
|
|
|
|
kernelModules = ["nvidiabl" "kvm-intel"];
|
2015-12-21 00:52:58 +01:00
|
|
|
extraModulePackages = [pkgs.linuxPackages.nvidiabl];
|
2015-03-18 02:24:24 +01:00
|
|
|
extraModprobeConfig = ''
|
|
|
|
options nvidiabl min=0x384 max=0x4650
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
services.xserver.videoDrivers = ["nvidia"];
|
|
|
|
services.xserver.synaptics.enable = true;
|
|
|
|
|
|
|
|
networking.wireless.enable = true;
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
|
|
|
|
|
|
|
# ideal... doesn't work.
|
|
|
|
#services.udev.extraRules = ''
|
|
|
|
# KERNEL=="nvidia_backlight", SUBSYSTEM=="backlight", MODE="666"
|
|
|
|
#'';
|
|
|
|
# for now
|
|
|
|
systemd.services."display-manager".preStart = ''
|
|
|
|
chmod a+w $(realpath /sys/class/backlight/nvidia_backlight/brightness) || true
|
|
|
|
'';
|
|
|
|
# any better ideas to do this?... please? the scripts are pretty heavily modified.
|
|
|
|
# from https://github.com/march-linux/powerdown
|
|
|
|
services.udev.extraRules = ''
|
2015-04-14 12:17:59 +02:00
|
|
|
SUBSYSTEM=="firmware", ACTION=="add", ATTR{loading}="-1"
|
2015-03-18 02:24:24 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = [ "xhci_hcd" "ehci_pci" "ahci" "usbhid" "usb_storage" "btrfs" "dm_crypt" ];
|
|
|
|
boot.initrd.luks.devices = [ {
|
|
|
|
name = "nix-root-enc";
|
|
|
|
device = "/dev/sdb2";
|
|
|
|
allowDiscards = true;
|
|
|
|
}];
|
|
|
|
|
|
|
|
fileSystems."/" =
|
|
|
|
{ device = "/dev/disk/by-uuid/a21dd1ae-b1ef-47d2-854e-4f561f0bfb4c";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = "defaults,relatime,discard";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/boot" =
|
|
|
|
{ device = "/dev/disk/by-uuid/8a141d3a-4a7f-4ece-9881-b958649e956d";
|
|
|
|
fsType = "ext2";
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
nix.maxJobs = 8;
|
|
|
|
}
|