Skip to content

Instantly share code, notes, and snippets.

Created March 12, 2017 01:20
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 anonymous/37fb13201bb0feed934508149d6abf7c to your computer and use it in GitHub Desktop.
Save anonymous/37fb13201bb0feed934508149d6abf7c 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, ... }:
## Default Editor
let
myVim = pkgs.vim_configurable.customize {
name = "vim";
vimrcConfig = {
customRC = ''
syntax on
set nu
set foldmethod=syntax
set listchars=tab:->
set list
set backspace=indent,eol,start
nmap <F3> :!ninja <enter>
map <F7> :tabp<enter>
map <F8> :tabn<enter>
set expandtab
set softtabstop=2
set shiftwidth=2
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
call vundle#end() " required
filetype plugin indent on " required
"syntax enable
"set background=dark
"colorscheme solarized
'';
};
};
in
{
environment.systemPackages = [ myVim ];
environment.shellAliases.vi = "vim";
};
programs.vim.defaultEditor = true;
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# Select internationalisation properties.
i18n = {
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
};
# Set your time zone.
time.timeZone = "US/Central";
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
zsh terminator hicolor_icon_theme dmenu ];
# Sandbox
nix.useSandbox = true;
nix.sandboxPaths = [ "/dev" "/proc" ];
system = {
autoUpgrade = {
channel = "http://nixos.org/channels/nixos-unstable";
enable = true;
};};
# Enable the X11 windowing system.
services.xserver = {
desktopManager.xterm.enable = false;
enable = true;
layout = "us";
windowManager = {
i3 = { enable = true; };
awesome = { enable = true; };
xmonad = { enable = true; enableContribAndExtras = true;};
};
videoDrivers = [ "ati" ];
displayManager = {lightdm.enable = true;};
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers = {
ndowens = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" ];
uid = 1000;
};
};
# Fonts
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
hack-font ];
fontconfig = {
ultimate.enable = true;
defaultFonts.monospace = [ "Liberation Mono" ];
defaultFonts.sansSerif = [ "Liberation Sans" ];
defaultFonts.serif = [ "Liberation Serif" ];
};
};
# Power management
services.acpid.enable = true;
# Enable updatedb
services.locate = {
enable = true;
interval = "hourly";
};
## Set Default shell
users.defaultUserShell = pkgs.zsh;
# The NixOS release to be compatible with for stateful data such as databases.
# system.stateVersion = "16.09";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment