You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

213 lines
5.8 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. {pkgs, lib, ... }:
  2. {
  3. home.packages = with pkgs; [ clipit ncmpcpp unzip wirelesstools xsel anki pavucontrol blueman gifsicle networkmanager paprefs steam pinentry vlc nitrogen wine spotify signal-desktop google-chrome emacs-all-the-icons-fonts veracrypt bashmount exfat exfat-utils i3lock-pixeled p4v killall calc cargo cava diceware xorg.xmodmap zip cacert dropbox-cli keepassx2 slack retroarch gimp blender xcape
  4. ];
  5. home.keyboard.options = [ "ctrl:nocaps" "compose:ralt" ];
  6. # services.xcape = {
  7. # enable = true;
  8. # mapExpression = {
  9. # Control_L = "Escape";
  10. # };
  11. # };
  12. services.mpd = {
  13. enable = true;
  14. musicDirectory = "/home/dustinswan/Music";
  15. playlistDirectory = "/home/dustinswan/Music/Playlists";
  16. };
  17. services.syncthing = {
  18. enable = true;
  19. tray = true;
  20. };
  21. services.compton = {
  22. enable = true;
  23. inactiveOpacity = "0.90";
  24. };
  25. services.gpg-agent = {
  26. enable = true;
  27. enableSshSupport = true;
  28. defaultCacheTtl = 86400;
  29. maxCacheTtl = 86400;
  30. defaultCacheTtlSsh = 86400;
  31. maxCacheTtlSsh = 86400;
  32. extraConfig = ''
  33. pinentry-program /home/dustinswan/.nix-profile/bin/pinentry
  34. '';
  35. };
  36. services.polybar = {
  37. enable = true;
  38. package = pkgs.polybar.override {
  39. i3GapsSupport = true;
  40. mpdSupport = true;
  41. alsaSupport = true;
  42. };
  43. config = ~/dotfiles/polybar;
  44. script = "PATH=$PATH:${pkgs.i3-gaps}/bin polybar top &";
  45. };
  46. services.screen-locker = {
  47. enable = true;
  48. inactiveInterval = 30;
  49. lockCmd = "${pkgs.i3lock-pixeled}/bin/i3lock-pixeled";
  50. };
  51. services.dunst = {
  52. enable = true;
  53. iconTheme = {
  54. package = pkgs.numix-icon-theme;
  55. name = "Numix";
  56. size = "32";
  57. };
  58. settings = {
  59. global = {
  60. geometry = "300x5-30+50";
  61. padding = 12;
  62. horizontal_padding = 12;
  63. transparency = 10;
  64. frame_color = "#66aaff";
  65. frame_width = 2;
  66. font = "Iosevka Nerd Font Regular 9";
  67. markup = "full";
  68. word_wrap = true;
  69. format = "<b>%s</b> \n %b";
  70. icon_position = "left";
  71. background = "#000000";
  72. foreground = "#dddddd";
  73. };
  74. urgency_low = {
  75. background = "#000000";
  76. foreground = "#dddddd";
  77. };
  78. urgency_normal = {
  79. background = "#000000";
  80. foreground = "#dddddd";
  81. };
  82. urgency_critical = {
  83. foreground = "#eceff1";
  84. background = "#bd2c40";
  85. frame_color = "#9b0a20";
  86. };
  87. };
  88. };
  89. # services.udiskie.enable = true;
  90. services.unclutter.enable = true;
  91. # services.keepassx.enable = true;
  92. services.flameshot.enable = true;
  93. services.keybase.enable = true;
  94. services.pasystray.enable = true;
  95. services.network-manager-applet.enable = true;
  96. services.blueman-applet.enable = true;
  97. services.emacs.enable = true;
  98. programs.feh.enable = true;
  99. programs.firefox.enable = true;
  100. programs.rofi = {
  101. enable = true;
  102. };
  103. programs.beets = {
  104. enable = true;
  105. settings = {
  106. directory = "~/Music";
  107. library = "~/Music/musiclibrary.db";
  108. import = {
  109. copy = true;
  110. };
  111. plugins = [ "lastgenre" "fetchart" "embedart" "lyrics" "scrub" "mpdupdate" ]; # TODO bandcamp
  112. lastfm = {
  113. user = "dustinswan";
  114. };
  115. bandcamp = {
  116. lyrics = true;
  117. art = true;
  118. };
  119. };
  120. };
  121. xsession = {
  122. enable = true;
  123. initExtra = ''
  124. xmodmap -e "keycode 96 = dead_greek dead_greek dead_greek dead_greek"
  125. xcape -e 'Control_L=Escape'
  126. '';
  127. profileExtra = ''
  128. xrandr --output DP-0 --rotate left
  129. sh ~/dotfiles/logitech_linux_mouse.sh
  130. nitrogen --restore &
  131. xsetroot -solid black -cursor_name left_ptr
  132. '';
  133. windowManager.i3 = {
  134. enable = true;
  135. package = pkgs.i3-gaps;
  136. config = {
  137. modifier = "Mod4";
  138. gaps = {
  139. inner = 10;
  140. outer = 0;
  141. smartBorders = "on";
  142. };
  143. window = {
  144. border = 0;
  145. commands = [
  146. # { criteria = { class = "mpv"; }; command = "floating enable, move absolute position center"; }
  147. # { criteria = { class = "feh"; }; command = "floating enable, move absolute position center"; }
  148. ];
  149. };
  150. bars = [];
  151. startup = [{
  152. command = "systemctl --user restart polybar";
  153. always = true;
  154. notification = false;
  155. }];
  156. keybindings = let mod = "Mod4"; in lib.mkOptionDefault {
  157. "${mod}+space" = "exec \"rofi -show combi\"";
  158. "${mod}+Return" = "exec alacritty";
  159. "${mod}+Ctrl+Mod1+t" = "exec alacritty";
  160. "${mod}+Ctrl+Mod1+e" = "exec \"emacsclient -c\"";
  161. "${mod}+Ctrl+Mod1+b" = "exec firefox";
  162. "${mod}+Ctrl+Mod1+1" = "exec \"cvlc rtsp://viewer:rockwall1@192.168.1.30/stream0\"";
  163. "${mod}+Ctrl+Mod1+2" = "exec \"cvlc rtsp://viewer:rockwall1@192.168.1.31/stream0\"";
  164. "${mod}+Ctrl+Mod1+3" = "exec \"cvlc rtsp://viewer:rockwall1@192.168.1.32/stream0\"";
  165. "${mod}+h" = "focus left";
  166. "${mod}+j" = "focus down";
  167. "${mod}+k" = "focus up";
  168. "${mod}+l" = "focus right";
  169. "${mod}+Shift+h" = "move left";
  170. "${mod}+Shift+j" = "move down";
  171. "${mod}+Shift+k" = "move up";
  172. "${mod}+Shift+l" = "move right";
  173. "${mod}+s" = "layout stacking";
  174. "${mod}+comma" = "layout tabbed";
  175. "${mod}+period" = "layout toggle split";
  176. "${mod}+apostrophe" = "split h";
  177. "${mod}+minus" = "split v";
  178. "${mod}+Shift+space" = "floating toggle";
  179. "${mod}+Ctrl+space" = "focus mode_toggle";
  180. "${mod}+p" = "focus parent";
  181. "${mod}+c" = "focus child";
  182. "${mod}+r" = "mode resize";
  183. };
  184. };
  185. };
  186. };
  187. imports = [ ./home-cli.nix ./home-gui.nix ./home-mail.nix ];
  188. programs.alacritty.settings.font.size = 10.0;
  189. }