Created
February 26, 2019 18:31
-
-
Save steinuil/0ca3bcf7ea2ecaba4fb448f602513df7 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, lib, ... }: | |
{ | |
imports = | |
[ ./hardware-configuration.nix | |
./thinkpad.nix | |
]; | |
# Use the systemd-boot EFI boot loader. | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
networking.hostName = "megane"; | |
networking.networkmanager.enable = true; | |
# i18n = { | |
# consoleFont = "Lat2-Terminus16"; | |
# consoleKeyMap = "us"; | |
# defaultLocale = "en_US.UTF-8"; | |
# }; | |
# Set your time zone. | |
time.timeZone = "Europe/Amsterdam"; | |
nixpkgs.config.allowUnfree = true; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
vim | |
firefox | |
mlterm | |
mpv | |
qbittorrent | |
xorg.xbacklight | |
memtester | |
gnome3.gnome-terminal | |
xorg.xwininfo | |
]; | |
programs.sway.enable = true; | |
networking.firewall.enable = false; | |
sound.enable = true; | |
hardware.pulseaudio.enable = true; | |
services.xserver = { | |
enable = true; | |
layout = "us"; | |
libinput.enable = true; # touchpad support | |
windowManager.icewm.enable = true; | |
windowManager.default = "icewm"; | |
videoDrivers = lib.mkForce [ "modesetting" ]; | |
}; | |
users.users.steenuil = { | |
isNormalUser = true; | |
uid = 1000; | |
extraGroups = [ "wheel" "networkmanager" "sway" ]; | |
}; | |
system.stateVersion = "18.09"; | |
} | |
{ config, lib, pkgs, ... }: | |
{ | |
hardware.trackpoint.enable = lib.mkDefault true; | |
hardware.cpu.intel.updateMicrocode = | |
lib.mkDefault config.hardware.enableRedistributableFirmware; | |
hardware.opengl.extraPackages = with pkgs; [ | |
vaapiIntel | |
vaapiVdpau | |
libvdpau-va-gl | |
]; | |
powerManagement.cpuFreqGovernor = | |
lib.mkIf config.services.tlp.enable (lib.mkForce null); | |
services.tlp.enable = lib.mkDefault true; | |
boot = { | |
kernelModules = [ "tp_smapi" ]; | |
extraModulePackages = with config.boot.kernelPackages; [ tp_smapi ]; | |
# initrd.kernelModules = [ "i915" ]; | |
kernel.sysctl = { | |
"vm.swappiness" = lib.mkDefault 1; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment