Last active
February 29, 2020 14:06
-
-
Save vbop9834/ecc8103452d216db1201359a79f594e4 to your computer and use it in GitHub Desktop.
thinkpad x1 carbon nixos
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 | |
]; | |
hardware.enableAllFirmware = true; | |
hardware.enableRedistributableFirmware = false; | |
powerManagement.enable = true; | |
boot.cleanTmpDir = true; | |
boot.initrd.checkJournalingFS = false; | |
#boot.kernelPackages = pkgs.linuxPackages_latest; | |
boot.kernelParams = [ "ipv6.disable=0" "pcie_aspm=force" "resume=/dev/nvme0n1p5" "iwlwifi.power_save=Y" "acpi_brightness=vendor" "i915.enable_rc6=7" "i915.enable_psr=2" "i915.enable_fbc=1" "i915.lvds_downclock=1" "i915.semaphores=1"]; | |
# Use the GRUB 2 boot loader. | |
boot.loader.systemd-boot.enable = true; | |
#boot.loader.grub.enable = true; | |
#boot.loader.grub.useOSProber = true; | |
#boot.loader.grub.version = 2; | |
#boot.initrd.luks.devices = | |
#{ | |
# root = { | |
# device = "/dev/nvme0n1p5"; | |
# preLVM = true; | |
# }; | |
#}; | |
networking = { | |
networkmanager.enable = true; | |
hostName = "Lenovwut"; | |
}; | |
#boot.loader.grub.efiSupport = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
#boot.loader.efi.efiSysMountPoint = "/boot"; | |
#boot.loader.grub.efiInstallAsRemovable = false; | |
# boot.loader.efi.efiSysMountPoint = "/boot/efi"; | |
# Define on which hard drive you want to install Grub. | |
#boot.loader.grub.device = "/dev/nvme0n1"; # or "nodev" for efi only | |
# networking.hostName = "nixos"; # Define your hostname. | |
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
# Configure network proxy if necessary | |
# networking.proxy.default = "http://user:password@proxy:port/"; | |
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | |
# Select internationalisation properties. | |
# i18n = { | |
# consoleFont = "Lat2-Terminus16"; | |
# consoleKeyMap = "us"; | |
# defaultLocale = "en_US.UTF-8"; | |
# }; | |
# Set your time zone. | |
time.timeZone = "America/Denver"; | |
nixpkgs.config.allowUnfree = true; | |
nixpkgs.config.allowBroken = false; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
libinput-gestures | |
wget vim | |
i3status-rust | |
dmenu | |
unclutter | |
imagemagick | |
geoclue2 | |
#lollypop | |
vlc | |
firefox | |
chromium | |
#discord | |
kitty | |
emacs | |
feh | |
git | |
fsharp | |
mono6 | |
dotnet-sdk_3 | |
libgdiplus | |
#mupen64plus | |
elixir | |
nodejs | |
inotify-tools | |
python3 | |
#python37Packages.ds4drv | |
python37Packages.pip | |
docker | |
redshift | |
xclip | |
p7zip | |
unrar | |
unzip | |
zip | |
#steam | |
rustc | |
cargo | |
geoclue2 | |
gnumake | |
#blender | |
#awsebcli | |
libargon2 | |
gcc | |
signal-desktop | |
paprefs | |
#xfce.dconf | |
libva | |
]; | |
virtualisation.docker.enable = true; | |
security.chromiumSuidSandbox.enable = true; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
# programs.mtr.enable = true; | |
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; | |
# List services that you want to enable: | |
# Enable the OpenSSH daemon. | |
# services.openssh.enable = true; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Or disable the firewall altogether. | |
# networking.firewall.enable = false; | |
# Enable CUPS to print documents. | |
# services.printing.enable = true; | |
services.acpid.enable = true; | |
services.compton = { | |
enable = true; | |
shadow = true; | |
inactiveOpacity = "0.6"; | |
fade = true; | |
fadeDelta = 5; | |
opacityRules = [ "90:class_g = 'Emacs'" "90:class_g = 'signal-desktop'" ]; | |
}; | |
hardware.bluetooth.enable = true; | |
# Enable sound. | |
sound.enable = true; | |
sound.mediaKeys = { | |
enable = true; | |
volumeStep = "5%"; | |
}; | |
#hardware.pulseaudio.package = pkgs.pulseaudioFull; | |
hardware.pulseaudio.enable = true; | |
hardware.pulseaudio.support32Bit = true; | |
hardware.pulseaudio.package = pkgs.pulseaudioFull; | |
nixpkgs.config.pulseaudio = true; | |
programs.dconf.enable = true; | |
programs.light.enable = true; | |
services.actkbd = { | |
enable = true; | |
bindings = [ | |
{ keys = [ 225 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -A 10 && /run/current-system/sw/bin/light -I"; } | |
{ keys = [ 224 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -U 10 && /run/current-system/sw/bin/light -I"; } | |
]; | |
}; | |
# Enable the X11 windowing system. | |
services.xserver.enable = true; | |
services.xserver.layout = "us"; | |
services.xserver.xkbOptions = "caps:escape"; | |
# Enable touchpad support. | |
services.xserver.libinput.enable = true; | |
services.xserver.libinput.clickMethod = "clickfinger"; | |
#services.xserver.desktopManager.default = "none"; | |
services.xserver.displayManager.lightdm.enable = true; | |
#services.xserver.displayManager.defaultSession = "xfce"; | |
#services.xserver.desktopManager = { | |
# xterm.enable = false; | |
# xfce = { | |
# enable = true; | |
# noDesktop = true; | |
# enableXfwm = false; | |
# }; | |
#}; | |
services.xserver.windowManager.i3.enable = true; | |
services.xserver.windowManager.i3.package = pkgs.i3-gaps; | |
users.extraUsers.jeremy = { | |
name = "Jeremy"; | |
group = "users"; | |
extraGroups = [ | |
"wheel" "disk" "audio" "video" "jackaudio" | |
"networkmanager" "systemd-journal" "docker" | |
]; | |
createHome = true; | |
uid = 1000; | |
home = "/home/jeremy"; | |
shell = "/run/current-system/sw/bin/bash"; | |
}; | |
fonts = { | |
enableFontDir = true; | |
enableGhostscriptFonts = true; | |
fonts = with pkgs; [ | |
inconsolata | |
unifont | |
anonymousPro | |
fira-code | |
font-awesome_4 | |
]; | |
}; | |
hardware.opengl.enable = true; | |
hardware.opengl.driSupport32Bit = true; | |
hardware.opengl.extraPackages = with pkgs; [ libva ]; | |
services.redshift = { | |
enable = true; | |
temperature.night = 2500; | |
}; | |
location.provider = "geoclue2"; | |
# This value determines the NixOS release with which your system is to be | |
# compatible, in order to avoid breaking some software such as database | |
# servers. You should change this only after NixOS release notes say you | |
# should. | |
system.stateVersion = "20.03"; # Did you read the comment? | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment