Last active
September 3, 2018 03:07
-
-
Save jbaum98/bb864ac510c4a2776af1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
# Use the GRUB 2 boot loader. | |
boot.loader.grub.enable = true; | |
boot.loader.grub.version = 2; | |
# Define on which hard drive you want to install Grub. | |
boot.loader.grub.device = "/dev/sda"; | |
boot.extraModprobeConfig = '' | |
options i915 enable_rc6=1 enable_fbc=1 lvds_downclock=1 | |
options snd slots=snd-hda-intel | |
''; | |
networking.hostName = "nixos"; # Define your hostname. | |
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
networking.networkmanager.enable = true; | |
# Select internationalisation properties. | |
# i18n = { | |
# consoleFont = "Lat2-Terminus16"; | |
# consoleKeyMap = "us"; | |
# defaultLocale = "en_US.UTF-8"; | |
# }; | |
# Set your time zone. | |
time.timeZone = "America/New_York"; | |
# List packages installed in system profile. To search by name, run: | |
# $ nix-env -qaP | grep wget | |
environment.systemPackages = with pkgs; [ | |
wget vim emacs git python ruby xclip chromium | |
]; | |
# List services that you want to enable: | |
# Enable the OpenSSH daemon. | |
services.openssh.enable = true; | |
# Enable CUPS to print documents. | |
services.printing.enable = true; | |
# Enable the X11 windowing system. | |
# services.xserver.xkbOptions = "eurosign:e"; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.extraUsers.jake = { | |
createHome = true; | |
isNormalUser = true; | |
extraGroups = [ "wheel" "networkmanager" ]; | |
uid = 1000; | |
}; | |
# Chromebook c720p crap begins | |
# Need this so we don't lock up on opening the laptop lid | |
boot.kernelParams = [ | |
"tpm_tis.force=1" | |
"tpm_tis.interrupts=0" | |
"i915.semaphores=1" | |
]; | |
boot.blacklistedKernelModules = [ | |
"snd_pcsp" | |
"ehci_pci" | |
"snd_hda_codec_hdmi" | |
]; | |
# Need a > 3.17 kernel for fixes and trackpad module | |
nixpkgs.config.packageOverrides = pkgs: { | |
linux_4_1 = pkgs.linux_4_1.override { | |
extraConfig = '' | |
CHROME_PLATFORMS y | |
CHROMEOS_LAPTOP m | |
CHROMEOS_PSTORE m | |
''; | |
}; | |
}; | |
boot.kernelPackages = pkgs.linuxPackages_4_1; | |
# All this crap needs to be in place for most things to work | |
boot.kernelModules = [ | |
"cyapa" | |
"i2c_designware_pci" | |
"i2c_designware_platform" | |
"i2c_designware_core" | |
"i2c_dev" | |
"i2c_i801" | |
"xf86-input-libinput" | |
]; | |
# This is blacklisted by systemd so force it to load | |
boot.postBootCommands = "${config.system.sbin.modprobe}/sbin/modprobe i2c_i801"; | |
# And the touchpad xorg crap | |
services.xserver = { | |
enable = true; | |
layout = "us"; | |
xkbOptions = "eurosign:e ctrl:nocaps"; | |
# Enable the KDE Desktop Environment. | |
displayManager.auto.enable = true; | |
displayManager.auto.user = "jake"; | |
desktopManager.kde5.enable = true; | |
synaptics.enable = true; | |
synaptics.twoFingerScroll = true; | |
synaptics.palmDetect = true; | |
exportConfiguration = true; | |
videoDrivers = [ "intel" "vesa" ]; | |
vaapiDrivers = [ pkgs.vaapiIntel ]; | |
config = '' | |
Section "InputClass" | |
Identifier "touchpad peppy cyapa" | |
MatchIsTouchpad "on" | |
MatchDevicePath "/dev/input/event*" | |
MatchProduct "cyapa" | |
Option "SoftButtonAreas" "0% 0 0% 0 0 0 0 0" | |
Option "TapButton1" "1" | |
Option "TapButton2" "2" | |
Option "AreaBottomEdge" "0%" | |
Option "FingerLow" "8" | |
Option "FingerHigh" "10" | |
Option "VertScrollDelta" "-111" | |
Option "HorizScrollDelta" "-111" | |
EndSection | |
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "intel" | |
Option "TearFree" "true" | |
EndSection | |
''; | |
}; | |
hardware.opengl.driSupport32Bit = true; | |
# Chromebook c720p junk ends | |
nixpkgs.config.allowUnfree = true; | |
# The NixOS release to be compatible with for stateful data such as databases. | |
system.stateVersion = "16.03"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment