Created
November 13, 2018 04:46
-
-
Save dmjio/1ce6a08b6f8a49a00bab2a529d0bbc6a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
]; | |
nixpkgs.config = { | |
allowUnfree = true; | |
packageOverrides = pkgs: {}; | |
}; | |
nix = { | |
useSandbox = false; | |
nrBuildUsers = 50; | |
trustedUsers = ["dmj"]; | |
buildCores = 16; | |
buildMachines = [ | |
{ hostName = "localhost"; | |
system = "x86_64-linux"; | |
maxJobs = 16; | |
} | |
]; | |
}; | |
boot = { | |
loader = { | |
grub = { | |
enable = true; | |
version = 2; | |
device = "/dev/sda"; | |
}; | |
}; | |
}; | |
networking = { | |
firewall = { | |
enable = true; | |
allowPing = true; | |
allowedTCPPorts = [ 443 80 22 ]; | |
}; | |
hostName = "nixos"; | |
}; | |
# Select internationalisation properties. | |
i18n = { | |
consoleFont = "Lat2-Terminus16"; | |
consoleKeyMap = "us"; | |
defaultLocale = "en_US.UTF-8"; | |
}; | |
# Set your time zone. | |
time.timeZone = "America/New_York"; | |
# List packages installed in system profile. To search by name, run: | |
# $ nix-env -qaP | grep wget | |
environment.systemPackages = with pkgs; [ | |
wget gitMinimal emacs coq | |
]; | |
# Enable the X11 windowing system. | |
hardware = { | |
opengl.driSupport32Bit = true; | |
pulseaudio = { | |
enable = true; | |
systemWide = false; | |
}; | |
}; | |
# Enable the OpenSSH daemon. | |
services = { | |
keybase.enable = true; | |
weechat.enable = true; | |
xserver.enable = true; | |
xserver.videoDrivers = ["nvidia"]; | |
xserver.desktopManager.gnome3.enable = true; | |
xserver.displayManager.gdm.enable = true; | |
emacs = { | |
defaultEditor = true; | |
enable = true; | |
}; | |
nix-serve = { | |
enable = false; | |
secretKeyFile = "/etc/nix-serve-keys/secret"; | |
}; | |
nginx = { | |
enable = true; | |
}; | |
openssh = { | |
enable = true; | |
forwardX11 = true; | |
}; | |
sshd.enable = true; | |
postgresql.enable = true; | |
}; | |
security.sudo = { | |
enable = true; | |
wheelNeedsPassword = false; | |
}; | |
# 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 = "18.09"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment