Guest User

Untitled

a guest
Sep 19th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 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 = "Workstation"; # Define your hostname.
  18. networking.networkmanager.enable = true; # Wifi via network manager
  19.  
  20. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  21. # Per-interface useDHCP will be mandatory in the future, so this generated config
  22. # replicates the default behaviour.
  23. networking.useDHCP = false;
  24. networking.interfaces.wlp0s20f3.useDHCP = true;
  25.  
  26. # Configure network proxy if necessary
  27. # networking.proxy.default = "http://user:password@proxy:port/";
  28. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  29.  
  30. # Select internationalisation properties.
  31. i18n.defaultLocale = "en_US.UTF-8";
  32. console = {
  33. font = "Lat2-Terminus16";
  34. keyMap = "us";
  35. };
  36.  
  37. # Set your time zone.
  38. time.timeZone = "Asia/Kolkata";
  39.  
  40. # List packages installed in system profile. To search, run:
  41. # $ nix search wget
  42. environment.systemPackages = with pkgs; [
  43. wget
  44. acpi
  45. acpid
  46.  
  47. neovim
  48. tmux
  49. git
  50. htop
  51.  
  52. dwm
  53. dmenu
  54. st
  55. slstatus
  56. slock
  57. xautolock
  58. feh
  59. ];
  60.  
  61. # Some programs need SUID wrappers, can be configured further or are
  62. # started in user sessions.
  63. # programs.mtr.enable = true;
  64. # programs.gnupg.agent = {
  65. # enable = true;
  66. # enableSSHSupport = true;
  67. # pinentryFlavor = "gnome3";
  68. # };
  69. programs.light.enable = true;
  70.  
  71. # List services that you want to enable:
  72.  
  73. # Enable the OpenSSH daemon.
  74. # services.openssh.enable = true;
  75. services.actkbd = {
  76. enable = true;
  77. bindings = [
  78. { keys = [ 224 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -U 10"; }
  79. { keys = [ 225 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -A 10"; }
  80. ];
  81. };
  82.  
  83. # Open ports in the firewall.
  84. # networking.firewall.allowedTCPPorts = [ ... ];
  85. # networking.firewall.allowedUDPPorts = [ ... ];
  86. # Or disable the firewall altogether.
  87. # networking.firewall.enable = false;
  88.  
  89. # Enable CUPS to print documents.
  90. # services.printing.enable = true;
  91.  
  92. # Enable sound.
  93. sound.enable = true;
  94. hardware.pulseaudio.enable = true;
  95.  
  96. # Enable the X11 windowing system.
  97. services.xserver.enable = true;
  98. services.xserver.layout = "us";
  99.  
  100. # Swap control and caps lock
  101. services.xserver.xkbOptions = "ctrl:swapcaps";
  102.  
  103. # Enable touchpad support.
  104. services.xserver.libinput.enable = true;
  105.  
  106. # Set up dwm
  107. services.xserver.windowManager.dwm.enable = true;
  108.  
  109. nixpkgs.overlays = [
  110. (self: super: {
  111. # dwm from personal github fork
  112. dwm = super.dwm.overrideAttrs (oa: {
  113. src = super.fetchFromGitHub {
  114. owner = "BK1603";
  115. repo = "dwm";
  116. rev = "7be69c06f61a2452fa271e498e7a00d003375bc0";
  117. sha256 = "122914cdrdhgnb0jqacx3abzzkvmnh8fql7c6p561yivgf9j3h2y";
  118. };
  119.  
  120. patches = oa.patches ++ [
  121. (builtins.fetchurl https://dwm.suckless.org/patches/fibonacci/dwm-fibonacci-6.2.diff)
  122. (builtins.fetchurl https://dwm.suckless.org/patches/actualfullscreen/dwm-actualfullscreen-20191112-cb3f58a.diff)
  123. ];
  124. });
  125.  
  126. #st patches
  127. st = super.st.overrideAttrs (oa: {
  128. src = super.fetchFromGitHub {
  129. owner = "BK1603";
  130. repo = "st";
  131. rev = "05499c8ab9920a90a1ebe3b41bc3dd6ac55c9ab6";
  132. sha256 = "0gwrc8mdypfw295lxkick214jwfqyrfrlvwx0zdx3lgx9bidxxwf";
  133. };
  134.  
  135. patches = oa.patches ++ [
  136. (builtins.fetchurl https://st.suckless.org/patches/nordtheme/st-nordtheme-0.8.2.diff)
  137. ];
  138. });
  139. })
  140. ];
  141.  
  142. # Setup lightdm
  143. services.xserver.displayManager.lightdm.enable = true;
  144. services.xserver.desktopManager.xterm.enable = false;
  145. services.xserver.displayManager.defaultSession = "none+dwm";
  146. services.xserver.displayManager.sessionCommands = ''
  147. feh --bg-fill /home/bk1603/Downloads/yz6ggt7m18l41.png
  148. '';
  149.  
  150. # Define a user account. Don't forget to set a password with ‘passwd’.
  151. users.users.bk1603 = {
  152. isNormalUser = true;
  153. extraGroups = [ "wheel" "networkmanager"]; # Enable ‘sudo’ for the user.
  154. };
  155.  
  156. # This value determines the NixOS release from which the default
  157. # settings for stateful data, like file locations and database versions
  158. # on your system were taken. It‘s perfectly fine and recommended to leave
  159. # this value at the release version of the first install of this system.
  160. # Before changing this value read the documentation for this option
  161. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  162. system.stateVersion = "21.03"; # Did you read the comment?
  163.  
  164. }
  165.  
  166.  
Add Comment
Please, Sign In to add comment