Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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, ... }:
- # CFLAGS="-march=core-avx2 -O2 -pipe"
- {
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ];
- # Use the gummiboot efi boot loader.
- boot = {
- extraModprobeConfig = ''
- # thinkpad acpi
- options thinkpad_acpi fan_control=1
- # intel graphics
- options i915 modeset=1 i915_enable_rc6=7 i915_enable_fbc=1 lvds_downclock=1 powersave=0
- # intel audio
- options snd-hda-intel index=0 id=PCH
- options snd-hda-intel index=1 id=HDMI
- # options snd slots=snd-hda-intel
- # fix intel wifi-N
- options iwlwifi 11n_disable=1
- '';
- extraModulePackages = [ config.boot.kernelPackages.tp_smapi ];
- kernelPackages = pkgs.linuxPackages_4_2; # TODO: zen-kernel BFQ/BFS/reiserfs/lowlatency/hibernation/custom font
- kernelParams = [
- # "acpi_osi=\"!Windows 2012\""
- # "acpi_backlight=vendor"
- "acpi_osi="
- # "video.use_native_backlight=1"
- "drm_kms_helper.edid_firmware=edid/1920x1080.bin"
- "video=1920x1080"
- "clocksource=acpi_pm pci=use_crs"
- "consoleblank=0"
- ];
- loader.gummiboot.enable = true;
- loader.efi.canTouchEfiVariables = true;
- initrd.kernelModules = [
- "intel_agp"
- "i915"
- "bbswitch"
- # "tp_smapi"
- # "fbcon" # ???: Built-in now
- ];
- blacklistedKernelModules = [
- # No beeping
- "snd_pcsp"
- "pcspkr"
- # fix bumblebeed
- "nvidia_uvm"
- # because of intel
- "nouveau"
- "nvidiafb"
- # buggy and old
- "thinkpad_acpi"
- ];
- };
- fileSystems."/" = pkgs.lib.mkForce {
- label = "root";
- fsType = "ext4";
- };
- fileSystems."/home" = pkgs.lib.mkForce {
- label = "home";
- fsType = "ext4";
- };
- fileSystems."/boot" = pkgs.lib.mkForce {
- device = "/dev/disk/by-label/EFI";
- fsType = "vfat";
- };
- fileSystems."/tmp" = pkgs.lib.mkForce {
- device = "tmpfs";
- fsType = "tmpfs";
- options = "nosuid,nodev,relatime";
- };
- swapDevices = pkgs.lib.mkForce [
- { device = "/dev/disk/by-label/Swap"; }
- ];
- networking = {
- hostName = "hackbook";
- hostId = "847849e7";
- interfaceMonitor.enable = false;
- wireless.enable = false;
- wireless.interfaces = [ "wlp4s0" ];
- wireless.userControlled.enable = true;
- wireless.userControlled.group = "network";
- useDHCP = false;
- wicd.enable = true;
- };
- nix = {
- extraOptions = ''
- auto-optimise-store = true
- env-keep-derivations = true
- gc-keep-outputs = true
- gc-keep-derivations = true
- '';
- maxJobs = pkgs.lib.mkForce 9;
- buildCores = pkgs.lib.mkForce 0;
- useChroot = true;
- binaryCaches = [ "https://cache.nixos.org/" # "https://hydra.nixos.org/" "https://hydra.cryp.to/"
- ];
- };
- nixpkgs.config = {
- allowUnfree = true;
- firefox = {
- enableGoogleTalkPlugin = true;
- enableAdobeFlash = true;
- };
- chromium = {
- enablePepperFlash = true;
- enablePepperPDF = true;
- };
- mesa = {
- enableTextureFloats = true;
- };
- # virtualbox.enableExtensionPack = true;
- haskellPackageOverrides = self : super : (let inherit (pkgs.haskell-ng) lib; in {
- # cabal-install = lib.overrideCabal super.cabal-install (attrs: {
- # buildDepends = [ self.text ]; # for antigen-hs, see: https://github.com/Tarrasch/antigen-hs/issues/24
- # });
- # ghc-mod = lib.overrideCabal super.ghc-mod (oldAttrs: {
- # src = pkgs.fetchgit {
- # url = https://github.com/kazu-yamamoto/ghc-mod;
- # rev = "247e4e0e7616fe1fecc68fdcf80d6249ac4cee4f";
- # sha256 = "2a23271d0e6907351a246f095040ba18c3ab6bf1cba08a14338d701defa55474";
- # };
- # buildDepends = oldAttrs.buildDepends ++ [ self.cabal-helper self.cereal ];
- # });
- # cabal-helper = lib.overrideCabal super.cabal-helper (oldAttrs: {
- # version = "0.3.2.0";
- # sha256 = "06igjmr0n8418wid1pr74cgvlsmwni7ar72g9bddivlbxax1pfli";
- # });
- # HaRe = lib.overrideCabal super.HaRe (attrs: {
- # version = "0.6.1.0";
- # sha256 = "1azxbfvzdn73bv3vg6xylrjiahaxcx86vhx9b60z106a4ynkxdfr";
- # });
- # ghc-mod = super.ghc-mod.overrideDerivation (attrs: {
- # src = pkgs.fetchFromGitHub {
- # owner = "kazu-yamamoto";
- # repo = "ghc-mod";
- # rev = "19b3de356928f7c1a7aa3a59430beae08a883e7b";
- # sha256 = "0airmyw5w912fxlq9r1076q6cca7nvh29smhny1lv694h3bbvgjz";
- # };
- # buildInputs = attrs.buildInputs ++ [ pkgs.haskellPackages.cabal-helper ];
- # });
- # cabal-helper = super.cabal-helper.overrideDerivation (attrs: {
- # src = pkgs.fetchFromGitHub {
- # owner = "DanielG";
- # repo = "cabal-helper";
- # rev = "c2f6a2e5bf40f9e4cb9276bcc9b58ec3627f727a";
- # sha256 = "075a4i8ck75rc03pmzr65ys20s9g0jwyclfvnziminpp3p8p53vi";
- # };
- # version = "0.6.0.0";
- # });
- # cabal-helper = lib.overrideCabal super.cabal-helper (attrs: {
- # version = "0.6.0.0";
- # sha256 = "0b12mz370fhlibln6w9c67npp9ivvgkayxn53zv5pq7w76rd1ajv";
- # });
- hobbes = super.hobbes.overrideDerivation (attrs: {
- src = pkgs.fetchFromGitHub {
- owner = "jhickner";
- repo = "hobbes";
- rev = "764b04465b9d46e3521d42cd26f006b571aad912";
- sha256 = "05cqirxfnibnwr1vwziwxp75jh7m871jq5y2rmbkz79b7bw8lbcz";
- };
- buildInputs = with pkgs.haskellPackages; [
- filepath
- filemanip
- fsnotify
- text
- ];
- });
- });
- packageOverrides = pkgs: {
- qt48Full = pkgs.qt48Full.override { gtkStyle = true; };
- qt53 = pkgs.qt53.override { gtkStyle = true; };
- emacs = pkgs.emacs.override {
- withGTK2 = false;
- withGTK3 = true;
- # imagemagick = pkgs.imagemagickBig;
- };
- # wicd = pkgs.wicd.override {
- # python = pkgs.python34;
- # };
- # sxiv_xft = pkgs.stdenv.lib.overrideDerivation (pkgs.sxiv.override
- # (args: args) // { # here add new args
- # # withImagemagick = true;
- # # withLibjpeg = true;
- # # withGimp = true;
- # }
- # ) (attrs: {
- # name = "sxiv_xft-2013.10.27";
- # # meta.description = "Simple (or small or suckless) X Image Viewer with manga view mode (-m) (baskerville xft fork)";
- # prePatch = ''
- # substituteInPlace config.def.h 'static const char * const BAR_FONT = "Monospace:size=9";' 'static const char * const BAR_FONT = "Inconsolata LGC:size=8.6";'
- # substituteInPlace config.def.h 'static const char * const WIN_BG_COLOR = "#555555";' 'static const char * const WIN_BG_COLOR = "#fdf6e3";'
- # substituteInPlace config.def.h 'static const char * const WIN_FS_COLOR = "#000000";' 'static const char * const WIN_FS_COLOR = "#657b83";'
- # substituteInPlace config.def.h 'static const char * const SEL_COLOR = "#EEEEEE";' 'static const char * const SEL_COLOR = "#eee8d5";'
- # substituteInPlace config.def.h 'static const char * const BAR_BG_COLOR = "#222222";' 'static const char * const BAR_BG_COLOR = "#fdf6e3";'
- # substituteInPlace config.def.h 'static const char * const BAR_FG_COLOR = "#EEEEEE";' 'static const char * const BAR_FG_COLOR = "#657b83";'
- # '';
- # src = pkgs.fetchFromGitHub {
- # owner = "Pitometsu";
- # repo = "sxiv";
- # # branch = "xft";
- # sha256 = "02zj4gmckaca5ryxb52ma1fd26gm2fjpahz7f7iv801qs8i88b1j";
- # rev = "6af450670d20cfaa779013e85e709eb3fe022c52";
- # };
- # # patches = [
- # # (let manga_patch = {
- # # name = "manga-patch";
- # # src = import <nix/fetchurl.nix> {
- # # url = "https://github.com/baskerville/sxiv/commit/77eb07637d14c432319605d3e383d37ff1a91850.patch";
- # # md5 = "7faf8df927e34a44802ecc17e7b80755";
- # # };
- # # }; in manga_patch.src)
- # # (let xft_patch = {
- # # name = "xft-patch";
- # # src = import <nix/fetchurl.nix> {
- # # url = "https://github.com/baskerville/sxiv/commit/ea4ea27cae735f107c191eb4590db357f9ee5d4f.patch";
- # # md5 = "0b8cc129d9d078322fa82179544cc008";
- # # };
- # # }; in xft_patch.src)
- # # ];
- # # buildInputs = attrs.buildInputs ++ [ pkgs.xlibs.libXft ] ++ stdenv.lib.optional attrs.withImagemagick pkgs.imagemagick ++ stdenv.lib.optional attrs.withLibjpeg pkgs.libjpeg ++ stdenv.lib.optional attrs.withGimp pkgs.gimp;
- # buildInputs = attrs.buildInputs ++ [ pkgs.xlibs.libXft ];
- # # buildDepends = [ pkgs.xlibs.libXft ];
- # });
- };
- };
- # system.copySystemConfiguration = true; # broken because of chroot
- services.ntp.enable = true;
- time.timeZone = "Europe/Kiev";
- # Select internationalisation properties.
- i18n = {
- consoleFont = "${pkgs.terminus_font}/share/consolefonts/ter-v16n.psf.gz";
- consoleKeyMap = "dvp";
- defaultLocale = "en_US.UTF-8";
- };
- programs.zsh = {
- enable = true;
- };
- environment = {
- shellAliases = {
- g = "git";
- gl = "git log --pretty=format:\"%an, %ar, %h: %s\"";
- gs = "git status";
- gf = "git fetch";
- ga = "git add";
- gc = "git commit -m";
- gca = "git commit -a -m";
- gp = "git pull --rebase && git push";
- gull = "git pull --rebase";
- gpp = "git pull --rebase git push";
- gush = "git push";
- gm = "git merge";
- gb = "git branch";
- gco = "git checkout";
- gd = "git diff";
- gu = "git ls-files --other --exclude-standard";
- gt = "git log --graph --oneline --decorate --all";
- ecw = "emacsclient";
- ec = "emacsclient -nw";
- gr = "egrep -s --colour=auto";
- tr = "tree -C";
- t = "tr -L 1";
- lls = "ls -F -h --color=auto";
- ll = "ls -l";
- la = "ls -a";
- ls = "ls -h";
- lla = "la -1";
- l = "ls";
- nano = "nano -w";
- cp = "cp -viR";
- mv = "mv -vi";
- rm = "rm -viR";
- md = "mkdir -p -v";
- # jackD = "set_rlimits jackd -Rv -p512 -d alsa -dhw:1 -r96000 -p4096 -n2 -Xseq";
- df = "df -h";
- du = "du -h";
- # burndvd = "growisofs -Z /dev/dvdrw -R -J";
- # burndvdISO = "growisofs -dvd-compat -Z /dev/dvdrw=";
- # burncd = "mkisofs -r -f -jcharset=cp1251 -C $(cdrecord dev=/dev/cdrw -msinfo) -M /dev/cdrw $HOME/forburn/ | cdrecord --speed=4 -v -multi driveropts=burnfree -eject dev=/dev/cdrw -";
- # burncdISO = "cdrecord --speed=4 -v -multi driveropts=burnfree -eject dev=/dev/cdrw";
- # blankcd = "cdrecord --dev=/dev/cdrw --blank=fast";
- # bl = "baudline_jack -waveform -realtime -record -jack -inconnect";
- wget = "wget --no-check-certificate";
- wgetp = "wgetpaste -rXvt";
- killall = "pkill";
- pbcopy = "xsel --clipboard --input --display :0";
- pbpaste = "xsel --clipboard --output --display :0";
- open = "DISPLAY=:0 xdg-open";
- zip = "zip -r";
- ew = "emacs -Q";
- et = "emacs -nw -Q";
- tv = "pv -p --timer --rate --bytes";
- dmesg = "dmesg --color=always";
- less = "less -R";
- s = "ssh";
- c = "curl";
- f = "find";
- h = "heroku";
- haix = "heroku sudo apps:info -xa";
- be = "bundle exec";
- nix-clean = "nix-collect-garbage -d";
- nix-search = "nix-env -qaP --description \* | sed -re 's/^nixos\.//g' | fgrep -i";
- nix-update = "nixos-rebuild switch";
- nix-upgrade = "nixos-rebuild switch --upgrade";
- nxc = "nix-clean";
- nxs = "nix-search";
- nxu = "nix-update";
- nxg = "nix-upgrade";
- };
- shells = [
- "/run/current-system/sw/bin/zsh"
- "/run/current-system/sw/bin/bash"
- ];
- variables = {
- EDITOR = "et";
- # DRI_PRIME = "1";
- VDPAU_DRIVER = "va_gl";
- };
- interactiveShellInit = ''
- '';
- # binsh = "${pkgs.dash}/bin/dash"; # SLIM not work with DASH :'(
- # /var/run/current-system/sw/etc/profile
- # shellInit = ''
- # # ===================================
- # # SYSTEM WIDE CONFIGURATION GOES HERE
- # # ===================================
- # # Set GTK_PATH so that GTK+ can find themes engine.
- # export GTK_PATH=$GTK_PATH:${pkgs.numix-gtk-theme}/lib/gtk-2.0::${pkgs.numix-gtk-theme}/lib/gtk-3.0:${pkgs.gtk-engine-murrine}/lib/gtk-2.0
- # # Set GTK2 RC
- # export GTK2_RC_FILES=$GTK2_RC_FILES:${pkgs.numix-gtk-theme}/share/themes/Numix/gtk-2.0/gtkrc
- # # Set GTK_DATA_PREFIX so that GTK+ can find the system themes.
- # export GTK_DATA_PREFIX=$GTK_DATA_PREFIX:${config.system.path}
- # # ===================================
- # '';
- # pathsToLink =
- # [ "/usr/share/themes" "/usr/share/mime" "/usr/share/desktop-directories" ];
- # List packages installed in system profile
- systemPackages = with pkgs; ([
- # appearance
- lxappearance gtk-engine-murrine hicolor_icon_theme gtk_engines # numix-icon-theme numix-gtk-theme
- # desktop
- gmrun dmenu compton-git unclutter haskellPackages.yeganesh haskellPackages.xmobar redshift unclutter scrot stalonetray xlaunch xlibs.xev xlibs.xlsfonts xclip xsel primus wmctrl feh xdotool # bgs
- # env
- emacs moc mpv vlc rxvt_unicode zathura conkeror chromium firefox transmission_gtk rtorrent gimp inkscape skype sxiv # sxiv_xft # sxiv_bskv_manga # libreoffice
- # (let sxiv_xft = with pkgs; stdenv.mkDerivation rec {
- # name = "sxiv_xft";
- # src = fetchgit {
- # url = "git://github.com/pitometsu/sxiv.git";
- # sha256 = "1fapnvaj0cf9gj2gmdls1ch2jh68i51sga9zdmrirmzr9fwqhfhx";
- # rev = "6af450670d20cfaa779013e85e709eb3fe022c52";
- # };
- # postUnpack = ''
- # substituteInPlace $sourceRoot/Makefile \
- # --replace /usr/local $out
- # '';
- # buildInputs = with pkgs.xlibs; [ libX11 imlib2 libXft libXext fontconfig giflib libexif ]; # TODO: make giflib and libexif optional
- # meta = with stdenv.lib; {
- # description = "Simple (or small or suckless) X Image Viewer (xft fork)";
- # homepage = https://github.com/pitometsu/sxiv;
- # license = licenses.gpl2Plus;
- # platforms = platforms.linux;
- # };
- # }; in sxiv_xft)
- # cli
- tmux w3m wget zsh tree file lsof
- # dev
- gcc clang gdb gnumake automake autoconf cmake gitAndTools.gitFull subversion bazaar bazaarTools cvs mercurial darcs silver-searcher jre haskellPackages.hobbes # oraclejre oraclejdk
- git-hub heroku haskellPackages.hobbes
- # ruby
- ruby bundler
- # python
- python34Packages.ipython python34Packages.pip python34Packages.virtualenv
- # sci
- R texLive graphviz emacs24Packages.ess gnuplot # octave
- # utils
- keychain aspell imgurbash pastebinit wgetpaste gnupg openvpn qrencode unrar unzip p7zip imagemagickBig pv glxinfo
- python27Packages.googlecl python34Packages.youtube-dl gist haskellPackages.pandoc haskellPackages.hakyll
- # sys
- dash usbutils pciutils lshw htop ntfs3g fbterm nox hdparm powertop aircrackng acpitool mkpasswd reiser4progs udisks haskellPackages.shake bashmount utillinuxCurses parted gptfdisk # udisks manpages
- # host
- # qemu_kvm # linuxPackages_4_1.virtualbox
- ] ++ (with haskellPackages; [
- # happy hasktags stylish-haskell present hoogle hindent
- cabal-install hlint ghc stack structured-haskell-mode ghc-mod hi hdevtools hoogle
- ]) ++ (with haskell.packages.ghc784; [
- # structured-haskell-mode # ghc stack hlint ghc-mod hi hdevtools cabal-install
- ]) # ++ [ haskell.packages.ghc763.HaRe ]
- );
- };
- # nixpkgs.config.allowBroken = true;
- environment.etc."adobe/mms.cfg".text = ''
- EnableLinuxHWVideoDecode = 1
- OverrideGPUValidation = 1
- '';
- fonts = {
- enableCoreFonts = true;
- enableFontDir = true;
- enableGhostscriptFonts = false;
- fonts = with pkgs; [
- terminus_font
- ubuntu_font_family
- liberation_ttf
- freefont_ttf
- source-code-pro
- (let inconsolata-lgc = let version = "1.2.0";
- in with pkgs; stdenv.mkDerivation rec {
- name = "inconsolata-lgc-${version}";
- src = fetchurl {
- url = "https://github.com/MihailJP/Inconsolata-LGC/releases/download/LGC-1.2.0/InconsolataLGC-OT-1.2.0.tar.xz";
- sha256 = "0rw8i481sdqi0pspbvyd2f86k0vlrb6mbi94jmsl1kms18c18p66";
- };
- dontBuild = true;
- installPhase = let
- fonts_dir = "$out/share/fonts/opentype";
- doc_dir = "$out/share/doc/${name}";
- in ''
- mkdir -pv "${fonts_dir}"
- mkdir -pv "${doc_dir}"
- cp -v *.otf "${fonts_dir}"
- cp -v {README,LICENSE,ChangeLog} "${doc_dir}"
- '';
- meta = with stdenv.lib; {
- homepage = http://www.levien.com/type/myfonts/inconsolata.html;
- description = "A monospace font for both screen and print, LGC extension";
- license = licenses.ofl;
- platforms = platforms.all;
- };
- }; in inconsolata-lgc)
- inconsolata
- vistafonts
- dejavu_fonts
- freefont_ttf
- unifont
- cm_unicode
- ipafont
- baekmuk-ttf
- source-han-sans-japanese
- source-han-sans-korean
- source-han-sans-simplified-chinese
- source-han-sans-traditional-chinese
- source-sans-pro
- source-serif-pro
- fira
- fira-code
- fira-mono
- hasklig
- ];
- fontconfig = {
- enable = true;
- dpi = 100;
- antialias = true;
- hinting = {
- autohint = false;
- enable = true;
- style = "slight";
- };
- subpixel.lcdfilter = "default";
- ultimate.useEmbeddedBitmaps = true;
- defaultFonts = {
- serif = [ "Source Sans Pro" "DejaVu Serif" "IPAMincho" "Beakmuk Batang" ];
- sansSerif = [ "Source Serif Pro" "DejaVu Sans" "IPAGothic" "Beakmuk Dotum" ];
- monospace = [ "Inconsolata LGC" "DejaVu Sans Mono" "IPAGothic" "Beakmuk Dotum" ];
- };
- };
- };
- environment.etc."fonts/conf.d/98-matches.conf".text = ''
- <?xml version="1.0"?>
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
- <fontconfig>
- <match target="font">
- <!-- Medium hinting for smaller fonts -->
- <match target="font">
- <test compare="more" name="pixelsize" qual="any"><double>5</double></test>
- <test compare="less_eq" name="pixelsize" qual="any"><double>9</double></test>
- <edit mode="assign" name="hintstyle"><const>hintmedium</const></edit>
- <edit mode="assign" name="lcdfilter"><const>lcdlight</const></edit>
- </match>
- <!-- Full hinting for smallest fonts -->
- <match target="font">
- <test compare="less_eq" name="pixelsize" qual="any"><double>5</double></test>
- <edit mode="assign" name="hintstyle"><const>hintfull</const></edit>
- <edit mode="assign" name="lcdfilter"><const>lcdnone</const></edit>
- </match>
- <!-- Medium hinting for bigger fonts -->
- <match target="font">
- <test compare="more_eq" name="pixelsize" qual="any"><double>18</double></test>
- <test compare="less" name="pixelsize" qual="any"><double>24</double></test>
- <edit mode="assign" name="hintstyle"><const>hintmedium</const></edit>
- <edit mode="assign" name="lcdfilter"><const>lcdlight</const></edit>
- </match>
- <!-- Full hinting for biggest fonts -->
- <match target="font">
- <test compare="more_eq" name="pixelsize" qual="any"><double>24</double></test>
- <edit mode="assign" name="hintstyle"><const>hintfull</const></edit>
- <edit mode="assign" name="lcdfilter"><const>lcdnone</const></edit>
- </match>
- <!-- Medium hinting for BOLD bigger fonts -->
- <match target="font">
- <test compare="more_eq" name="pixelsize" qual="any"><double>16</double></test>
- <test compare="less" name="pixelsize" qual="any"><double>18</double></test>
- <test name="weight" compare="more"><const>medium</const></test>
- <edit mode="assign" name="hintstyle"><const>hintmedium</const></edit>
- <edit mode="assign" name="lcdfilter"><const>lcdlight</const></edit>
- </match>
- <!-- Full hinting for BOLD biggest fonts -->
- <match target="font">
- <test compare="more_eq" name="pixelsize" qual="any"><double>18</double></test>
- <test name="weight" compare="more"><const>medium</const></test>
- <edit mode="assign" name="hintstyle"><const>hintfull</const></edit>
- <edit mode="assign" name="lcdfilter"><const>lcdnone</const></edit>
- </match>
- <!-- Medium hinting for _italic_ bigger fonts -->
- <match target="font">
- <test compare="more_eq" name="pixelsize" qual="any"><double>16</double></test>
- <test name="slant" compare="not_eq"><double>0</double></test>
- <edit mode="assign" name="hintstyle"><const>hintmedium</const></edit>
- <edit mode="assign" name="lcdfilter"><const>lcdlight</const></edit>
- </match>
- </match>
- </fontconfig>
- '';
- environment.etc."fonts/conf.d/99-aliases.conf".text = ''
- <?xml version="1.0"?>
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
- <fontconfig>
- <match target="font">
- <!-- Use Nimbus Sans L instead of Helvetica -->
- <alias binding="same">
- <family>Helvetica</family>
- <prefer>
- <family>Nimbus Sans L</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Nimbus Sans L instead of Segoe UI -->
- <alias binding="same">
- <family>Segoe UI</family>
- <prefer>
- <family>Nimbus Sans L</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Sans instead of Arial -->
- <alias binding="same">
- <family>Arial Unicode MS</family>
- <prefer>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Sans instead of Arial -->
- <alias binding="same">
- <family>Arial</family>
- <prefer>
- <family>Liberation Sans</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Sans instead of Corbel -->
- <alias binding="same">
- <family>Corbel</family>
- <prefer>
- <family>Liberation Sans</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Sans instead of Candara -->
- <alias binding="same">
- <family>Candara</family>
- <prefer>
- <family>Liberation Sans</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Serif instead of Times New Roman -->
- <alias binding="same">
- <family>Times New Roman</family>
- <prefer>
- <family>Liberation Serif</family>
- <family>DejaVu Serif</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Serif instead of Palatino Linotype -->
- <alias binding="same">
- <family>Palatino Linotype</family>
- <prefer>
- <family>Liberation Serif</family>
- <family>DejaVu Serif</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Serif instead of Sylfaen -->
- <alias binding="same">
- <family>Sylfaen</family>
- <prefer>
- <family>Liberation Serif</family>
- <family>DejaVu Serif</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Liberation Serif instead of Cambria -->
- <alias binding="same">
- <family>Cambria</family>
- <prefer>
- <family>Liberation Serif</family>
- <family>DejaVu Serif</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Droid Serif instead of Georgia -->
- <alias binding="same">
- <family>Georgia</family>
- <prefer>
- <family>Droid Serif</family>
- <family>DejaVu Serif</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Droid Serif instead of Constantia -->
- <alias binding="same">
- <family>Constantia</family>
- <prefer>
- <family>Droid Serif</family>
- <family>DejaVu Serif</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Ubuntu instead of Calibri -->
- <alias binding="same">
- <family>Calibri</family>
- <prefer>
- <family>Ubuntu</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Ubuntu instead of Trebuchet MS -->
- <alias binding="same">
- <family>Trebuchet MS</family>
- <prefer>
- <family>Ubuntu</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Ubuntu instead of Segoe Script -->
- <alias binding="same">
- <family>Segoe Script</family>
- <prefer>
- <family>Ubuntu</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Ubuntu instead of Lucida Sans Unicode -->
- <alias binding="same">
- <family>Lucida Sans Unicode</family>
- <prefer>
- <family>Ubuntu</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Ubuntu instead of Comic Sans MS -->
- <alias binding="same">
- <family>Comic Sans MS</family>
- <prefer>
- <family>Ubuntu</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Droid Sans instead of Verdana -->
- <alias binding="same">
- <family>Verdana</family>
- <prefer>
- <family>Droid Sans</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Droid Sans instead of Tahoma -->
- <alias binding="same">
- <family>Tahoma</family>
- <prefer>
- <family>Droid Sans</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Droid Sans instead of Microsoft Sans Serif -->
- <alias binding="same">
- <family>Microsoft Sans Serif</family>
- <prefer>
- <family>Droid Sans</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Inconsolata LGC instead of Consolas -->
- <alias binding="same">
- <family>Consolas</family>
- <prefer>
- <family>Inconsolata LGC</family>
- <family>MigMix 1M</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Inconsolata LGC instead of Monaco -->
- <alias binding="same">
- <family>Monaco</family>
- <prefer>
- <family>Inconsolata LGC</family>
- <family>MigMix 1M</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Use Inconsolata LGC instead of Monaco -->
- <alias binding="same">
- <family>Menlo</family>
- <prefer>
- <family>Ubuntu Mono</family>
- <family>MigMix 1M</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Ubuntu Mono instead of Courier New -->
- <alias binding="same">
- <family>Courier New</family>
- <prefer>
- <family>Ubuntu Mono</family>
- <family>MigMix 1M</family>
- <family>DejaVu Sans</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- <!-- Ubuntu Mono instead of Lucida Console -->
- <alias binding="same">
- <family>Lucida Console</family>
- <prefer>
- <family>Ubuntu Mono</family>
- <family>MigMix 1M</family>
- <family>DejaVu Sans Mono</family>
- <family>Source Han Sans</family>
- <family>Sazanami-Hanazono Mincho</family>
- <family>Hancom</family>
- <family>Code2000</family>
- <family>Code2001</family>
- <family>Code2002</family>
- </prefer>
- </alias>
- </match>
- </fontconfig>
- '';
- security.sudo.extraConfig = ''
- # Disable timeout.
- Defaults env_reset,timestamp_timeout=0
- '';
- security.setuidPrograms = [ "xlaunch"
- # "pmount" "pumount" "udevil"
- ];
- # List services that you want to enable:
- # Enable the OpenSSH daemon.
- # services.openssh.enable = true;
- services.udisks2.enable = true;
- # services.devmon.enable = true;
- services.kmscon.hwRender = true;
- # Enable CUPS to print documents.
- # services.printing.enable = true;
- # Xorg, WM, DM, DE
- services.xserver = {
- # useGlamor = true;
- vaapiDrivers = with pkgs; [ vaapiIntel vaapiVdpau ];
- enable = true;
- enableTCP = false;
- exportConfiguration = true;
- layout = "us,ru";
- xkbVariant = "dvp,winkeys";
- xkbOptions = "grp:shift_toggle,grp_led:caps,ctrl:nocaps,altwin:meta_alt,altwin:super_win,altwin:hyper_win";
- # autorun = false;
- videoDrivers = [
- # "nouveau"
- # "modesetting"
- "intel"
- "nvidia"
- ];
- synaptics = {
- enable = true;
- vertEdgeScroll = false;
- tapButtons = false;
- twoFingerScroll = true;
- };
- config = ''
- # /etc/X11/xorg.conf.d/20-thinkpad_clickpad.conf
- # Section "InputClass"
- # Identifier "Clickpad"
- # MatchDriver "synaptics"
- # Option "Clickpad" "true"
- # Option "EmulateMidButtonTime" "0"
- # # Left Right Top Bottom
- # Option "SoftButtonAreas" "60% 0 0 20% 40% 60% 0 20%"
- # Option "AreaTopEdge" "20%"
- # Option "AreaBottomEdge" "0"
- # Option "TapButton1" "1"
- # Option "TapButton3" "2"
- # Option "TapButton2" "3"
- # # Calm the pad down while clicking
- # Option "VertHysteresis" "50"
- # Option "HorizHysteresis" "55"
- # # Drag lock
- # # Option "LockedDrags" "1"
- # # Tap to click
- # # Option "FingerLow" "50"
- # # Option "FingerHigh" "55"
- # # disable tap to click
- # Option "MaxTapTime" "0"
- # # Prevent accidental clicks
- # Option "PalmDetect" "1"
- # Option "PalmMinWidth" "5"
- # Option "PalmMinZ" "40"
- # # Natural scrolling
- # Option "VertTwoFingerScroll" "1"
- # # Option "VertScrollDelta" "-90"
- # Option "HorizTwoFingerScroll" "1"
- # # Option "HorizScrollDelta" "-90"
- # Option "MinSpeed" "1"
- # Option "MaxSpeed" "1"
- # Option "AccelerationProfile" "2"
- # Option "AccelerationNumerator" "5"
- # Option "AccelerationDenominator" "3"
- # Option "AccelerationThreshold" "4"
- # Option "AdaptiveDeceleration" "2"
- # # Option "ConstantDeceleration" "2"
- # EndSection
- # /etc/X11/xorg.conf.d/50-thinkpad_trackpoint.conf
- Section "InputClass"
- Identifier "Clickpad"
- MatchIsTouchpad "on"
- MatchDevicePath "/dev/input/event*"
- Driver "evdev"
- # Synaptics options come here.
- Option "TapButton1" "1"
- Option "TapButton3" "2"
- Option "TapButton2" "3"
- Option "SoftButtonAreas" "60% 0 0 40% 20% 60% 0 20%"
- Option "AreaTopEdge" "20%"
- Option "AreaBottomEdge" "0"
- EndSection
- Section "InputClass"
- Identifier "TrackPoint"
- MatchProduct "TrackPoint"
- MatchDriver "evdev"
- # MatchDevicePath "event"
- Option "EmulateWheel" "true"
- Option "EmulateWheelButton" "2"
- Option "EmulateWheelTimeOut" "200"
- Option "XAxisMapping" "6 7"
- Option "YAxisMapping" "4 5"
- Option "ZAxisMapping" "4 5"
- Option "AccelerationProfile" "2"
- Option "AccelerationNumerator" "5"
- Option "AccelerationDenominator" "3"
- Option "AccelerationThreshold" "4"
- Option "AdaptiveDeceleration" "2"
- # Option "ConstantDeceleration" "2"
- EndSection
- # /etc/X11/xorg.conf.d/60-mouse-acceleration.conf
- Section "InputClass"
- Identifier "My Mouse"
- MatchIsPointer "yes"
- # set the following to 1 1 0 respectively to disable acceleration.
- Option "AccelerationNumerator" "2"
- Option "AccelerationDenominator" "1"
- Option "AccelerationThreshold" "4"
- EndSection
- # /etc/X11/xorg.conf.d/10-monitor.conf
- Section "Monitor"
- Identifier "Monitor[0]"
- Option "DPMS" "false"
- Option "PreferredMode" "1920x1080"
- DisplaySize 310 174
- EndSection
- Section "Device"
- Identifier "Device-intel[0]"
- # Driver "intel"
- Driver "intel"
- BusID "PCI:0:2:0"
- Option "DRI" "3"
- Option "AllowGLXWithComposite" "true"
- Option "TwinView" "true"
- Option "XvMC" "true"
- Option "XAANoOffscreenPixmaps" "true"
- Option "UseEvents" "true"
- # Option "AccelMethod" "glamor"
- Option "AccelMethod" "sna"
- # Option "AccelMethod" "uxa"
- Option "AccelMethod" "none"
- Option "TearFree" "true"
- Option "Tiling" "true"
- Option "SwapBuffersWait" "true"
- Option "Backlight" "intel_backlight"
- EndSection
- Section "Device"
- Identifier "Device-nvidia[0]"
- Driver "nvidia"
- BusID "PCI:2:0:0"
- Option "DRI" "3"
- Option "AllowGLXWithComposite" "true"
- Option "TwinView" "true"
- Option "AddARGBGLXVisuals" "true"
- Option "DisableGLXRootClipping" "true"
- Option "DamageEvents" "true"
- Option "RenderAccel" "true"
- # caution here
- Option "UseEvents" "false"
- Option "TripleBuffer" "true"
- Option "BackingStore" "true"
- Option "AccelMethod" "EXA"
- Option "MigrationHeuristic" "greedy"
- Option "AccelDFS" "true"
- Option "EnablePageFlip" "true"
- Option "EnableDepthMoves" "true"
- Option "NoLogo" "true"
- Option "UseDisplayDevice" "none"
- Option "RegistryDwords" "EnableBrightnessControl=1"
- EndSection
- Section "Screen"
- Identifier "Screen-intel[0]"
- Device "Device-intel[0]"
- Monitor "Monitor[0]"
- DefaultDepth 24
- SubSection "Display"
- Depth 24
- Modes "1920x1080"
- EndSubSection
- EndSection
- Section "Screen"
- Identifier "Screen-nvidia[0]"
- Device "Device-nvidia[0]"
- Monitor "Monitor[0]"
- Option "AllowEmptyInitialConfiguration" "true"
- Option "SLI" "AA"
- Option "RegistryDwords" "PerfLevelSrc=0x2222"
- Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
- DefaultDepth 24
- SubSection "Display"
- Depth 24
- Modes "1920x1080"
- EndSubSection
- EndSection
- Section "Module"
- Load "glx"
- Load "dbe"
- Load "extmod"
- Load "dri"
- Load "dri2"
- EndSection
- Section "Extensions"
- Option "Composite" "Enable"
- EndSection
- Section "ServerLayout"
- Identifier "Layout[all]"
- # Inactive "Device-intel[0]"
- Screen 0 "Screen-nvidia[0]"
- Screen "Screen-intel[0]"
- Option "Xinerama" "true"
- Option "AIGLX" "true"
- Option "DRI2" "true"
- Option "GlxVisuals" "all"
- Option "StandbyTime" "0"
- Option "SuspendTime" "0"
- Option "OffTime" "0"
- Option "BlankTime" "0"
- EndSection
- Section "ServerFlags"
- Option "DefaultServerLayout" "Layout[all]"
- EndSection
- '';
- desktopManager = {
- kde4.enable = false;
- xterm.enable = false;
- default = "none";
- };
- displayManager.slim = {
- enable = true;
- defaultUser = "netsu";
- # autoLogin = true;
- # hideCursor = true;
- };
- windowManager.xmonad = {
- enable = true;
- enableContribAndExtras = true;
- };
- };
- services.acpid.enable = true;
- # services.thinkfan.enable = true;
- # services.thinkfan.sensor = "/sys/class/hwmon/hwmon0/temp1_input";
- powerManagement.enable = true;
- powerManagement.cpuFreqGovernor = "ondemand";
- hardware.bumblebee.enable = true;
- environment.etc."bumblebee/bumblebee.conf".text = ''
- # Configuration file for Bumblebee. Values should **not** be put between quotes
- ## Server options. Any change made in this section will need a server restart
- # to take effect.
- [bumblebeed]
- # The secondary Xorg server DISPLAY number
- # VirtualDisplay=:8
- # Should the unused Xorg server be kept running? Set this to true if waiting
- # for X to be ready is too long and don't need power management at all.
- KeepUnusedXServer=false
- # The name of the Bumbleblee server group name (GID name)
- # ServerGroup=bumblebee
- # Card power state at exit. Set to false if the card shoud be ON when Bumblebee
- # server exits.
- TurnCardOffAtExit=false
- # The default behavior of '-f' option on optirun. If set to "true", '-f' will
- # be ignored.
- NoEcoModeOverride=false
- # The Driver used by Bumblebee server. If this value is not set (or empty),
- # auto-detection is performed. The available drivers are nvidia and nouveau
- # (See also the driver-specific sections below)
- Driver=nvidia
- ## Client options. Will take effect on the next optirun executed.
- [optirun]
- # Acceleration/ rendering bridge, possible values are auto, virtualgl and
- # primus.
- Bridge=auto
- # The method used for VirtualGL to transport frames between X servers.
- # Possible values are proxy, jpeg, rgb, xv and yuv.
- VGLTransport=xv
- # Should the program run under optirun even if Bumblebee server or nvidia card
- # is not available?
- AllowFallbackToIGC=false
- # Driver-specific settings are grouped under [driver-NAME]. The sections are
- # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
- # detection resolves to NAME).
- # PMMethod: method to use for saving power by disabling the nvidia card, valid
- # values are: auto - automatically detect which PM method to use
- # bbswitch - new in BB 3, recommended if available
- # switcheroo - vga_switcheroo method, use at your own risk
- # none - disable PM completely
- # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
- ## Section with nvidia driver specific options, only parsed if Driver=nvidia
- [driver-nvidia]
- # Module name to load, defaults to Driver if empty or unset
- KernelDriver=nvidia
- PMMethod=bbswitch
- # colon-separated path to the nvidia libraries
- # LibraryPath=/usr/lib/nvidia:/usr/lib32/nvidia
- # comma-separated path of the directory containing nvidia_drv.so and the
- # default Xorg modules path
- # XorgModulePath=/usr/lib/nvidia/xorg/,/usr/lib/xorg/modules
- # XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
- XorgConfFile=/etc/X11/xorg.conf
- ## Section with nouveau driver specific options, only parsed if Driver=nouveau
- [driver-nouveau]
- KernelDriver=nouveau
- PMMethod=bbswitch
- XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
- '';
- hardware.opengl.s3tcSupport = true;
- hardware.trackpoint.sensitivity = 255;
- # hardware.trackpoint.speed = 255;
- # hardware.firmware = [ pkgs.linuxPackages_4_1.mt7601 ];
- hardware.enableAllFirmware = true;
- # User account
- users.extraUsers.netsu = {
- isNormalUser = true;
- name = "netsu";
- description = "Yuriy Pitomets";
- group = "users";
- extraGroups = [ "wheel" "network" "disk" ];
- uid = 1000;
- createHome = true;
- home = "/home/netsu";
- hashedPassword = "RXBFfJzQ59q6Q";
- };
- users.mutableUsers = false;
- users.extraUsers.root = {
- hashedPassword = null;
- initialHashedPassword = null;
- initialPassword = null;
- password = null;
- passwordFile = null;
- };
- services.openssh.permitRootLogin = "no";
- # Make Zsh the default shell system-wide
- users.defaultUserShell = "/run/current-system/sw/bin/zsh";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement