Created
April 27, 2019 02:46
-
-
Save jonringer/0a447bd75c21e2dc30b5bb88bec77b96 to your computer and use it in GitHub Desktop.
This file contains 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, ... }: | |
let | |
myvim = pkgs.vim_configurable.customize { | |
name = "vim"; | |
vimrcConfig.customRC = '' | |
set number | |
set foldmethod=indent | |
set foldnestmax=5 | |
set foldlevelstart=99 | |
set foldcolumn=0 | |
set list | |
set listchars=tab:>- | |
nnoremap <F5> :call LanguageClient_contextMenu()<CR> | |
let mapleader = "," | |
let g:mapleader = "," | |
map <Leader>lk :call LanguageClient#textDocument_hover()<CR> | |
map <Leader>lg :call LanguageClient#textDocument_definition()<CR> | |
map <Leader>lr :call LanguageClient#textDocument_rename()<CR> | |
map <Leader>lf :call LanguageClient#textDocument_formatting()<CR> | |
map <Leader>lb :call LanguageClient#textDocument_references()<CR> | |
map <Leader>la :call LanguageClient#textDocument_codeAction()<CR> | |
map <Leader>ls :call LanguageClient#textDocument_documentSymbol()<CR> | |
augroup tags | |
au BufWritePost *.hs silent !init-tags % | |
au BufWritePost *.hsc silent !init-tags % | |
augroup END | |
''; | |
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins; | |
vimrcConfig.vam.pluginDictionaries = [ | |
{ names = [ | |
"align" | |
"fzf-vim" | |
"gitgutter" | |
"lightline-vim" | |
"nerdtree" | |
"vim-multiple-cursors" | |
"vimproc" | |
"wombat256" | |
]; | |
} | |
# Haskell | |
{ names = [ | |
"LanguageClient-neovim" | |
"neco-ghc" | |
"haskell-vim" | |
"hlint-refactor-vim" | |
"vim-hoogle" | |
]; | |
ft_regex = "^haskell\$"; | |
} | |
]; | |
}; | |
in | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
nixpkgs.config.allowUnfree = true; | |
# Use the systemd-boot EFI boot loader. | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
networking.hostName = "jon-workstation"; | |
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. | |
# 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 = { | |
# consoleFont = "Lat2-Terminus16"; | |
# consoleKeyMap = "us"; | |
# defaultLocale = "en_US.UTF-8"; | |
# }; | |
# Set your time zone. | |
time.timeZone = "America/Los_Angeles"; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
binutils | |
cabal-install | |
cargo | |
clang | |
cmake | |
dbus | |
direnv | |
docker | |
dotnet-sdk | |
firefox | |
fzf | |
gcc7 | |
ghc | |
git | |
gnumake | |
htop | |
myvim | |
ntfs3g | |
ripgrep | |
spotify | |
stack | |
enlightenment.terminology | |
tmux | |
tree | |
usbutils | |
vlc | |
vscode | |
wget | |
which | |
xpdf | |
]; | |
# Some programs need SUID wrappers, can be configured further or are | |
# started in user sessions. | |
programs = { | |
bash.enableCompletion = true; | |
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 = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Or disable the firewall altogether. | |
# networking.firewall.enable = false; | |
# Enable CUPS to print documents. | |
services.printing.enable = true; | |
services.avahi.enable = true; | |
services.avahi.publish.enable = true; | |
services.avahi.publish.userServices = true; | |
# Enable sound. | |
sound.enable = true; | |
hardware.pulseaudio.enable = true; | |
hardware.pulseaudio.support32Bit = true; | |
# Enable the X11 windowing system. | |
services.xserver = { | |
enable = true; | |
layout = "us"; | |
displayManager.lightdm.enable = true; | |
windowManager.i3.enable = true; | |
windowManager.i3.extraSessionCommands = "bindsym $mod+Return exec terminology"; | |
}; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.users.jon = { | |
description = "Jon Ringer"; | |
home = "/home/jon"; | |
isNormalUser = true; | |
shell = pkgs.bash; | |
extraGroups = [ "wheel" "networkmanager" "docker" ]; # Enable ‘sudo’ for the user. | |
}; | |
sound.extraConfig = '' | |
options snd-hda-intel vid=8086 pid=8ca snoop=0 | |
''; | |
fonts = { | |
enableFontDir = true; | |
fonts = with pkgs; [ | |
corefonts | |
dejavu_fonts | |
freefont_ttf | |
google-fonts | |
inconsolata | |
liberation_ttf | |
ubuntu_font_family | |
]; | |
}; | |
virtualisation.docker.enable = true; | |
# 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 = "19.03"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment