Advertisement
Guest User

Untitled

a guest
Jun 4th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 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.  
  13.  
  14. # nix.nixPath = [
  15. # "nixpkgs=https://releases.nixos.org/nixos/18.09/nixos-18.09.2303.e542fc2c94d/nixexprs.tar.xz"
  16. # "nixos-config=/etc/nixos/configuration.nix"
  17. # "nixpkgs-overlays=/etc/nixos/overlays/"
  18. # ];
  19.  
  20. # Use the GRUB 2 boot loader.
  21. boot.loader.grub.enable = true;
  22. boot.loader.grub.version = 2;
  23. boot.loader.grub.efiSupport = true;
  24. boot.loader.grub.efiInstallAsRemovable = true;
  25. # boot.loader.efi.efiSysMountPoint = "/boot/efi";
  26. # Define on which hard drive you want to install Grub.
  27. boot.loader.grub.device = "nodev"; # or "nodev" for efi only
  28.  
  29. networking.hostName = "nixmech"; # Define your hostname.
  30. networking.hostId = "d6ef9403"; # Define your hostname.
  31. #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  32.  
  33. # Configure network proxy if necessary
  34. # networking.proxy.default = "http://user:password@proxy:port/";
  35. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  36.  
  37. # Select internationalisation properties.
  38. i18n = {
  39. # consoleFont = "Lat2-Terminus16";
  40. consoleKeyMap = "us";
  41. defaultLocale = "en_US.UTF-8";
  42. };
  43.  
  44. # Set your time zone.
  45. time.timeZone = "Asia/Hong_Kong";
  46.  
  47. # List packages installed in system profile. To search, run:
  48. # $ nix search wget
  49. environment.systemPackages = with pkgs; [
  50. wget
  51. vim
  52. emacs
  53. firefox
  54. xscreensaver
  55. unzip
  56. which
  57. networkmanagerapplet
  58. git
  59. tmux
  60. parted
  61. fish
  62. pciutils
  63. smbclient
  64. rxvt_unicode-with-plugins
  65. polybar
  66. compton
  67. brave
  68. ];
  69.  
  70. # Some programs need SUID wrappers, can be configured further or are
  71. # started in user sessions.
  72. # programs.mtr.enable = true;
  73. # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  74.  
  75. # List services that you want to enable:
  76.  
  77. # Enable the OpenSSH daemon.
  78. services.openssh.enable = true;
  79.  
  80. # Open ports in the firewall.
  81. # networking.firewall.allowedTCPPorts = [ ... ];
  82. # networking.firewall.allowedUDPPorts = [ ... ];
  83. # Or disable the firewall altogether.
  84. # networking.firewall.enable = false;
  85.  
  86. # Enable CUPS to print documents.
  87. # services.printing.enable = true;
  88.  
  89. # Enable sound.
  90. sound.enable = true;
  91. hardware.pulseaudio.enable = true;
  92.  
  93. # Enable the X11 windowing system.
  94. # services.xserver.enable = true;
  95. # services.xserver.layout = "us";
  96. # services.xserver.xkbOptions = "eurosign:e";
  97.  
  98. # Enable touchpad support.
  99. # services.xserver.libinput.enable = true;
  100.  
  101. # Enable the KDE Desktop Environment.
  102. # services.xserver.displayManager.sddm.enable = true;
  103. # services.xserver.desktopManager.plasma5.enable = true;
  104.  
  105. services.xserver = {
  106. enable = true;
  107. desktopManager = {
  108. default = "none";
  109. xterm.enable = false;
  110. };
  111. windowManager.i3 = {
  112. enable = true;
  113. package = pkgs.i3-gaps;
  114. };
  115. windowManager.default = "i3";
  116.  
  117. layout = "us";
  118. libinput.enable = true;
  119. };
  120.  
  121. # Define a user account. Don't forget to set a password with ‘passwd’.
  122. # users.users.guest = {
  123. # isNormalUser = true;
  124. # uid = 1000;
  125. # };
  126.  
  127. users.extraUsers.wayc = {
  128. createHome = true;
  129. extraGroups = ["wheel" "audio" "video" "disk" "networkmanager"];
  130. group = "users";
  131. home = "/home/wayc";
  132. isNormalUser = true;
  133. uid = 1000;
  134. shell = pkgs.fish;
  135. };
  136.  
  137. nixpkgs.config = {
  138. # allow unfree packages
  139. allowUnfree = true;
  140. packageOverrides = pkgs: rec {
  141. polybar = pkgs.polybar.override {
  142. i3Support = true;
  143. };
  144. };
  145. };
  146.  
  147. services.xserver.videoDrivers = [ "nvidia" ];
  148. hardware.nvidia.optimus_prime.enable = true;
  149. hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
  150. hardware.nvidia.optimus_prime.intelBusId = "PCI:2:0:0";
  151.  
  152. fonts = {
  153. fonts = with pkgs; [
  154. nerdfonts
  155. source-code-pro
  156. roboto-mono
  157. ];
  158. };
  159.  
  160. # auto mount our FreeNAS SMB share
  161. fileSystems."/mnt/freenas" = {
  162. device = "//192.168.1.187/SMBMediaLibrary";
  163. fsType = "cifs";
  164. options = [ "username=wchan" "password=xxxxxxxx" "rw" "uid=1000" "gid=100" ];
  165. };
  166.  
  167. system.autoUpgrade.enable = true;
  168. system.autoUpgrade.channel = https://nixos.org/channels/nixos-19.03;
  169.  
  170. # This value determines the NixOS release with which your system is to be
  171. # compatible, in order to avoid breaking some software such as database
  172. # servers. You should change this only after NixOS release notes say you
  173. # should.
  174. system.stateVersion = "18.09"; # Did you read the comment?
  175.  
  176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement