Skip to content

Instantly share code, notes, and snippets.

@MatthewCroughan
Last active August 5, 2020 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MatthewCroughan/01ef2a5860610c5597fc64827da85556 to your computer and use it in GitHub Desktop.
Save MatthewCroughan/01ef2a5860610c5597fc64827da85556 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
./sway.nix
./wayland.nix
./cachix.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "t480"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.enp0s31f6.useDHCP = true;
networking.interfaces.wlp3s0.useDHCP = true;
# Configures a list of networks I want to connect to.
networking.wireless.networks.bebop.pskRaw = "dickbutt";
# Setup ZFS requirements
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "235f593c";
# Set up LUKS requirements
boot.initrd.luks.devices.crypted.device = "/dev/disk/by-label/nixos";
# 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.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
# Set your time zone.
time.timeZone = "Europe/London";
# Set location provider
location.provider = "geoclue2";
# Enable OpenGL
hardware.opengl.enable = true;
# Configure Iris Graphics
environment.variables = {
MESA_LOADER_DRIVER_OVERRIDE = "iris";
};
hardware.opengl.package = (pkgs.mesa.override {
galliumDrivers = [ "nouveau" "virgl" "swrast" "iris" ];
}).drivers;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment