Skip to content

Instantly share code, notes, and snippets.

@toby
Created October 15, 2017 23:32
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 toby/7949dc6b3f0430628a59826065e523fb to your computer and use it in GitHub Desktop.
Save toby/7949dc6b3f0430628a59826065e523fb to your computer and use it in GitHub Desktop.
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
networking.hostName = "wanchan";
# Use the GRUB 2 boot loader.
boot.loader.grub = {
enable = true;
version = 2;
device = "nodev";
efiSupport = true;
# gfxmodeEfi = "1024x768";
};
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelParams = [ "intel_pstate=no_hwp" ];
boot.initrd.luks.devices = [
{
name = "root";
device = "/dev/disk/by-uuid/bcdcd6c0-1ccc-4ced-95ba-26ed794a377e";
preLVM = true;
allowDiscards = true;
}
];
# LUKS filesystem settings
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
# Wireless
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
nixpkgs.config.allowUnfree = true; # Broadcom package is non-free
# Set your time zone.
time.timeZone = "America/Chicago";
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
vim
git
tmux
wget
netcat-openbsd
htop
atop
iotop
strace
manpages
bashCompletion
gnupg
lsof
zip
tcpdump
iftop
whois
gcc
gnumake
# X11
chromium
vlc
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.bash.enableCompletion = true;
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 = [ 22 ];
networking.firewall.allowedUDPPorts = [ 5353 ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support.
# services.xserver.libinput.enable = true;
# Enable the KDE Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Enable Multicast DNS
services.avahi = {
enable = true;
browseDomains = [ ];
nssmdns = true;
publish = {
enable = true;
addresses = true;
};
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers.toby = {
uid = 1000;
isNormalUser = true;
createHome = true;
home = "/home/toby";
extraGroups = [ "wheel" ];
};
# 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 = "17.09"; # Did you read the comment?
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
# corefonts # non-free
vistafonts
inconsolata
terminus_font
proggyfonts
dejavu_fonts
font-awesome-ttf
ubuntu_font_family
source-code-pro
source-sans-pro
source-serif-pro
];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment