Advertisement
Guest User

Untitled

a guest
Nov 20th, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.02 KB | None | 0 0
  1. # Edit this configuration file to define what should be installed on
  2. # your system. Help is available in the configuration.nix(5) man page
  3. # and in the NixOS manual (accessible by running ‘nixos-help’).
  4.  
  5. { config, pkgs, ... }:
  6.  
  7. {
  8. imports =
  9. [ # Include the results of the hardware scan.
  10. ./hardware-configuration.nix
  11. ];
  12. boot = {
  13. cleanTmpDir = true;
  14. kernelModules = [ "kvm-intel" "fuse" ];
  15. #kernelPackages = pkgs.linuxPackages_latest;
  16. supportedFilesystems = [ "ntfs-3g" ];
  17. loader = {
  18. #systemd-boot.enable = true;
  19. #efi.efiSysMountPoint = "/boot/efi";
  20. grub = {
  21. #efiSupport = true;
  22. #efiInstallAsRemovable = true;
  23. #useOSProber = true;
  24. enable = true;
  25. version = 2;
  26. device = "/dev/sda"; }; }; };
  27. environment.systemPackages = with pkgs; ([
  28. tmux mc ntfs3g python2Full mate.engrampa
  29. gnupg gnupg1compat gitFull cmake gnumake gcc8
  30. firefox vlc neofetch wget python3Full iw cabal-install
  31. djview xpdf rsync ffmpeg-full python37Full
  32. chromium pavucontrol geany aqemu pinentry
  33. ripgrep global coreutils skype adobe-reader
  34. direnv emacs fasd fzf zip unzip unrar p7zip
  35. fuse appimage-run libreoffice-fresh vscode nim
  36. bison flex openssl curl apulse pamixer pamix
  37. snappy libopus nss xorg.libxkbfile xorg.libXScrnSaver
  38. harfbuzzFull gtk2-x11 gnome2.gtk flac libelf
  39. xdg_utils gparted acpi bc acpitool htop ncurses
  40. imagemagick speedcrunch links paprefs pasystray tor
  41. torsocks torbrowser playonlinux wineFull winetricks
  42. audacity gnome3.gnome-sound-recorder wxcam acpid
  43. xfce.xfce4-xkb-plugin xfce.xfce4-clipman-plugin
  44. xmonad-with-packages xmonad_log_applet_xfce xmonad-log
  45. ] ++
  46. ( with haskellPackages; [
  47. ghcid
  48. xmobar
  49. yeganesh
  50. DescriptiveKeys
  51. xmonad
  52. xmonad-contrib
  53. xmonad-entryhelper
  54. xmonad-eval
  55. xmonad-extras
  56. xmonad-screenshot
  57. xmonad-utils
  58. xmonad-vanessa
  59. xmonad-volume
  60. xmonad-wallpaper
  61. xmonad-windownames
  62. ])
  63. ++ lib.optionals stdenv.isLinux [
  64. arandr autorandr cabal2nix
  65. docker docker_compose dunst feh
  66. libnotify lightum powertop rofi rofi-menugen
  67. rofi-pass scrot rofi-systemd
  68. stalonetray unclutter-xfixes
  69. wirelesstools xclip xsel
  70. xorg.libXrandr xorg.xbacklight
  71. xorg.xcursorthemes xorg.xf86inputkeyboard zeal
  72. ]);
  73. fonts = {
  74. enableFontDir = true;
  75. enableGhostscriptFonts = true;
  76. fonts = with pkgs; [
  77. noto-fonts noto-fonts-emoji
  78. noto-fonts-extra noto-fonts-cjk
  79. liberation_ttf ];
  80. enableDefaultFonts = true;
  81. fontconfig.defaultFonts = {
  82. monospace = [ "Noto Mono" ];
  83. sansSerif = [ "Noto Sans" ];
  84. serif = [ "Noto Serif" ]; }; };
  85. sound = { enable = true; mediaKeys.enable = true; };
  86. zramSwap = { enable = true; memoryPercent = 50; };
  87. time.timeZone = "Europe/Moscow";
  88. #powerManagement.cpuFreqGovernor = "performance";
  89. hardware = {
  90. bluetooth.enable = true;
  91. enableRedistributableFirmware = true;
  92. cpu.intel.updateMicrocode = true;
  93. #cpu.amd.updateMicrocode = true;
  94. enableAllFirmware = true;
  95. opengl = {
  96. enable = true;
  97. driSupport = true;
  98. driSupport32Bit = true;
  99. extraPackages = with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ];
  100. extraPackages32 = with pkgs.pkgsi686Linux; [ vaapiIntel libvdpau-va-gl vaapiVdpau ];
  101. s3tcSupport = true; };
  102. pulseaudio = {
  103. enable = true;
  104. package = pkgs.pulseaudioFull;
  105. support32Bit = true;
  106. systemWide = true; }; };
  107. i18n = {
  108. consoleFont = "UniCyr_8x16";
  109. consoleKeyMap = "ruwin_cplk-UTF-8";
  110. defaultLocale = "ru_RU.UTF-8";
  111. consoleColors = [ "1C1B19" "EF2F27" "519F50" "FBB829"
  112. "2C78BF" "E02C6D" "0AAEB3" "918175"
  113. "2D2C29" "F75341" "98BC37" "FED06E"
  114. "68A8E4" "FF5C8F" "53FDE9" "FCE8C3" ]; };
  115. networking = { hostName = "ollerus"; networkmanager.enable = true; };
  116. programs = {
  117. java.enable = true;
  118. mtr.enable = true;
  119. adb.enable = true;
  120. light.enable = true;
  121. zsh = {
  122. enable = true;
  123. enableCompletion = true;
  124. autosuggestions.enable = true;
  125. syntaxHighlighting.enable = true;
  126. interactiveShellInit = ''ZSH_TMUX_AUTOSTART=true
  127. ZSH_TMUX_AUTOQUIT=true'';
  128. ohMyZsh = {
  129. enable = true;
  130. theme = "bira";
  131. plugins = [ "tmux" "sudo" "systemd"
  132. "jira" "httpie" "rsync"
  133. "git-extras" "common-aliases"
  134. "pip" "python" "vscode" ]; }; }; };
  135. security.sudo.enable = true;
  136. security.sudo.wheelNeedsPassword = false;
  137. security.sudo.extraConfig = ''
  138. ALL ALL = (root) NOPASSWD: ${pkgs.iw}/bin/iw
  139. ALL ALL = (root) NOPASSWD: ${pkgs.light}/bin/light
  140. ALL ALL = (root) NOPASSWD: ${pkgs.systemd}/bin/shutdown
  141. ALL ALL = (root) NOPASSWD: ${pkgs.systemd}/bin/reboot
  142. '';
  143. services.actkbd.enable = true;
  144. services.acpid.enable = true;
  145. services.thermald.enable = true;
  146. services.tlp.enable = true;
  147. services.illum.enable = true;
  148. services.printing = {
  149. enable = true;
  150. drivers = with pkgs; [ hplipWithPlugin epson-escpr gutenprint splix cups-bjnp
  151. gutenprintBin samsungUnifiedLinuxDriver ghostscript ]; };
  152. services.openssh.enable = true;
  153. services.dbus = { enable = true; packages = with pkgs; [ gnome2.GConf ]; };
  154. services.cron.enable = true;
  155. services.locate.enable = true;
  156. services.autorandr.enable = true;
  157. services.udisks2.enable = true;
  158. services.ntp.enable = true;
  159. services.tor.enable = true;
  160. system = {
  161. #autoUpgrade.enable = true;
  162. stateVersion = "unstable";
  163. autoUpgrade.channel = https://nixos.org/channels/nixos-unstable; };
  164. nix = {
  165. gc.automatic = true;
  166. autoOptimiseStore = true;
  167. useSandbox = true;
  168. binaryCaches = [ https://cache.nixos.org https://peel.cachix.org ];
  169. trustedUsers = [ "obliq" "root" ]; };
  170. nixpkgs.config = {
  171. allowUnsupportedSystem = false;
  172. allowBroken = true;
  173. allowUnfree = true; };
  174. users.extraGroups.pulse-access.members = [ "nick" "other" "guest" "root" "users" "wheel" ];
  175. users.extraGroups.audio.members = [ "nick" "other" "guest" "root" "users" "wheel" ];
  176. users.extraUsers.obliq = {
  177. isNormalUser = true;
  178. group = "users";
  179. uid = 1000;
  180. shell = pkgs.zsh;
  181. extraGroups = [ "audio" "adb" "adbuser" "docker" "host"
  182. "pulse" "video" "wheel" "vboxusers" "systemd-journal"
  183. "libvirtd" "docker" "virtualisation" "networkmanager"
  184. "disk" "messagebus" ]; };
  185. virtualisation = {
  186. docker.enable = true;
  187. virtualbox.host.enable = true;
  188. libvirtd.enable = true; };
  189. systemd.services = {
  190. systemd-tmpfiles-setup.before = [ " sysinit.target " ];
  191. systemd-update-utmp.after = [ " systemd-tmpfiles-setup.service " ]; };
  192. services.xserver.enable = true;
  193. services.xserver.layout = "us,ru";
  194. services.xserver.xkbOptions = "grp:caps_toggle,grp_led:num"; # scroll,num,caps
  195. #services.xserver.libinput.enable = true;
  196. services.xserver.windowManager = { default = "xmonad"; xmonad = { enable = true; enableContribAndExtras = true; }; };
  197. services.xserver.desktopManager = {
  198. xterm.enable = false;
  199. default = "none";
  200. xfce.enable = true;
  201. xfce.enableXfwm = false; };
  202. services.xserver.displayManager.auto = { enable = true; user = "obliq"; };
  203. services.xserver.videoDrivers = [ "intel" ];
  204. services.xserver.synaptics = {
  205. enable = true;
  206. accelFactor = "0.0350939";
  207. vertEdgeScroll = false;
  208. horizEdgeScroll = false;
  209. additionalOptions = ''
  210. Option "LTCornerButton" "2"
  211. Option "RTCornerButton" "3"
  212. Option "TapAndDragGesture" "1"
  213. Option "CircularScrolling" "1"
  214. Option "CircScrollTrigger" "3"
  215. Option "CircScrollDelta" "0.100007"
  216. ''; };
  217. services.compton.enable = true;
  218. services.compton.vSync = "opengl";
  219. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement