2016-06-19 02:45:00 +00:00
|
|
|
|
# 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
|
|
|
|
|
];
|
|
|
|
|
|
2017-02-28 06:36:01 +00:00
|
|
|
|
nixpkgs.config = {
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
#packageOverrides = pkgs: rec {
|
|
|
|
|
#st = pkgs.stdenv.lib.overrideDerivation pkgs.st (oldAttrs : {
|
|
|
|
|
#configFile = ''
|
|
|
|
|
#static const char *colorname[] = {
|
|
|
|
|
|
|
|
|
|
#/* 8 normal colors */
|
|
|
|
|
#[0] = "#3c3e42", /* black */
|
|
|
|
|
#[1] = "#dd6880", /* red */
|
|
|
|
|
#[2] = "#83b879", /* green */
|
|
|
|
|
#[3] = "#dec790", /* yellow */
|
|
|
|
|
#[4] = "#95b5e4", /* blue */
|
|
|
|
|
#[5] = "#c1a3e0", /* magenta */
|
|
|
|
|
#[6] = "#64c1d4", /* cyan */
|
|
|
|
|
#[7] = "#9a9da3", /* white */
|
|
|
|
|
|
|
|
|
|
#/* 8 bright colors */
|
|
|
|
|
#[8] = "#4f5558", /* black */
|
|
|
|
|
#[9] = "#de889a", /* red */
|
|
|
|
|
#[10] = "#99c490", /* green */
|
|
|
|
|
#[11] = "#e7d09a", /* yellow */
|
|
|
|
|
#[12] = "#a0beea", /* blue */
|
|
|
|
|
#[13] = "#cbacea", /* magenta */
|
|
|
|
|
#[14] = "#88d1df", /* cyan */
|
|
|
|
|
#[15] = "#b4b7bb", /* white */
|
2016-06-19 02:45:00 +00:00
|
|
|
|
|
2017-02-28 06:36:01 +00:00
|
|
|
|
#/* special colors */
|
|
|
|
|
#[256] = "#212121", /* background */
|
|
|
|
|
#[257] = "#aeb1b7", /* foreground */
|
|
|
|
|
#};
|
|
|
|
|
|
|
|
|
|
#/*
|
|
|
|
|
#* default colors (colorname index)
|
|
|
|
|
#* foreground, background, cursor
|
|
|
|
|
#*/
|
|
|
|
|
#static unsigned int defaultfg = 257;
|
|
|
|
|
#static unsigned int defaultbg = 256;
|
|
|
|
|
#static unsigned int defaultcs = 257;
|
|
|
|
|
|
|
|
|
|
#/*
|
|
|
|
|
#* colors used, when the specific fg == defaultfg. so in reverse mode this
|
|
|
|
|
#* will reverse too. another logic would only make the simple feature too
|
|
|
|
|
#* complex.
|
|
|
|
|
#*/
|
|
|
|
|
#static unsigned int defaultitalic = 7;
|
|
|
|
|
#static unsigned int defaultunderline = 7;
|
|
|
|
|
|
|
|
|
|
#static char font[] = "GohuFont:pixelsize=12:antialias=false";
|
|
|
|
|
#'';
|
|
|
|
|
#});
|
|
|
|
|
#};
|
|
|
|
|
};
|
2016-06-19 02:45:00 +00:00
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
initrd = {
|
|
|
|
|
luks.devices = [{
|
|
|
|
|
name = "rootfs";
|
|
|
|
|
device = "/dev/sda2";
|
|
|
|
|
preLVM = true;
|
2017-02-28 06:36:01 +00:00
|
|
|
|
allowDiscards = true;
|
2016-06-19 02:45:00 +00:00
|
|
|
|
}];
|
|
|
|
|
};
|
|
|
|
|
loader = {
|
2017-02-28 06:36:01 +00:00
|
|
|
|
systemd-boot.enable = true;
|
2016-06-19 02:45:00 +00:00
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
};
|
|
|
|
|
extraModprobeConfig = ''
|
|
|
|
|
options hid_apple iso_layout=0
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking = {
|
2017-02-11 19:05:08 +00:00
|
|
|
|
hostName = "Caroyln_MacBookAir_NixOS";
|
2016-06-19 02:45:00 +00:00
|
|
|
|
firewall.enable = true;
|
2017-02-28 06:36:01 +00:00
|
|
|
|
wireless.enable = false;
|
|
|
|
|
useDHCP = false;
|
2017-02-11 19:05:08 +00:00
|
|
|
|
wicd.enable = true;
|
2016-06-19 02:45:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
powerManagement.enable = true;
|
|
|
|
|
|
2017-02-28 06:36:01 +00:00
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
|
virtualisation.virtualbox.host.enable = true;
|
2016-06-19 02:45:00 +00:00
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Los_Angeles";
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search by name, run:
|
|
|
|
|
# $ nix-env -qaP | grep wget
|
|
|
|
|
|
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
|
2017-02-28 06:36:01 +00:00
|
|
|
|
#security.wrappers = [ "slock" ];
|
2016-09-18 03:24:23 +00:00
|
|
|
|
|
2016-06-19 02:45:00 +00:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
2017-02-28 06:36:01 +00:00
|
|
|
|
acpi
|
|
|
|
|
audacity
|
|
|
|
|
bar-xft
|
|
|
|
|
bc
|
|
|
|
|
bitcoin
|
|
|
|
|
blueman
|
2017-02-11 19:05:08 +00:00
|
|
|
|
bspwm
|
2017-02-28 06:36:01 +00:00
|
|
|
|
cargo
|
|
|
|
|
chromium
|
|
|
|
|
compton-git
|
|
|
|
|
ctags
|
|
|
|
|
cura
|
|
|
|
|
cyrus_sasl
|
|
|
|
|
dropbox-cli
|
|
|
|
|
electrum
|
|
|
|
|
elmPackages.elm
|
2017-03-04 22:31:11 +00:00
|
|
|
|
emacs
|
2016-06-19 02:45:00 +00:00
|
|
|
|
feh
|
2016-09-18 03:24:23 +00:00
|
|
|
|
gcc
|
2017-02-28 06:36:01 +00:00
|
|
|
|
gimp
|
2016-06-19 02:45:00 +00:00
|
|
|
|
git
|
2017-02-28 06:36:01 +00:00
|
|
|
|
gitAndTools.hub
|
2016-09-18 03:24:23 +00:00
|
|
|
|
gnumake
|
2017-02-28 06:36:01 +00:00
|
|
|
|
gnupg1
|
2017-03-04 22:31:11 +00:00
|
|
|
|
guile
|
2017-02-28 06:36:01 +00:00
|
|
|
|
haskellPackages.apply-refact
|
2016-09-18 03:24:23 +00:00
|
|
|
|
haskellPackages.cabal-install
|
2017-03-04 22:31:11 +00:00
|
|
|
|
haskellPackages.ghc-mod
|
|
|
|
|
haskellPackages.hakyll
|
2017-02-28 06:36:01 +00:00
|
|
|
|
haskellPackages.hakyll
|
2016-06-24 20:01:18 +00:00
|
|
|
|
haskellPackages.hlint
|
2017-02-28 06:36:01 +00:00
|
|
|
|
haskellPackages.hoogle
|
2017-03-04 22:31:11 +00:00
|
|
|
|
haskellPackages.pointfree
|
2017-02-28 06:36:01 +00:00
|
|
|
|
haskellPackages.shake
|
2016-09-18 03:24:23 +00:00
|
|
|
|
haskellPackages.stack
|
2016-06-24 20:01:18 +00:00
|
|
|
|
haskellPackages.stylish-haskell
|
2016-06-19 02:45:00 +00:00
|
|
|
|
htop
|
2016-09-18 03:24:23 +00:00
|
|
|
|
kbdlight
|
2017-02-28 06:36:01 +00:00
|
|
|
|
kicad
|
|
|
|
|
libu2f-host
|
|
|
|
|
neomutt
|
|
|
|
|
neovim
|
|
|
|
|
nodejs
|
|
|
|
|
ntfs3g
|
|
|
|
|
openscad
|
|
|
|
|
pavucontrol
|
2016-06-24 20:01:18 +00:00
|
|
|
|
python
|
|
|
|
|
python27Packages.udiskie
|
2017-02-28 06:36:01 +00:00
|
|
|
|
rofi
|
|
|
|
|
rustc
|
2016-06-19 02:45:00 +00:00
|
|
|
|
silver-searcher
|
2016-09-18 03:24:23 +00:00
|
|
|
|
slock
|
2017-02-28 06:36:01 +00:00
|
|
|
|
steam
|
2016-06-19 02:45:00 +00:00
|
|
|
|
sudo
|
2017-02-28 06:36:01 +00:00
|
|
|
|
sxhkd
|
|
|
|
|
termite
|
|
|
|
|
transmission
|
2016-06-19 02:45:00 +00:00
|
|
|
|
unzip
|
2017-02-28 06:36:01 +00:00
|
|
|
|
vlc
|
|
|
|
|
weechat
|
2016-06-19 02:45:00 +00:00
|
|
|
|
wget
|
2016-09-18 03:24:23 +00:00
|
|
|
|
xautolock
|
2017-02-28 06:36:01 +00:00
|
|
|
|
xfce.thunar
|
2016-06-19 02:45:00 +00:00
|
|
|
|
xflux
|
2017-02-28 06:36:01 +00:00
|
|
|
|
xtitle
|
|
|
|
|
yubikey-personalization
|
|
|
|
|
yubikey-personalization-gui
|
|
|
|
|
zscroll
|
2016-06-19 02:45:00 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
services = {
|
2016-06-24 20:01:18 +00:00
|
|
|
|
nixosManual.showManual = true;
|
2016-06-19 02:45:00 +00:00
|
|
|
|
tlp.enable = true;
|
|
|
|
|
openssh.enable = true;
|
|
|
|
|
printing.enable = true;
|
2017-02-28 06:36:01 +00:00
|
|
|
|
pcscd.enable = true;
|
|
|
|
|
udev.extraRules = ''
|
|
|
|
|
ACTION!="add|change", GOTO="u2f_end"
|
|
|
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", TAG+="uaccess"
|
|
|
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0", TAG+="uaccess"
|
|
|
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1e0d", ATTRS{idProduct}=="f1d0|f1ae", TAG+="uaccess"
|
|
|
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e|2ccf", ATTRS{idProduct}=="0880", TAG+="uaccess"
|
|
|
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0850|0852|0853|0854|0856|0858|085a|085b", TAG+="uaccess"
|
|
|
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="24dc", ATTRS{idProduct}=="0101", TAG+="uaccess"
|
|
|
|
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="8acf", TAG+="uaccess"
|
|
|
|
|
LABEL="u2f_end"
|
|
|
|
|
'';
|
|
|
|
|
udev.packages = [
|
|
|
|
|
pkgs.libu2f-host
|
|
|
|
|
pkgs.yubikey-personalization
|
|
|
|
|
];
|
2016-06-19 02:45:00 +00:00
|
|
|
|
xserver = {
|
|
|
|
|
enable = true;
|
|
|
|
|
layout = "us";
|
2017-02-28 06:36:01 +00:00
|
|
|
|
displayManager.lightdm.enable = true;
|
2016-06-19 02:45:00 +00:00
|
|
|
|
windowManager = {
|
2017-02-28 06:36:01 +00:00
|
|
|
|
bspwm.enable = true;
|
2017-02-11 19:05:08 +00:00
|
|
|
|
default = "bspwm";
|
2016-06-19 02:45:00 +00:00
|
|
|
|
};
|
|
|
|
|
synaptics = {
|
|
|
|
|
enable = true;
|
|
|
|
|
dev = "/dev/input/event*";
|
|
|
|
|
twoFingerScroll = true;
|
|
|
|
|
tapButtons = false;
|
|
|
|
|
accelFactor = "0.001";
|
|
|
|
|
buttonsMap = [ 1 3 2 ];
|
|
|
|
|
palmDetect = true;
|
|
|
|
|
additionalOptions = ''
|
|
|
|
|
Option "VertScrollDelta" "-180" # scroll sensitivity, the bigger the negative number = less sensitive
|
|
|
|
|
Option "HorizScrollDelta" "-180"
|
|
|
|
|
Option "FingerLow" "40"
|
|
|
|
|
Option "FingerHigh" "70"
|
|
|
|
|
Option "Resolution" "270" # Pointer sensitivity, this is for a retina screen, so you'll probably need to change this for an air
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.extraUsers.gigavinyl = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
home = "/home/gigavinyl";
|
|
|
|
|
shell = "/run/current-system/sw/bin/zsh";
|
2017-02-28 06:36:01 +00:00
|
|
|
|
extraGroups = [ "wheel" "docker" ];
|
2016-06-19 02:45:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
2016-06-24 20:01:18 +00:00
|
|
|
|
# Enable Udiskie Daemon
|
|
|
|
|
systemd.user.services."udiskie" = {
|
|
|
|
|
enable = true;
|
|
|
|
|
description = "udiskie to automount removable media";
|
2016-06-19 02:45:00 +00:00
|
|
|
|
wantedBy = [ "default.target" ];
|
2016-06-24 20:01:18 +00:00
|
|
|
|
path = with pkgs; [
|
|
|
|
|
# gnome3.defaultIconTheme
|
|
|
|
|
# gnome3.gnome_themes_standard
|
|
|
|
|
pythonPackages.udiskie
|
|
|
|
|
];
|
|
|
|
|
# environment.XDG_DATA_DIRS="${pkgs.gnome3.defaultIconTheme}/share:${pkgs.gnome3.gnome_themes_standard}/share";
|
|
|
|
|
serviceConfig.Restart = "always";
|
|
|
|
|
serviceConfig.RestartSec = 2;
|
|
|
|
|
serviceConfig.ExecStart = "${pkgs.python27Packages.udiskie}/bin/udiskie -a -t -n -F ";
|
2016-06-19 02:45:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Setup custom fonts
|
|
|
|
|
fonts = {
|
|
|
|
|
enableFontDir = true;
|
|
|
|
|
enableGhostscriptFonts = true;
|
|
|
|
|
fonts = with pkgs; [
|
|
|
|
|
corefonts
|
|
|
|
|
ubuntu_font_family
|
|
|
|
|
source-code-pro
|
|
|
|
|
powerline-fonts
|
2017-02-11 19:05:08 +00:00
|
|
|
|
gohufont
|
2016-06-19 02:45:00 +00:00
|
|
|
|
];
|
2017-02-28 06:36:01 +00:00
|
|
|
|
};
|
2016-06-19 02:45:00 +00:00
|
|
|
|
|
2017-02-28 06:36:01 +00:00
|
|
|
|
hardware = {
|
|
|
|
|
pulseaudio = {
|
|
|
|
|
enable = true;
|
|
|
|
|
support32Bit = true;
|
|
|
|
|
};
|
|
|
|
|
opengl.driSupport32Bit = true;
|
|
|
|
|
facetimehd.enable = true;
|
|
|
|
|
cpu.intel.updateMicrocode = true;
|
|
|
|
|
bluetooth.enable = true;
|
|
|
|
|
};
|
2016-06-19 02:45:00 +00:00
|
|
|
|
|
2017-02-28 06:36:01 +00:00
|
|
|
|
# The NixOS release to be compatible with for stateful data such as databases.
|
|
|
|
|
system.stateVersion = "17.03";
|
|
|
|
|
system.autoUpgrade.enable = true;
|
2016-06-19 02:45:00 +00:00
|
|
|
|
}
|