Advertisement
Guest User

conf

a guest
Aug 22nd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 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, lib, ... }:
  6. #{ config ? null, pkgs ? null, ... }:
  7.  
  8. /*let
  9. unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
  10. in {
  11. environment.systemPackages = [ unstable.PACKAGE_NAME ];
  12. }
  13. */
  14. let
  15. list = map (x: x + 1714) (builtins.genList (x: x + 1) (1764 - 1714));
  16. in {
  17. imports =
  18. [ # Include the results of the hardware scan.
  19. ./hardware-configuration.nix
  20. ];
  21.  
  22. # Use the GRUB 2 boot loader.
  23. boot = {
  24. loader.grub = {
  25. enable = true;
  26. version = 2;
  27. # grub.efiSupport = true;
  28. # grub.efiInstallAsRemovable = true;
  29. # efi.efiSysMountPoint = "/boot/efi";
  30. device = "/dev/sda"; # or "nodev" for efi only
  31. };
  32. # Define on which hard drive you want to install Grub.
  33. initrd.luks.devices = [{
  34. name = "root";
  35. device = "/dev/sda3";
  36. preLVM = true;
  37. }];
  38. kernelPackages = pkgs.linuxPackages_latest;
  39. };
  40. # Select internationalisation properties.
  41. # i18n = {
  42. # consoleFont = "Lat2-Terminus16";
  43. # consoleKeyMap = "us";
  44. # defaultLocale = "en_US.UTF-8";
  45. # };
  46.  
  47. # Set your time zone.
  48. time.timeZone = "America/New_York";
  49. powerManagement.enable = true;
  50.  
  51. # List packages installed in system profile. To search by name, run:
  52. # $ nix-env -qaP | grep wget
  53. # nixpkgs.config.allowUnfree = true;
  54. nixpkgs.config = {
  55. allowUnfree = true;
  56. packageOverrides = pkgs: with pkgs.stdenv.lib;
  57. let
  58. libdrm = pkgs.libdrm.overrideAttrs(attrs: rec {
  59. name = "libdrm-2.4.79";
  60. src = pkgs.fetchurl {
  61. url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
  62. sha256 = "15xiwnicf7vl1l37k8nj0z496p7ln1qp8qws7q13ikiv54cz7an6";
  63. };
  64. });
  65.  
  66. mesa = ((pkgs.mesa_noglu.override {
  67. # this is probably the default by now in nixpkgs
  68. # without it you get opengl 2.1 contexts
  69. enableTextureFloats = true;
  70. enableRadv = true; # this isn't really needed when setting 'vulkanDrivers'
  71. galliumDrivers = [ "radeonsi" ];
  72. driDrivers = [ "radeon" ];
  73. vulkanDrivers = [ "radeon" ];
  74. llvmPackages =
  75. let
  76. rev = "299814";
  77. fetch = name: sha256: pkgs.fetchsvn {
  78. url = "http://llvm.org/svn/llvm-project/${name}/trunk/";
  79. inherit rev sha256;
  80. };
  81. src = fetch "llvm" "0x5l9ryr209wpmcrkb5yn35g88sfvwswljd0k9q6ymyxh3hrydw9";
  82. compiler-rt_src = fetch "compiler-rt" "0smfm4xw0m8l49lzlqvxf0407h6nqgy0ld74qx8yw7asvyzldjsl";
  83. in {
  84. llvm = pkgs.llvmPackages_4.llvm.overrideAttrs(attrs: {
  85. name = "llvm-git";
  86. unpackPhase = ''
  87. unpackFile ${src}
  88. chmod -R u+w llvm-*
  89. mv llvm-* llvm
  90. sourceRoot=$PWD/llvm
  91. unpackFile ${compiler-rt_src}
  92. chmod -R u+w compiler-rt-*
  93. mv compiler-rt-* $sourceRoot/projects/compiler-rt
  94. '';
  95. # this was the quickest hack to deal with the existing postPatch
  96. # script deleting these files later on
  97. postPatch = ''
  98. touch test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll
  99. touch test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll
  100. touch test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll
  101. touch test/CodeGen/AMDGPU/runtime-metadata.ll
  102. '' + attrs.postPatch;
  103. });
  104. };
  105. libdrm = libdrm;
  106. }).overrideAttrs(attrs: {
  107. name = "mesa-git";
  108. src = pkgs.fetchgit {
  109. url = "https://anongit.freedesktop.org/git/mesa/mesa.git";
  110. rev = "098ca9949db35cbad92728b5d216aa37685b33ba";
  111. sha256 = "1pw2ymphmpxyjqk141vx2wxmkgh2scd3wdfkzwj0ggdf9jwl7fvm";
  112. };
  113. # this nixpkg version of this patch didn't apply cleanly
  114. # we should probably find a less fragile way of doing this
  115. # patches = [ ./mesa-symlink-drivers.patch ];
  116. patches = [ ];
  117. nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.bison pkgs.flex ];
  118. }));
  119.  
  120. in {
  121. steam = pkgs.steam.override {
  122. # newStdcpp = true;
  123. };
  124. mesa_drivers = mesa.drivers;
  125. };
  126. };
  127.  
  128.  
  129. sound.mediaKeys.enable = true;
  130. hardware.opengl.driSupport32Bit = true;
  131. hardware.opengl.s3tcSupport = true; # use patented texture compressor
  132. hardware.pulseaudio.support32Bit = true;
  133.  
  134. fonts = {
  135. enableFontDir = true;
  136. enableGhostscriptFonts = true;
  137. fontconfig = {
  138. defaultFonts.monospace = [ "Fira Mono" ];
  139. defaultFonts.sansSerif = [ "Fira Sans" ];
  140. ultimate.enable = true;
  141. };
  142. fonts = with pkgs; [
  143. fira-code fira-mono font-droid
  144. ];
  145. };
  146. hardware.pulseaudio.enable = true;
  147.  
  148.  
  149.  
  150. # Some programs need SUID wrappers, can be configured further or are
  151. # started in user sessions.
  152. programs.bash.enableCompletion = true;
  153. # programs.mtr.enable = true;
  154. # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  155.  
  156. # List services that you want to enable:
  157.  
  158. # Enable the OpenSSH daemon.
  159. services = {
  160. postgresql.enable = true;
  161. postgresql.package = pkgs.postgresql94;
  162. postgresql.authentication = lib.mkForce ''
  163. # Generated file; do not edit!
  164. # TYPE DATABASE USER ADDRESS METHOD
  165. local all all trust
  166. host all all 127.0.0.1/32 trust
  167. host all all ::1/128 trust
  168. '';
  169. openssh.enable = true;
  170. xserver = {
  171. enable = true;
  172. videoDrivers = [ "mesa" ];
  173. displayManager.sddm.enable = true;
  174. windowManager.dwm.enable = true;
  175. windowManager.i3.enable = true;
  176. windowManager.i3.package = pkgs.i3-gaps;
  177. windowManager.default = "i3";
  178. # NEVER DO THIS desktopManager.plasma5.enable = true;
  179. libinput.enable = true;
  180. };
  181. nixosManual.showManual = true;
  182. cron.enable = true;
  183. cron.systemCronJobs = [
  184. ];
  185. };
  186.  
  187. # Open ports in the firewall.
  188. networking = {
  189. firewall.allowedTCPPorts = list ++ [ 22 ];
  190. firewall.allowedUDPPorts = list ++ [ 22 ];
  191. firewall.enable = false;
  192. hostName = "4th";
  193. networkmanager.enable = true;
  194. };
  195.  
  196. # Or disable the firewall altogether.
  197. # networking.firewall.enable = false;
  198.  
  199. # Enable CUPS to print documents.
  200. # services.printing.enable = true;
  201.  
  202. # Enable the X11 windowing system.
  203. # services.xserver.enable = true;
  204. # services.xserver.layout = "us";
  205. # services.xserver.xkbOptions = "eurosign:e";
  206.  
  207. # Enable touchpad support.
  208. # services.xserver.libinput.enable = true;
  209.  
  210. # Enable the KDE Desktop Environment.
  211. # services.xserver.displayManager.sddm.enable = true;
  212. # services.xserver.desktopManager.plasma5.enable = true;
  213.  
  214. # Define a user account. Don't forget to set a password with 'passwd’.
  215.  
  216. users.extraUsers.trev = {
  217. isNormalUser = true;
  218. name = "trev";
  219. group = "users";
  220. createHome = true;
  221. home = "/home/trev";
  222. shell = "/run/current-system/sw/bin/bash";
  223. uid = 1000;
  224. extraGroups = [ "networkmanager" "wheel" "audio" "video" ];
  225.  
  226. packages = with pkgs; [
  227. libGLU_combined
  228. # languages
  229. gcc
  230. gforth
  231. #Lisps
  232. chez
  233. chicken
  234. clisp
  235. pltScheme
  236.  
  237. texlive.combined.scheme-full
  238. go
  239. jdk8
  240. # terminals
  241. terminator termite st tmux
  242. screen
  243.  
  244. #Python Tools
  245. pywal python36Packages.pip python36Full
  246.  
  247. #Image Manipulation
  248. gimp
  249. krita
  250.  
  251. # General Purpose Tools
  252. vimHugeX calcurse
  253. firefox mpd
  254. scim ncmpcpp
  255. neovim
  256. unzip scrot
  257. codeblocks ffmpeg-full
  258. blender
  259.  
  260. #Chat
  261. weechat
  262. tdesktop
  263. telegram-cli
  264. signal-desktop
  265.  
  266. #Gaming
  267. openmw openmw-tes3mp
  268. bsdgames
  269. steam
  270. kdeconnect
  271. mupdf i3blocks
  272. openshot-qt
  273. pandoc ncpamixer imagemagick
  274. multimarkdown odpdown rubber openssh
  275. kvm tdesktop
  276. gmpc playonlinux
  277. ];
  278. };
  279.  
  280. # This value determines the NixOS release with which your system is to be
  281. # compatible, in order to avoid breaking some software such as database
  282. # servers. You should change this only after NixOS release notes say you
  283. # should.
  284. system = {
  285. stateVersion = "18.03"; # Did you read the comment?
  286. autoUpgrade.enable = true;
  287. };
  288. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement