Skip to content

Instantly share code, notes, and snippets.

@zfnmxt
Created December 23, 2018 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zfnmxt/2401458d1ac5af9c8c6f6b9a8114d027 to your computer and use it in GitHub Desktop.
Save zfnmxt/2401458d1ac5af9c8c6f6b9a8114d027 to your computer and use it in GitHub Desktop.
# 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 systemd-boot EFI boot loader.
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = pkgs.linuxPackages_latest;
initrd.kernelModules = [ "fbcon" "i915" ];
blacklistedKernelModules = [ "nouveau" ];
initrd.luks.devices = [
{
name = "root";
device = "/dev/nvme0n1p2";
preLVM = true;
}
];
};
networking = {
hostName = "x1e";
networkmanager.enable = true;
};
# Select internationalisation properties.
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
# Set your time zone.
time.timeZone = "Europe/Copenhagen";
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# Basic stuff
wget
tmux
which
htop
git
mlocate
networkmanagerapplet
yadm # Manages dotfiles
pciutils
gnupg # gpg
undervolt
killall
gparted
# Audio
pavucontrol
pasystray
# Desktop environment
dmenu
networkmanager_dmenu
rofi
pywal
(polybar.override { pulseSupport = true; })
xorg.xbacklight
xorg.xdpyinfo
xcompmgr
# Terminal
rxvt_unicode-with-plugins
termite
# Editors
vim
emacs
# Browsers
firefox
# Social stuff
weechat
aspell
aspellDicts.en
wire-desktop
signal-desktop
# Media
spotify
# Misc.
screenfetch
xfontsel
alarm-clock-applet
];
fonts.fonts = with pkgs; [
terminus_font
gohufont
roboto-mono
dina-font
unifont
unifont_upper
];
# 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; };
# 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;
# Enable sound.
sound.enable = true;
# Enable the X11 windowing system.
services.xserver = {
enable = true;
autorun = true;
layout = "us";
libinput.enable = true;
videoDrivers = [ "intel" "nvidia" ];
displayManager.sddm.enable = true;
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
};
};
hardware = {
# Bluetooth
bluetooth.enable = true;
# Audio
pulseaudio = {
enable = true;
support32Bit = true;
package = pkgs.pulseaudioFull;
};
# GPU
#nvidia = {
# modesetting.enable = true;
# optimus_prime.enable = true;
# optimus_prime.nvidiaBusId = "PCI:1:0:0";
# optimus_prime.intelBusId = "PCI:0:2:0";
#};
bumblebee = {
enable = true;
connectDisplay = true;
# pmMethod = "bbswitch";
};
# CPU
cpu.intel.updateMicrocode = true;
};
# Enable touchpad support.
# services.xserver.libinput.enable = true;
users.users.zfnmxt = {
isNormalUser = true;
extraGroups = ["wheel" "video" "audio" "disk" ];
group = "users";
};
# 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 = "18.09"; # Did you read the comment?
}
@zfnmxt
Copy link
Author

zfnmxt commented Dec 23, 2018

[zfnmxt@x1e:~]$ nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.05 MiB download, 0.28 MiB unpacked):
/nix/store/g1nyxagqjx4j30briplk9ad94lh5ddcf-bash-interactive-4.4-p23-dev
copying path '/nix/store/g1nyxagqjx4j30briplk9ad94lh5ddcf-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...

  • system: "x86_64-linux"
  • host os: Linux 4.19.9, NixOS, 19.03pre162671.44b02b52ea6 (Koi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.3
  • channels(root): "nixos-19.03pre162671.44b02b52ea6, nixpkgs-19.03pre161900.61c3169a0e1"
  • channels(zfnmxt): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

@zfnmxt
Copy link
Author

zfnmxt commented Dec 23, 2018

[zfnmxt@x1e:~]$ nix-shell -p pciutils --run "lspci"
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:14.3 Network controller: Intel Corporation Wireless-AC 9560 [Jefferson Peak] (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Device a368 (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #17 (rev f0)
00:1b.4 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)
00:1e.0 Communication controller: Intel Corporation Device a328 (rev 10)
00:1f.0 ISA bridge: Intel Corporation Device a30e (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
04:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:01.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:02.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
05:04.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] (rev 06)
06:00.0 System peripheral: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018] (rev 06)
3a:00.0 USB controller: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] (rev 06)
71:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment