# 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
];
nixpkgs.config.allowUnfree = true;
# daily gc
nix.gc = {
automatic = true;
dates = "03:15";
};
# Use the GRUB 2 boot loader.
boot = {
kernelModules = [ "kvm-intel" ];
kernelPackages = pkgs.linuxPackages_latest;
loader = {
grub = {
enable = true;
version = 2;
device = "/dev/sda"; # or "nodev" for efi only
# efiSupport = true;
# efiInstallAsRemovable = true;
};
};
};
networking = {
firewall = {
enable = false;
allowPing = true;
allowedTCPPorts = [ 80 443 22 3000 ];
};
hostName = "nixos"; # Define your hostname.
networkmanager.enable = true;
};
# Select internationalisation properties.
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
# 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; [
wget emacs gitMinimal
];
# Enable the X11 windowing system.
hardware = {
opengl.driSupport32Bit = true;
pulseaudio = {
enable = true;
systemWide = false;
};
};
# Enable the OpenSSH daemon.
services = {
openssh.enable = true;
printing.enable = true;
ntp.enable = true;
sshd.enable = true;
emacs.enable = true;
postgresql.enable = true;
xserver = {
enable = true;
autorun = false;
videoDrivers = [ "nvidia" ];
displayManager.kdm.enable = true;
desktopManager.kde5.enable = true;
# xkbOptions = "eurosign:e";
layout = "us";
};
};
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
virtualisation.xen = {
enable = true;
trace = true;
bridge.address = "10.0.1.26";
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users = {
defaultUserShell = "/run/current-system/sw/bin/zsh";
extraUsers.dmj = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" ];
};
};
# zsh
programs.zsh.enable = true;
# version
system.stateVersion = "16.09";
}