Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.18 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. # Use the systemd-boot EFI boot loader.
  14. boot.loader.systemd-boot.enable = true;
  15. boot.loader.efi.canTouchEfiVariables = true;
  16.  
  17. networking.hostName = "skykaninNixOS"; # Define your hostname.
  18. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  19. networking.networkmanager.enable = true;
  20. hardware.brightnessctl.enable = true;
  21. hardware.bluetooth.enable = true;
  22.  
  23. # Configure network proxy if necessary
  24. # networking.proxy.default = "http://user:password@proxy:port/";
  25. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  26.  
  27. # Select internationalisation properties.
  28. # i18n = {
  29. # consoleFont = "Lat2-Terminus16";
  30. # consoleKeyMap = "us";
  31. # defaultLocale = "en_US.UTF-8";
  32. # };
  33.  
  34. # Set your time zone.
  35. time.timeZone = "Europe/Oslo";
  36.  
  37. # List packages installed in system profile. To search, run:
  38. # $ nix search wget
  39. environment.systemPackages = with pkgs; [
  40. arc-icon-theme
  41. arc-theme
  42. ant-theme
  43. clojure
  44. curl
  45. discord
  46. docker
  47. (import /home/skykanin/Documents/emacs.nix { inherit pkgs; }) # Emacs with my pkgs
  48. firefox
  49. font-awesome_4
  50. ghc
  51. gnome3.networkmanagerapplet
  52. git
  53. kitty
  54. my-idea-ultimate
  55. my-leiningen
  56. lxappearance-gtk3
  57. neofetch
  58. nitrogen
  59. oh-my-zsh
  60. pamixer
  61. pywal
  62. rofi
  63. wget
  64. xorg.xbacklight
  65. zsh
  66. ];
  67.  
  68. # Some programs need SUID wrappers, can be configured further or are
  69. # started in user sessions.
  70. # programs.mtr.enable = true;
  71. # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  72.  
  73. # List services that you want to enable:
  74.  
  75. # Enable the OpenSSH daemon.
  76. services.openssh.enable = true;
  77.  
  78. # Open ports in the firewall.
  79. # networking.firewall.allowedTCPPorts = [ ... ];
  80. # networking.firewall.allowedUDPPorts = [ ... ];
  81. # Or disable the firewall altogether.
  82. # networking.firewall.enable = false;
  83.  
  84. # Enable CUPS to print documents.
  85. # services.printing.enable = true;
  86.  
  87. # Enable sound.
  88. sound.enable = true;
  89. hardware.pulseaudio = {
  90. enable = true;
  91. # Only the full build has Bluetooth support, so it must be selected here.
  92. package = pkgs.pulseaudioFull;
  93. };
  94.  
  95.  
  96.  
  97. # Nixpkgs overlays
  98. nixpkgs.overlays = [
  99. (self: super: {
  100. my-polybar = super.polybar.override {
  101. i3Support = true;
  102. pulseSupport = true;
  103. };
  104. })
  105. (self: super: {
  106. my-jbr = super.jetbrains.jdk.override {
  107. url = "https://jetbrains.bintray.com/intellij-jdk/jbr-11_0_2-linux-x64-b164.tar.gz";
  108. };
  109. })
  110. (self: super: {
  111. my-leiningen = super.leiningen.override {
  112. jdk = pkgs.openjdk11;
  113. };
  114. })
  115. (self: super: {
  116. my-idea-ultimate = super.jetbrains.idea-ultimate.override {
  117. jdk = pkgs.jetbrains.jdk;
  118. };
  119. })
  120. ];
  121.  
  122. # Enable the X11 windowing system.
  123. # services.xserver.enable = true;
  124. # services.xserver.layout = "us";
  125. # services.xserver.xkbOptions = "eurosign:e";
  126.  
  127. services.xserver = {
  128. enable = true;
  129. layout = "no";
  130. libinput = {
  131. enable = true;
  132. naturalScrolling = true;
  133. };
  134. autorun = true;
  135.  
  136. windowManager.default = "i3";
  137. windowManager.i3 = {
  138. enable = true;
  139. configFile = /home/skykanin/.config/i3/config;
  140. package = pkgs.i3-gaps;
  141. extraPackages = with pkgs; [
  142. rofi
  143. my-polybar
  144. betterlockscreen
  145. ];
  146. };
  147.  
  148. desktopManager = {
  149. default = "none";
  150. xterm.enable = false;
  151. };
  152.  
  153. displayManager = {
  154. lightdm = {
  155. enable = true;
  156. autoLogin = {
  157. enable = true;
  158. user = "skykanin";
  159. };
  160. # background = "/home/skykanin/Pictures/hyperbeast.jpg";
  161. greeter.enable = false;
  162. greeters.gtk.indicators = [ "~host" "~spacer" "~clock" "~spacer" "~a11y" "~session" "~power" ];
  163. };
  164. };
  165. };
  166.  
  167. services.redshift = {
  168. enable = true;
  169. latitude = "63.430515";
  170. longitude = "10.395053";
  171. temperature = {
  172. day = 6500;
  173. night = 3000;
  174. };
  175. };
  176.  
  177. # Define systemd service for betterlockscreen to run on suspend/sleep
  178. # A bit janky cause I had to manually cache it the first time for root cache
  179. systemd.services.betterlockscreen = {
  180. enable = true;
  181. aliases = [ "betterlockscreen@skykanin.service" ];
  182. description = "Locks screen when going to sleep/suspend";
  183. environment = { DISPLAY = ":0"; };
  184. serviceConfig = {
  185. User = "skykanin";
  186. Type = "simple";
  187. ExecStart = ''${pkgs.betterlockscreen}/bin/betterlockscreen -l dim'';
  188. TimeoutSec = "infinity";
  189. };
  190. wantedBy = [ "sleep.target" "suspend.target" ];
  191. };
  192.  
  193. # Define a user account. Don't forget to set a password with ‘passwd’.
  194. users.users.skykanin = {
  195. isNormalUser = true;
  196. description= "Skykanin";
  197. extraGroups = ["wheel" "audio" "video" "networkmanager" "postgres"]; # Enable ‘sudo’ for the user.
  198. initialPassword = "skykanin";
  199. shell = pkgs.zsh;
  200. };
  201.  
  202. programs.light.enable = true;
  203. programs.java = {
  204. enable = true;
  205. package = pkgs.openjdk11;
  206. };
  207.  
  208. programs.zsh = {
  209. ohMyZsh = {
  210. enable = true;
  211. theme = "robbyrussell";
  212. plugins = [ "git" "lein" "mvn" "npm"];
  213. customPkgs = with pkgs; [ nix-zsh-completions zsh-completions ];
  214. };
  215. syntaxHighlighting.enable = true;
  216. };
  217.  
  218. nixpkgs.config.allowUnfree = true;
  219. fonts.enableDefaultFonts = true;
  220.  
  221. # This value determines the NixOS release with which your system is to be
  222. # compatible, in order to avoid breaking some software such as database
  223. # servers. You should change this only after NixOS release notes say you
  224. # should.
  225. system.stateVersion = "19.03"; # Did you read the comment?
  226.  
  227. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement