Advertisement
Guest User

configuration.nix

a guest
Nov 1st, 2017
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 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. nixpkgs.config.allowUnfree = true;
  14.  
  15. # Use the GRUB 2 boot loader.
  16. boot.loader.grub.enable = true;
  17. boot.loader.grub.version = 2;
  18. # boot.loader.grub.efiSupport = true;
  19. # boot.loader.grub.efiInstallAsRemovable = true;
  20. # boot.loader.efi.efiSysMountPoint = "/boot/efi";
  21. # Define on which hard drive you want to install Grub.
  22. boot.loader.grub.device = "nodev"; # or "nodev" for efi only
  23. boot.blacklistedKernelModules = [ "i915" ]; # to disable the integrated intel graphics
  24.  
  25. networking.hostName = "HOSTNAME"; # Define your hostname.
  26. networking.networkmanager.enable = true;
  27. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  28.  
  29. # Select internationalisation properties.
  30. i18n = {
  31. consoleFont = "Lat2-Terminus16";
  32. consoleKeyMap = "sv-latin1"; # "us";
  33. defaultLocale = "en_US.UTF-8";
  34. };
  35.  
  36. # Set your time zone.
  37. time.timeZone = "Europe/Stockholm";
  38.  
  39. fonts = {
  40. enableFontDir = true;
  41. fonts = with pkgs; [
  42. corefonts
  43. fira-code
  44. fira-mono
  45. inconsolata
  46. terminus_font
  47. dejavu_fonts
  48. font-awesome-ttf
  49. ubuntu_font_family
  50. source-code-pro
  51. source-sans-pro
  52. source-serif-pro
  53. ];
  54. };
  55.  
  56. # List packages installed in system profile. To search by name, run:
  57. # $ nix-env -qaP | grep wget
  58. environment.systemPackages = with pkgs; [
  59. ntfs3g
  60.  
  61. # bashCompletion
  62. (import ./vim.nix)
  63. firefox
  64.  
  65. mpv
  66. vlc
  67.  
  68. i3status i3blocks i3lock
  69. lm_sensors playerctl sysstat acpi
  70.  
  71. # qutebrowser
  72. rxvt_unicode
  73. dmenu
  74. pulseaudioFull pavucontrol pamixer
  75.  
  76. dwarf-fortress
  77. ];
  78.  
  79. # to achieve similar bash features as ubuntus standard--> might make bash dogslow
  80. programs.bash.enableCompletion = true;
  81.  
  82. programs.bash.interactiveShellInit = "# Check the window size after every command.\nshopt -s checkwinsize\n\n# Disable hashing (i.e. caching) of command lookups.\nset +h\n\n# Provide a nice prompt if the terminal supports it.\nif [ \"$TERM\" != \"dumb\" -o -n \"$INSIDE_EMACS\" ]; then\n PROMPT_COLOR=\"1;31m\"\n let $UID && PROMPT_COLOR=\"1;32m\"\n PS1=\"\\n\\[\\033[$PROMPT_COLOR\\][\\u@\\h:\\w]\\\\$\\[\\033[0m\\] \"\n if test \"$TERM\" = \"xterm\"; then\n PS1=\"\\[\\033]2;\\h:\\u:\\w\\007\\]$PS1\"\n fi\nfi\n\n\nalias l='ls -alh'\nalias ll='ls -l'\nalias ls='ls --color=tty'\n\n\n";
  83.  
  84.  
  85. # List services that you want to enable:
  86.  
  87. services.locate.enable = true;
  88.  
  89. # Enable the OpenSSH daemon.
  90. # services.openssh.enable = true;
  91.  
  92. # Open ports in the firewall.
  93. # networking.firewall.allowedTCPPorts = [ ... ];
  94. # networking.firewall.allowedUDPPorts = [ ... ];
  95. # Or disable the firewall altogether.
  96. # networking.firewall.enable = false;
  97.  
  98. # Enable CUPS to print documents.
  99. # services.printing.enable = true;
  100.  
  101. hardware.cpu.intel.updateMicrocode = true;
  102.  
  103. hardware.pulseaudio.enable = true;
  104.  
  105. # Enable the X11 windowing system.
  106. services.xserver.enable = true;
  107. services.xserver.layout = "se"; # "us";
  108. services.xserver.xkbOptions = "eurosign:e";
  109. services.xserver.videoDrivers = [ "intel" ]; # "nvidia" ];
  110. hardware.opengl.driSupport32Bit = true;
  111.  
  112. services.xserver.libinput.enable = false;
  113. services.xserver.synaptics.enable = true;
  114. services.xserver.synaptics.twoFingerScroll = true;
  115.  
  116.  
  117. # Enable the desktop environments
  118. services.xserver.displayManager.gdm.enable = true;
  119. services.xserver.desktopManager.gnome3.enable = true;
  120. # services.xserver.desktopManager.plasma5.enable = true;
  121. services.xserver.windowManager.i3.enable = true;
  122.  
  123. # eduroam (european university) wifi certificate config
  124. security.pki.certificateFiles = [ "/etc/nixos/eduroam-cert/DigiCertAssuredIDRootCA.crt" ];
  125.  
  126. # Define a user account. Don't forget to set a password with ‘passwd’.
  127. users.extraUsers.USERNAME = {
  128. isNormalUser = true;
  129. home = "/home/USERNAME";
  130. description = "NAME";
  131. extraGroups = [ "wheel" "networkmanager" "audio" "video" "disk" "systemd-journal" ];
  132. uid = 1000;
  133. # shell = "/run/current-system/sw/bin/fish";
  134. };
  135.  
  136. services.nixosManual.showManual = true;
  137.  
  138. # The NixOS release to be compatible with for stateful data such as databases.
  139. system.stateVersion = "17.09";
  140.  
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement