dotfiles/configuration.nix

187 lines
4.5 KiB
Nix
Raw Normal View History

2015-08-25 00:05:28 +02:00
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
2015-08-25 11:42:45 +02:00
# System
2015-08-25 00:05:28 +02:00
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sdd";
hardware.opengl.driSupport32Bit = true;
2015-08-27 21:12:34 +02:00
# SSD
boot.tmpOnTmpfs = true; # save some writes
2015-08-27 15:01:41 +02:00
fileSystems."/".options = "discard,noatime";
2015-08-27 21:12:34 +02:00
# Mount Data disk
fileSystems."/mnt/Dati" = {
device = "/dev/sdd3";
2015-09-07 19:25:36 +02:00
options = "nofail,relatime,defaults";
2015-08-27 21:12:34 +02:00
};
2015-08-31 17:03:18 +02:00
time.timeZone = "Europe/Rome";
2015-08-25 15:56:45 +02:00
2015-09-23 18:15:46 +02:00
virtualisation.virtualbox.host.enable = true;
2015-09-07 19:25:36 +02:00
# Networking
2015-09-25 17:07:45 +02:00
networking.hostName = "ape";
2015-08-25 00:05:28 +02:00
networking.hostId = "6bc261fc";
2015-09-07 19:25:36 +02:00
networking.firewall.enable = false;
2015-09-25 17:54:55 +02:00
networking.wireless.enable = true;
networking.connman.enable = true;
2015-08-25 00:05:28 +02:00
i18n = {
consoleFont = "lat9w-16";
consoleKeyMap = "it";
2015-09-23 22:39:30 +02:00
defaultLocale = "it_IT.UTF-8";
2015-08-25 00:05:28 +02:00
};
2015-08-25 11:42:45 +02:00
# Packages
nixpkgs.config = {
allowUnfree = true;
2015-08-27 21:12:34 +02:00
packageOverrides = pkgs: {
ncmpcpp = pkgs.ncmpcpp.override {
outputsSupport = true;
visualizerSupport = true;
clockSupport = true;
};
2015-09-07 19:25:36 +02:00
chromium = pkgs.chromium.override {
enablePepperFlash = true;
};
2015-08-25 11:42:45 +02:00
};
};
2015-08-25 00:05:28 +02:00
environment.systemPackages = with pkgs; [
2015-08-25 11:42:45 +02:00
# Development
2015-08-27 15:01:41 +02:00
atom git nodejs
2015-09-07 19:25:36 +02:00
(haskellPackages.ghcWithPackages (hs: with hs; [ cabal-install ] ))
# Libs and Tools
2015-09-24 21:43:18 +02:00
xsel urxvt_perls xclip python34Packages.udiskie encfs
# Desktop Environment helpers
dmenu bar i3lock sxhkd
2015-08-26 00:56:33 +02:00
# Games
2015-09-25 17:07:45 +02:00
minecraft steam dwarf_fortress
# Applications
2015-09-25 17:42:06 +02:00
neovim ranger weechat bc w3m gnupg zathura go14Packages.ipfs.bin
2015-09-25 17:07:45 +02:00
tmux htop rxvt_unicode pandoc mosh ncdu cv pv tree screenfetch
scrot iotop iftop
# Desktop Applications
2015-09-25 17:07:45 +02:00
chromium libreoffice gparted
2015-08-25 11:42:45 +02:00
# Media
2015-09-25 17:07:45 +02:00
beets mpd mpc_cli ncmpcpp popcorntime mpv
# Drivers, file systems and other compatibility-aimed packages
ntfs3g exfat utillinuxCurses gptfdisk encfs
2015-08-25 11:42:45 +02:00
# Other stuff
2015-08-25 00:05:28 +02:00
];
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
gohufont
];
};
2015-08-25 11:42:45 +02:00
# Services
2015-08-27 15:01:41 +02:00
services = {
2015-09-23 22:39:30 +02:00
2015-08-27 15:01:41 +02:00
# SSH
openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
2015-08-25 00:05:28 +02:00
2015-08-27 15:01:41 +02:00
# Desktop Environment
xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
layout = "it";
2015-09-24 01:54:55 +02:00
windowManager.bspwm.enable = true;
desktopManager.xterm.enable = false;
desktopManager.default = "none";
windowManager.default = "bspwm";
2015-10-08 20:28:02 +02:00
displayManager.slim.theme = pkgs.fetchurl {
url = "https://github.com/rnhmjoj/nix-slim/archive/0.2.0.tar.gz";
sha256 = "08m6ks6crdyr02ll50gy3vpn3rzq6rp5jm2bli526r432xacdmj1";
};
2015-08-27 15:01:41 +02:00
};
2015-08-27 21:12:34 +02:00
mpd = {
enable = true;
user = "fazo";
group = "users";
dataDir = "/home/fazo/.config/mpd";
musicDirectory = "/home/fazo/Music";
extraConfig = ''
audio_output {
type "fifo"
name "FIFO"
path "/tmp/mpd.fifo"
format "44100:16:1"
}
audio_output {
type "alsa"
name "Fazo-PC"
mixer_type "software"
}
'';
};
2015-09-07 19:25:36 +02:00
redshift = {
enable = true;
latitude = "9.6";
longitude = "45.47";
};
2015-08-27 21:12:34 +02:00
transmission = {
2015-10-08 18:52:38 +02:00
enable = false;
2015-08-27 21:12:34 +02:00
settings = {
download-dir = "/mnt/Dati/Download/";
2015-08-27 21:12:34 +02:00
};
};
2015-09-07 19:25:36 +02:00
syncthing = {
enable = true;
user = "fazo";
dataDir = "/home/fazo/.config/syncthing";
};
2015-08-25 00:05:28 +02:00
};
2015-09-16 02:00:03 +02:00
# Custom Services
systemd.services.ipfs = {
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
2015-09-23 18:15:46 +02:00
path = [ pkgs.bash pkgs.fuse ];
2015-09-16 02:00:03 +02:00
serviceConfig = {
User = "fazo";
ExecStart = "${pkgs.go14Packages.ipfs.bin}/bin/ipfs daemon --init";
};
};
2015-08-25 11:42:45 +02:00
# User environment
programs.zsh = {
enable = true;
shellInit = "export ZDOTDIR=~/.config/zsh";
};
2015-08-25 00:05:28 +02:00
users.extraUsers.fazo = {
isNormalUser = true;
2015-09-23 18:15:46 +02:00
extraGroups = [ "wheel" "transmission" "vboxusers" ];
2015-08-25 00:05:28 +02:00
uid = 1000;
shell = "/run/current-system/sw/bin/zsh";
2015-08-25 11:42:45 +02:00
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIqHaL0uH1ko/jLI3JeetD4bITUF34IE9HTEvF2Go8JYbhk3YSsG0/EoNu8dhA35S45Y7TXUk/K0axcqmFUePVwY271b7L+9I7/ehUg1wHOaNLCf/ueAyRfo5ZUHuH1YnTg9TinwVi0dynjVMaaVDR1YWVgzuw0KTEDW5em5m+jRbDvFrrq72D2GD/fYqkc2Z/cmnRijMi26PCF1xTq4g6BlIUYloCN+ZlDRvkSWiqCcFD3a/QOZXsUBVg80K4QrHVwj4+Bu2M1KDLhmW+8fzMkbwzKumUFt9SwcQh5Tq/MQfzSWOO2wtn1sys0BDKGazJwn9gMFNkcFbRsD5Uqcgh fazo@mac.lan" ];
2015-08-25 00:05:28 +02:00
};
}