nixos-config/common.nix

183 lines
3.9 KiB
Nix

{ config, pkgs, ... }:
{
imports =
[
/etc/nixos/hardware-configuration.nix
./i3.nix
./basic-tools.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
nix.useSandbox = true;
nix.binaryCaches = [ https://cache.nixos.org ];
nix.trustedBinaryCaches = [ https://cache.nixos.org ];
nix.extraOptions = ''
auto-optimise-store = true
binary-caches-parallel-connections = 10
'';
networking.networkmanager.enable = true;
networking.firewall.enable = true;
time.timeZone = "Europe/Vienna";
# Select internationalisation properties.
# i18n = {
# consoleFont = "lat9w-16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
environment.systemPackages = with pkgs.haskellPackages; with pkgs; [
gitg
gmpc
m4
subversion
openjdk8
sbt scala
idea.idea-community
# firefoxWrapper
# qutebrowser
chromium
# thunderbird
qalculate-gtk
speedcrunch
viewnior
gnupg
pass xclip pwgen
remmina
ledger
hledger
hledger-diff
cmake
mpv
wireshark-gtk
mutt
goldendict
patchelf
bazaar
texlive.combined.scheme-full biber
androidsdk_4_4
gimp
inkscape
jabref
pdfpc
# haskell dev
cabal2nix
cabal-install
ghc-mod
# emacs
emacs
ghostscript # for auctex
aspell
libreoffice
calibre
mediainfo
isync
mu
msmtp
vdirsyncer khard khal
veriT
minisat
picosat
prover9
eprover
metis-prover
spass
z3
cvc4
why3
graphviz
# toysolver
stable.haskellPackages.tip-lib
coq_8_5
emacsPackages.proofgeneral_4_3_pre
] ++ (with aspellDicts; [ en de fr nl ]);
nixpkgs.config.packageOverrides = pkgs: with pkgs; let
fetchNixPkgs = { rev, sha256 }:
fetchFromGitHub {
inherit sha256 rev;
owner = "NixOS";
repo = "nixpkgs-channels";
};
stable = import (fetchNixPkgs {
rev = "9e959ce6441a3309c2f3e7b07c62f7c681e8eb6f";
sha256 = "1fi40m9yq6jbskp8j0mxnlxhcf4mvwh1qn27idcb9l58762hn5nb";
}) {};
in {
idea.idea-community = pkgs.idea.idea-community.overrideDerivation (oldAttrs: rec {
name = "idea-community-${version}";
version = "2016.2.eap";
src = pkgs.fetchurl {
url = "https://download.jetbrains.com/idea/ideaIC-162.1121.10-no-jdk.tar.gz";
sha256 = "966175c63e3e39af54f378a30842870f40aa5d01c06ca15d5370d459f9baa8c8";
};
});
neovim = pkgs.neovim.override {
extraPythonPackages = [ pkgs.pythonPackages.websocket_client ];
};
stable = stable;
};
nixpkgs.config.allowTexliveBuilds = true;
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
programs.ssh.startAgent = false;
# Enable CUPS to print documents.
services.avahi.enable = true; # cups browsing support
services.printing = {
enable = true;
drivers = [ pkgs.hplip ];
};
# services.colord.enable = true;
# IntelliJ
boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288;
# gapt: `ulimit -n` was 256
security.pam.loginLimits = [
{ domain = "*"; type = "-"; item = "nofile"; value = "4096"; }
];
fileSystems."/mnt/vaccaria" = {
device = "//vaccaria.mtlaa.gebner.org/export";
fsType = "cifs";
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria" ];
};
fileSystems."/mnt/aruanus" = {
device = "//aruanus.htdf.gebner.org/export";
fsType = "cifs";
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aruanus" ];
};
users.extraUsers.gebner = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
# shell = "${pkgs.zsh}/bin/zsh";
password = if config.virtualisation != null then "" else null;
};
system.fsPackages = [ pkgs.ntfs3g ];
}