Guest User

Untitled

a guest
Mar 13th, 2018
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. { config, pkgs, ... }:
  2.  
  3. {
  4.  
  5. #var.var = value; ## (semicolon!) this is an example of correct entry.
  6.  
  7. imports = [ ./hardware-configuration.nix ];
  8. system.stateVersion = "17.09"; ## systemvar: change only if update process says so.
  9.  
  10. nix.useSandbox = true;
  11. nix.buildCores = 0; ## means all available
  12. nix.maxJobs = 4;
  13.  
  14. nixpkgs.config.allowUnfree = true; ## enable to allow firmware and similar closed things in tree.
  15. nixpkgs.config.allowBroken = false; ## enable to allow broken packages, this is not recommended.
  16.  
  17. nixpkgs.config.firefox.enableAdobeFlash = true; ## must research into "nixpkgs.config" more!
  18.  
  19. nixpkgs.config.packageOverrides = pkgs: {
  20. xterm = pkgs.kdeApplications.konsole;
  21. unstable = import <nixos-unstable> { config = config.nixpkgs.config; };
  22. };
  23.  
  24. ## xterm entry tries to replace xterm package with konsole package.
  25.  
  26. ## allow pkgs from unstable. prepend them with "unstable." like this: "unstable.package"
  27. ## needs that unstable repository channel is added, with nickname "nixos-unstable"
  28.  
  29. environment.systemPackages = with pkgs; [
  30. ## check into unstables with "nix-env -qaP | grep package"
  31. ## -- -- console stuff
  32. bash
  33. bc
  34. binutils
  35. curl
  36. f2fs-tools
  37. file
  38. fuse
  39. gamin
  40. gpm
  41. hdparm
  42. htop
  43. libva-full
  44. ## libtxc_dxtn ## not needed, if s3tcSupport is set
  45. links2
  46. manpages
  47. mc
  48. ntfs3g
  49. openssh
  50. pciutils
  51. smartmontools
  52. sudo
  53. udisks2
  54. unrar
  55. unzip
  56. wget
  57. zip
  58. zlib
  59. ## -- -- desktop-level services, basically services and service applications.
  60. desktop_file_utils
  61. glxinfo
  62. gst_all_1.gnonlin
  63. gst_all_1.gst-libav
  64. gst_all_1.gst-plugins-bad
  65. gst_all_1.gst-plugins-base
  66. gst_all_1.gst-plugins-good
  67. gst_all_1.gst-plugins-ugly
  68. gst_all_1.gst-vaapi
  69. gst_all_1.gstreamer
  70. icedtea_web
  71. #### hplip ## not needed, as long as its pulled by printing.drivers
  72. networkmanager
  73. pavucontrol
  74. pamixer
  75. phonon-backend-gstreamer
  76. pulseaudioFull
  77. radeon-profile
  78. ## -- -- fonts
  79. fira
  80. fira-code
  81. fira-mono
  82. xfontsel
  83. ## -- -- i18n, documentation and similar stuff
  84. kdeApplications.l10n.de.qt4
  85. kdeApplications.l10n.ru.qt4
  86. kdeFrameworks.ki18n
  87. ## -- -- desktop stuff, pure desktop applications.
  88. ark
  89. unstable.audacity ## newer version in unstable
  90. colord-kde
  91. unstable.gwenview
  92. inkscape
  93. gimp-with-plugins
  94. gsmartcontrol
  95. libreoffice-fresh
  96. kate
  97. keepassx-community
  98. konversation
  99. krename
  100. leafpad
  101. unstable.obs-studio
  102. unstable.palemoon ## stable palemoon often segfaults.
  103. unstable.smplayer ## newer version in unstable
  104. unstable.smtube ## newer version in unstable
  105. unstable.unetbootin
  106. unstable.zim
  107. ## -- -- games and similar stuff
  108. doomseeker
  109. freeorion
  110. openarena
  111. urbanterror
  112. zandronum
  113. ];
  114.  
  115. programs.bash.enableCompletion = true;
  116. programs.gnupg.agent.enable = true;
  117. programs.gnupg.agent.enableSSHSupport = true;
  118.  
  119. services.acpid.enable = true;
  120. services.kmscon.hwRender = true;
  121. services.locate.enable = true;
  122. services.nixosManual.showManual = true;
  123. services.ntp.enable = true;
  124. services.openssh.enable = true;
  125. services.printing.enable = true;
  126. services.printing.drivers = with pkgs; [ hplip ];
  127. ## services.teamviewer.enable = true; ## because teamviewer package is disabled
  128. services.xserver.enable = true;
  129. services.xserver.desktopManager.xterm.enable = false;
  130. services.xserver.videoDrivers = [ "radeon" ]; # "nvidia-beta" "intel"
  131. services.xserver.layout = "gb,de,ru";
  132. services.xserver.xkbOptions = "eurosign:e,variant:de"; ## = "eurosign:e";
  133. ## services.xserver.libinput.enable = false;
  134. services.xserver.displayManager.sddm.enable = true;
  135. services.xserver.desktopManager.plasma5.enable = true;
  136.  
  137. hardware.bluetooth.enable = true;
  138. hardware.pulseaudio.enable = true;
  139. hardware.pulseaudio.package = pkgs.pulseaudioFull;
  140. hardware.pulseaudio.support32Bit = true;
  141. hardware.opengl.driSupport32Bit = true;
  142. hardware.opengl.s3tcSupport = true;
  143. hardware.opengl.extraPackages = with pkgs; [ vaapiIntel vaapiVdpau libvdpau-va-gl ];
  144. hardware.opengl.extraPackages32 = with pkgs; [ vaapiIntel vaapiVdpau libvdpau-va-gl ];
  145. hardware.sane.enable = true;
  146.  
  147. boot.loader.grub.device = "/dev/disk/by-id/wwn-0x5000c500af989f69"; ## look up with "ls -l /dev/disk/by-id/" and "lsblk". Make sure that "-part" are not used, those would be partitions.
  148. boot.loader.grub.enable = true;
  149. boot.loader.grub.version = 2;
  150. boot.kernel.sysctl = { "vm.swappiness" = 10; };
  151. boot.cleanTmpDir = true;
  152.  
  153. ## fileSystems."/".device = "SGT1G-ROOT";
  154. ## fileSystems."/".device = "/dev/disk/by-id/wwn-0x5000c500af989f69-part2";
  155. ## above not needed, because hardware-configuration autodetects it.
  156. fileSystems."/".options = [ "defaults" "data=journal" "relatime" ];
  157.  
  158. ## fileSystems."/media/data-disk".label = "SGT1G-DATA"; ## mounting by WWN
  159. fileSystems."/media/data-disk".device = "/dev/disk/by-id/wwn-0x5000c500af989f69-part3";
  160. fileSystems."/media/data-disk".options = [ "defaults" "data=journal" "relatime" ];
  161.  
  162. swapDevices = [ { device = "/dev/disk/by-id/wwn-0x5000c500af989f69-part1"; } ];
  163.  
  164. networking.dhcpcd.enable = false;
  165. networking.firewall.enable = false;
  166. networking.hostName = "nix01";
  167. networking.networkmanager.enable = true;
  168. ## networking.wireless.enable = true; ## conflicts with networkmanager
  169.  
  170. environment.variables.EDITOR = pkgs.lib.mkOverride 0 "nano"; ## making nano default text editor.
  171.  
  172. i18n.consoleFont = "Lat2-Terminus16";
  173. i18n.consoleKeyMap = "de"; ## was "us"
  174. i18n.defaultLocale = "ru_RU.UTF-8"; ## "en_US.UTF-8";
  175. time.timeZone = "Europe/Berlin";
  176.  
  177. users.mutableUsers = true;
  178. users.defaultUserShell = "/var/run/current-system/sw/bin/bash"; ## setting default shell to bash
  179.  
  180. users.extraUsers.userp.isNormalUser = true;
  181. users.extraUsers.userp.uid = 1000;
  182. users.extraUsers.userp.initialPassword = "123123";
  183. users.extraUsers.userp.extraGroups = [ "audio" "disk" "video" "wheel" "networkmanager" "systemd-journal" ];
  184.  
  185. security.pam.services.userp.enableKwallet = true;
  186.  
  187. }
Advertisement
Add Comment
Please, Sign In to add comment