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.

901 lines
31 KiB

5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
5 years ago
4 years ago
5 years ago
  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. { config, pkgs, ... }:
  5. {
  6. imports =
  7. [ # Include the results of the hardware scan.
  8. ./hardware-configuration.nix
  9. (import (builtins.fetchGit { url = "https://github.com/rycee/home-manager.git"; ref = "master";}) {}).nixos
  10. ];
  11. nixpkgs.config.packageOverrides = pkgs: {
  12. comptonkawase = pkgs.compton.overrideAttrs (oldAttrs: {
  13. src = pkgs.fetchFromGitLab{
  14. owner = "dorian7k7";
  15. repo = "compton-kawase-blur";
  16. rev = "4b9ac1e83fd783ea2dfa68dfc5f00da99722e12d";
  17. sha256 = "0xc2hmhpa6zbw09xmhwacqhlgqfdc0g6d4b06r5k56c3ngafsyp0";
  18. };
  19. });
  20. chromiumVAAPI = pkgs.chromium.override {
  21. VAAPISupport = true;
  22. };
  23. };
  24. nixpkgs.config.allowUnfree = true;
  25. nixpkgs.config.pulseaudio = true; #only mumble needs that
  26. nixpkgs.config.android_sdk.accept_license = true; #why the fuck is that a config?
  27. boot = {
  28. plymouth.enable = true;
  29. supportedFilesystems = [ "ntfs" ];
  30. consoleLogLevel = 2; #TODO
  31. tmpOnTmpfs = true; #tmp should be a tmpfs. thanks
  32. kernelPackages = pkgs.linuxPackages_latest;
  33. loader = {
  34. grub = {
  35. enable = true;
  36. version = 2;
  37. device = "/dev/sda"; # or "nodev" for efi only
  38. };
  39. };
  40. };
  41. networking = {
  42. hostName = "nixos";
  43. networkmanager.enable = true;
  44. };
  45. # Configure network proxy if necessary
  46. # networking.proxy.default = "http://user:password@proxy:port/";
  47. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  48. # Select internationalisation properties.
  49. i18n = {
  50. consoleFont = "Lat2-Terminus16";
  51. consoleKeyMap = "uk";
  52. defaultLocale = "en_GB.UTF-8";
  53. };
  54. # Set your time zone.
  55. time.timeZone = "Europe/Prague";
  56. # List packages installed in system profile. To search, run:
  57. # $ nix search wget
  58. environment.systemPackages = with pkgs; [
  59. mumble_git
  60. wget vim emacs
  61. ];
  62. # Some programs need SUID wrappers, can be configured further or are
  63. # started in user sessions.
  64. # programs.mtr.enable = true;
  65. programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  66. # List services that you want to enable:
  67. # Enable the OpenSSH daemon.
  68. # services.openssh.enable = true;
  69. # Open ports in the firewall.
  70. # networking.firewall.allowedTCPPorts = [ ... ];
  71. # networking.firewall.allowedUDPPorts = [ ... ];
  72. # Or disable the firewall altogether.
  73. # networking.firewall.enable = false;
  74. # Enable CUPS to print documents.
  75. # services.printing.enable = true;
  76. hardware = {
  77. cpu.intel.updateMicrocode = true; # super fast botnet upgrades
  78. opengl.driSupport32Bit = true;
  79. pulseaudio.enable = true; #hewwo lennart!
  80. pulseaudio.support32Bit = true;
  81. bluetooth.enable = true;
  82. };
  83. # Enable sound.
  84. sound = {
  85. enable = true;
  86. mediaKeys.enable = true;
  87. };
  88. services = {
  89. xserver = {
  90. enable = true;
  91. layout = "gb";
  92. # services.xserver.xkbOptions = "eurosign:e";
  93. libinput.enable = true;
  94. displayManager.sddm.enable = true;
  95. desktopManager = {
  96. xterm.enable = false;
  97. # plasma5 = {
  98. # enable = true;
  99. # enableQt4Support = true;
  100. # };
  101. };
  102. windowManager.bspwm.enable = true;
  103. windowManager.bspwm.configFile = "/home/klimi/.config/bspwm/bspwmrc";
  104. windowManager.bspwm.sxhkd.configFile = "/home/klimi/.config/sxhkd/sxhkdrc";
  105. };
  106. };
  107. systemd.services.autoGc = {
  108. serviceConfig = {
  109. ExecStart = "${config.nix.package.out}/bin/nix-collect-garbage --delete-older-than 14d";
  110. };
  111. };
  112. programs.adb.enable = true;
  113. # Enable the KDE Desktop Environment.
  114. # services.xserver.displayManager.sddm.enable = true;
  115. # services.xserver.desktopManager.plasma5.enable = true;
  116. # Define a user account. Don't forget to set a password with ‘passwd’.
  117. users.extraUsers = {
  118. klimi = {
  119. isNormalUser = true;
  120. uid = 1000;
  121. home = "/home/klimi";
  122. extraGroups = [ "wheel" "networkmanager" "video" "adbusers" "kvm" ];
  123. shell = pkgs.zsh;
  124. };
  125. };
  126. environment.pathsToLink = [ "/share/zsh" ]; #systemd-autocomplete uwu
  127. nix.nixPath = ["nixpkgs=http://nixos.org/channels/nixos-19.03/nixexprs.tar.xz" "nixos-config=/home/klimi/configs/klimi\'s\ config/configuration.nix" ]; #i moved my config to my home, cool hm?
  128. home-manager.users.klimi =
  129. let
  130. unstable = import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) { }; #scrap the master plan. system on nixos-stable, rest pretty much stable
  131. master = import (builtins.fetchTarball { url = https://github.com/NixOS/nixpkgs/archive/master.tar.gz; }) {};
  132. stable = import (builtins.fetchTarball { url = https://github.com/NixOS/nixpkgs/archive/release-18.09.tar.gz; }) {};
  133. in {
  134. programs.zsh.enable = true;
  135. programs.zsh.history.size = 1000000;
  136. programs.zsh.oh-my-zsh.enable = true;
  137. programs.zsh.oh-my-zsh.plugins = ["history" "git" "cp" "systemd" "colorize" "command-not-found"];
  138. programs.zsh.plugins = [
  139. {
  140. name = "zsh-autosuggestions";
  141. src = pkgs.fetchFromGitHub {
  142. owner = "zsh-users";
  143. repo = "zsh-autosuggestions";
  144. rev = "v0.5.0";
  145. sha256 = "19qkg4b2flvnp2l0cbkl4qbrnl8d3lym2mmh1mx9nmjd7b81r3pf";
  146. };
  147. }
  148. {
  149. name = "zsh-syntax-highlighting";
  150. src = pkgs.fetchFromGitHub {
  151. owner = "zsh-users";
  152. repo = "zsh-syntax-highlighting";
  153. rev = "v0.6.0";
  154. sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
  155. };
  156. }
  157. ];
  158. programs.zsh.oh-my-zsh.theme = "agnoster";
  159. programs.zsh.shellAliases = {
  160. nup = "env NIXPKGS_ALLOW_UNFREE=1 sudo -E nixos-rebuild switch --upgrade && rm ~/.cache/ksycoca5_* -rf && kbuildsycoca5 && kbuildsycoca5 --noincremental";
  161. nupc = "sudo nix-collect-garbage -d && sudo nix-store --optimise && env NIXPKGS_ALLOW_UNFREE=1 sudo -E nixos-rebuild switch --upgrade && rm ~/.cache/ksycoca5_* -rf && kbuildsycoca5 && kbuildsycoca5 --noincremental";
  162. }; # what the fuck is that? nix-store --optimise takes a long time on large stores. Though hardlinking can improve a lot sometimes... might as well use it "sometimes"
  163. programs.zsh.initExtra = ''zstyle ':completion:*' rehash true
  164. if [[ -d "$HOME/.zim" ]]; then
  165. else
  166. git clone --recursive https://github.com/zimfw/zimfw.git $HOME/.zim
  167. for template_file in $HOME/.zim/templates/*; do
  168. user_file="$HOME/.''${template_file:t}"
  169. cat ''${template_file} ''${user_file}(.N) > ''${user_file}.tmp && mv ''${user_file}{.tmp,}
  170. done
  171. fi
  172. export ZIM_HOME=$HOME/.zim
  173. [[ -s ''${ZIM_HOME}/init.zsh ]] && source ''${ZIM_HOME}/init.zsh
  174. ''; #autorehash and sourcing .profile makes sense. Installing zim zsh because me likey
  175. nixpkgs.config.allowUnfree = true; #forgive me stallman for i have sinned. x11vnc sucks though
  176. home.file = {
  177. ".Xmodmap".text = ''
  178. !
  179. ! Swap Caps_Lock and Control_L
  180. !
  181. remove Lock = Caps_Lock
  182. remove Control = Control_L
  183. keysym Control_L = Caps_Lock
  184. keysym Caps_Lock = Control_L
  185. add Lock = Caps_Lock
  186. add Control = Control_L
  187. '';#who needs caps
  188. ".config/bspwm/bspwmrc".executable = true;
  189. ".config/bspwm/bspwmrc".text = ''
  190. #!/bin/sh
  191. export _JAVA_AWT_WM_NONREPARENTING=1
  192. export XDG_CURRENT_DESKTOP=GNOME
  193. export QT_QPA_PLATFORMTHEME="qt5ct"
  194. export QT_AUTO_SCREEN_SCALE_FACTOR=0
  195. export TERM=rxvt
  196. setxkbmap gb
  197. bspc config focus_follows_pointer true
  198. bspc monitor -d 1 2 3 4 5 6 7 8 9 0
  199. bspc config border_width 1
  200. bspc config window_gap 4
  201. bspc config split_ratio 0.52
  202. bspc config borderless_monocle true
  203. bspc config gapless_monocle true
  204. feh --bg-scale /home/klimi/.local/TODO.png
  205. QSyncthingTray &
  206. nm-applet &
  207. pa-applet &
  208. xmodmap ~/.Xmodmap &
  209. telegram-desktop -startintray &
  210. keepassxc &
  211. '';
  212. ".config/sxhkd/sxhkdrc".executable = true;
  213. ".config/sxhkd/sxhkdrc".text = ''
  214. # screen-locker
  215. XF86Launch1
  216. i3lock-fancy
  217. # brightness
  218. XF86MonBrightnessUp
  219. light -A 10
  220. XF86MonBrightnessDown
  221. light -U 10
  222. # toggle terminal
  223. super + Return
  224. alacritty
  225. # program launchers
  226. super + @space
  227. rofi -show drun
  228. alt + @space
  229. dmenu_run
  230. # make sxhkd reload its configuration files:
  231. super + Escape
  232. pkill -USR1 -x sxhkd
  233. #
  234. # bspwm hotkeys
  235. #
  236. # quit an application
  237. super + alt + q
  238. bspc node -c
  239. # kill an application
  240. super +alt + shift + q
  241. bspc node -k
  242. # alternate between the tiled and monocle layout
  243. super + m
  244. bspc desktop -l next
  245. # send the newest marked node to the newest preselected node
  246. super + y
  247. bspc node newest.marked.local -n newest.!automatic.local
  248. # swap the current node and the biggest node
  249. super + g
  250. bspc node -s biggest
  251. #
  252. # state/flags
  253. #
  254. # set the window state
  255. super + {t,shift + t,s,f}
  256. bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
  257. # set the node flags
  258. super + ctrl + {m,x,y,z}
  259. bspc node -g {marked,locked,sticky,private}
  260. #
  261. # focus/swap
  262. #
  263. # focus the node in the given direction
  264. super + {_,shift + }{h,j,k,l}
  265. bspc node -{f,s} {west,south,north,east}
  266. # focus the node for the given path jump
  267. super + {p,b,comma,period}
  268. bspc node -f @{parent,brother,first,second}
  269. # focus the next/previous node in the current desktop
  270. super + {_,shift + }c
  271. bspc node -f {next,prev}.local
  272. alt + Tab
  273. bspc node -f next.local
  274. alt + shift + Tab
  275. bspc node -f prev.local
  276. # focus the next/previous desktop in the current monitor
  277. super + alt + {a,s}
  278. bspc desktop -f {prev,next}
  279. # focus the last node/desktop
  280. super + {grave,Tab}
  281. bspc {node,desktop} -f last
  282. # focus the older or newer node in the focus history
  283. super + {o,i}
  284. bspc wm -h off; \
  285. bspc node {older,newer} -f; \
  286. bspc wm -h on
  287. # focus or send to the given desktop
  288. super + {_,shift + }{1,2,3,4,5,6,7,8,9}
  289. bspc {desktop -f,node -d} '^{1,2,3,4,5,6,7,8,9}'
  290. super + {_,shift + } +0
  291. bspc {desktop -f,node -d} '^10'
  292. #
  293. # preselect
  294. #
  295. # preselect the direction
  296. super + ctrl + {h,j,k,l}
  297. bspc node -p {west,south,north,east}
  298. # preselect the ratio
  299. super + ctrl + {1-9}
  300. bspc node -o 0.{1-9}
  301. # cancel the preselection for the focused node
  302. super + ctrl + space
  303. bspc node -p cancel
  304. # cancel the preselection for the focused desktop
  305. super + ctrl + shift + space
  306. bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
  307. #
  308. # move/resize
  309. #
  310. # expand a window by moving one of its side outward
  311. super + alt + {h,j,k,l}
  312. bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
  313. # contract a window by moving one of its side inward
  314. super + alt + shift + {h,j,k,l}
  315. bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
  316. # move a floating window
  317. super + {Left,Down,Up,Right}
  318. bspc node -v {-20 0,0 20,0 -20,20 0}
  319. '';
  320. ".config/alacritty/alacritty.yml".executable = true;
  321. ".config/alacritty/alacritty.yml".text = ''window:
  322. dimensions:
  323. columns: 0
  324. lines: 0
  325. padding:
  326. x: 2
  327. y: 2
  328. dynamic_padding: false
  329. decorations: full
  330. start_maximized: false
  331. scrolling:
  332. history: 10000
  333. multiplier: 3
  334. faux_multiplier: 3
  335. auto_scroll: false
  336. tabspaces: 8
  337. font:
  338. size: 11.0
  339. offset:
  340. x: 0
  341. y: 0
  342. glyph_offset:
  343. x: 0
  344. y: 0
  345. use_thin_strokes: true
  346. render_timer: false
  347. persistent_logging: false
  348. draw_bold_text_with_bright_colors: true
  349. colors:
  350. primary:
  351. background: '0x000000'
  352. foreground: '0xeaeaea'
  353. normal:
  354. black: '0x000000'
  355. red: '0xd54e53'
  356. green: '0xb9ca4a'
  357. yellow: '0xe6c547'
  358. blue: '0x7aa6da'
  359. magenta: '0xc397d8'
  360. cyan: '0x70c0ba'
  361. white: '0xeaeaea'
  362. bright:
  363. black: '0x666666'
  364. red: '0xff3334'
  365. green: '0x9ec400'
  366. yellow: '0xe7c547'
  367. blue: '0x7aa6da'
  368. magenta: '0xb77ee0'
  369. cyan: '0x54ced6'
  370. white: '0xffffff'
  371. indexed_colors: []
  372. visual_bell:
  373. animation: EaseOutExpo
  374. duration: 0
  375. color: '0xffffff'
  376. background_opacity: 0.4
  377. mouse_bindings:
  378. - { mouse: Middle, action: PasteSelection }
  379. mouse:
  380. double_click: { threshold: 300 }
  381. triple_click: { threshold: 300 }
  382. hide_when_typing: false
  383. url:
  384. modifiers: None
  385. selection:
  386. semantic_escape_chars: ",`|:\"' ()[]{}<>"
  387. save_to_clipboard: false
  388. dynamic_title: true
  389. cursor:
  390. style: Block
  391. unfocused_hollow: true
  392. live_config_reload: true
  393. enable_experimental_conpty_backend: false
  394. alt_send_esc: true
  395. key_bindings:
  396. - { key: Paste, action: Paste }
  397. - { key: Copy, action: Copy }
  398. - { key: L, mods: Control, action: ClearLogNotice }
  399. - { key: L, mods: Control, chars: "\x0c" }
  400. - { key: Home, chars: "\x1bOH", mode: AppCursor }
  401. - { key: Home, chars: "\x1b[H", mode: ~AppCursor }
  402. - { key: End, chars: "\x1bOF", mode: AppCursor }
  403. - { key: End, chars: "\x1b[F", mode: ~AppCursor }
  404. - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
  405. - { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt }
  406. - { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
  407. - { key: PageUp, chars: "\x1b[5~" }
  408. - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
  409. - { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt }
  410. - { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
  411. - { key: PageDown, chars: "\x1b[6~" }
  412. - { key: Tab, mods: Shift, chars: "\x1b[Z" }
  413. - { key: Back, chars: "\x7f" }
  414. - { key: Back, mods: Alt, chars: "\x1b\x7f" }
  415. - { key: Insert, chars: "\x1b[2~" }
  416. - { key: Delete, chars: "\x1b[3~" }
  417. - { key: Left, mods: Shift, chars: "\x1b[1;2D" }
  418. - { key: Left, mods: Control, chars: "\x1b[1;5D" }
  419. - { key: Left, mods: Alt, chars: "\x1b[1;3D" }
  420. - { key: Left, chars: "\x1b[D", mode: ~AppCursor }
  421. - { key: Left, chars: "\x1bOD", mode: AppCursor }
  422. - { key: Right, mods: Shift, chars: "\x1b[1;2C" }
  423. - { key: Right, mods: Control, chars: "\x1b[1;5C" }
  424. - { key: Right, mods: Alt, chars: "\x1b[1;3C" }
  425. - { key: Right, chars: "\x1b[C", mode: ~AppCursor }
  426. - { key: Right, chars: "\x1bOC", mode: AppCursor }
  427. - { key: Up, mods: Shift, chars: "\x1b[1;2A" }
  428. - { key: Up, mods: Alt, chars: "\x1b[1;3A" }
  429. - { key: Up, chars: "\x1b[A", mode: ~AppCursor }
  430. - { key: Up, chars: "\x1bOA", mode: AppCursor }
  431. - { key: Down, mods: Shift, chars: "\x1b[1;2B" }
  432. - { key: Down, mods: Alt, chars: "\x1b[1;3B" }
  433. - { key: Down, chars: "\x1b[B", mode: ~AppCursor }
  434. - { key: Down, chars: "\x1bOB", mode: AppCursor }
  435. - { key: F1, chars: "\x1bOP" }
  436. - { key: F2, chars: "\x1bOQ" }
  437. - { key: F3, chars: "\x1bOR" }
  438. - { key: F4, chars: "\x1bOS" }
  439. - { key: F5, chars: "\x1b[15~" }
  440. - { key: F6, chars: "\x1b[17~" }
  441. - { key: F7, chars: "\x1b[18~" }
  442. - { key: F8, chars: "\x1b[19~" }
  443. - { key: F9, chars: "\x1b[20~" }
  444. - { key: F10, chars: "\x1b[21~" }
  445. - { key: F11, chars: "\x1b[23~" }
  446. - { key: F12, chars: "\x1b[24~" }
  447. - { key: F1, mods: Shift, chars: "\x1b[1;2P" }
  448. - { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
  449. - { key: F3, mods: Shift, chars: "\x1b[1;2R" }
  450. - { key: F4, mods: Shift, chars: "\x1b[1;2S" }
  451. - { key: F5, mods: Shift, chars: "\x1b[15;2~" }
  452. - { key: F6, mods: Shift, chars: "\x1b[17;2~" }
  453. - { key: F7, mods: Shift, chars: "\x1b[18;2~" }
  454. - { key: F8, mods: Shift, chars: "\x1b[19;2~" }
  455. - { key: F9, mods: Shift, chars: "\x1b[20;2~" }
  456. - { key: F10, mods: Shift, chars: "\x1b[21;2~" }
  457. - { key: F11, mods: Shift, chars: "\x1b[23;2~" }
  458. - { key: F12, mods: Shift, chars: "\x1b[24;2~" }
  459. - { key: F1, mods: Control, chars: "\x1b[1;5P" }
  460. - { key: F2, mods: Control, chars: "\x1b[1;5Q" }
  461. - { key: F3, mods: Control, chars: "\x1b[1;5R" }
  462. - { key: F4, mods: Control, chars: "\x1b[1;5S" }
  463. - { key: F5, mods: Control, chars: "\x1b[15;5~" }
  464. - { key: F6, mods: Control, chars: "\x1b[17;5~" }
  465. - { key: F7, mods: Control, chars: "\x1b[18;5~" }
  466. - { key: F8, mods: Control, chars: "\x1b[19;5~" }
  467. - { key: F9, mods: Control, chars: "\x1b[20;5~" }
  468. - { key: F10, mods: Control, chars: "\x1b[21;5~" }
  469. - { key: F11, mods: Control, chars: "\x1b[23;5~" }
  470. - { key: F12, mods: Control, chars: "\x1b[24;5~" }
  471. - { key: F1, mods: Alt, chars: "\x1b[1;6P" }
  472. - { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
  473. - { key: F3, mods: Alt, chars: "\x1b[1;6R" }
  474. - { key: F4, mods: Alt, chars: "\x1b[1;6S" }
  475. - { key: F5, mods: Alt, chars: "\x1b[15;6~" }
  476. - { key: F6, mods: Alt, chars: "\x1b[17;6~" }
  477. - { key: F7, mods: Alt, chars: "\x1b[18;6~" }
  478. - { key: F8, mods: Alt, chars: "\x1b[19;6~" }
  479. - { key: F9, mods: Alt, chars: "\x1b[20;6~" }
  480. - { key: F10, mods: Alt, chars: "\x1b[21;6~" }
  481. - { key: F11, mods: Alt, chars: "\x1b[23;6~" }
  482. - { key: F12, mods: Alt, chars: "\x1b[24;6~" }
  483. - { key: F1, mods: Super, chars: "\x1b[1;3P" }
  484. - { key: F2, mods: Super, chars: "\x1b[1;3Q" }
  485. - { key: F3, mods: Super, chars: "\x1b[1;3R" }
  486. - { key: F4, mods: Super, chars: "\x1b[1;3S" }
  487. - { key: F5, mods: Super, chars: "\x1b[15;3~" }
  488. - { key: F6, mods: Super, chars: "\x1b[17;3~" }
  489. - { key: F7, mods: Super, chars: "\x1b[18;3~" }
  490. - { key: F8, mods: Super, chars: "\x1b[19;3~" }
  491. - { key: F9, mods: Super, chars: "\x1b[20;3~" }
  492. - { key: F10, mods: Super, chars: "\x1b[21;3~" }
  493. - { key: F11, mods: Super, chars: "\x1b[23;3~" }
  494. - { key: F12, mods: Super, chars: "\x1b[24;3~" }
  495. - { key: NumpadEnter, chars: "\n" }
  496. - { key: Up, mods: Control, action: IncreaseFontSize }
  497. - { key: Down, mods: Control, action: DecreaseFontSize }
  498. '';
  499. ".Xdefaults".executable =true;
  500. ".Xdefaults".text = ''
  501. *foreground: #00cc00
  502. *foreground_bold: #a8a19f
  503. *cursor: #a8a19f
  504. *background: #1b1918
  505. !!*background: rgba(0, 0, 0, .7)
  506. !! black
  507. *color0: #1b1918
  508. *color8: #766e6b
  509. !! red
  510. *color1: #f22c40
  511. *color9: #f22c40
  512. !! green
  513. *color2: #5ab738
  514. *color10: #5ab738
  515. !! yellow
  516. *color3: #d5911a
  517. *color11: #d5911a
  518. !! blue
  519. *color4: #407ee7
  520. *color12: #407ee7
  521. !! magenta
  522. *color5: #6666ea
  523. *color13: #6666ea
  524. !! cyan
  525. *color6: #00ad9c
  526. *color14: #00ad9c
  527. !! white
  528. *color7: #a8a19f
  529. *color15: #f1efee
  530. rofi.color-enabled: true
  531. rofi.color-window: #000, #000, #000
  532. rofi.color-normal: #111, #819396, #222, #008ed4, #ffffff
  533. rofi.color-active: #002b37, #008ed4, #003643, #008ed4, #66c6ff
  534. rofi.color-urgent: #002b37, #da4281, #003643, #008ed4, #890661
  535. rofi.fake-transparency: true
  536. rofi.lines: 3
  537. rofi.bw: 0
  538. rofi.opacity: "10"
  539. rofi.hide-scrollbar: true
  540. rofi.width: 30
  541. Xcursor.theme: Maya-Blue
  542. '';
  543. };
  544. services = {
  545. dunst.enable = true;
  546. # flameshot.enable = true;
  547. network-manager-applet.enable = true;
  548. nextcloud-client.enable = true;
  549. pasystray.enable = true;
  550. compton = {
  551. enable = true;
  552. package = pkgs.comptonkawase;
  553. extraOptions = ''
  554. glx-no-stencil = true;
  555. glx-copy-from-front = false;
  556. glx-swap-method = "undefined";
  557. shadow = true;
  558. no-dnd-shadow = true;
  559. no-dock-shadow = true;
  560. # clear-shadow = true;
  561. shadow-radius = 5;
  562. shadow-offset-x = -5;
  563. shadow-offset-y = -5;
  564. shadow-opacity = 0.5;
  565. shadow-ignore-shaped = false;
  566. frame-opacity = 1;
  567. inactive-opacity-override = false;
  568. alpha-step = 0.06;
  569. blur-method = "kawase";
  570. blur-strength = 10;
  571. blur-background = true;
  572. blur-background-frame = true;
  573. mark-wmwin-focused = true;
  574. mark-ovredir-focused = true;
  575. use-ewmh-active-win = true;
  576. detect-rounded-corners = true;
  577. detect-client-opacity = true;
  578. dbe = false;
  579. paint-on-overlay = true;
  580. sw-opti = true;
  581. unredir-if-possible = true;
  582. focus-exclude = [ ];
  583. detect-transient = true;
  584. detect-client-leader = true;
  585. wintypes :
  586. {
  587. tooltip :
  588. {
  589. fade = true;
  590. shadow = false;
  591. opacity = 0.85;
  592. focus = true;
  593. };
  594. };
  595. '';
  596. };
  597. polybar.enable = true;
  598. polybar.script = "polybar top &";
  599. polybar.config = {
  600. "colors" = {
  601. background = "#00000000";
  602. background-alt = "#444";
  603. foreground = "#003256";
  604. foreground-alt = "#21840d";
  605. primary = "#ff0000";
  606. secondary = "#ff0c00";
  607. alert = "#bd2c40";
  608. col = "#00f";
  609. };
  610. "bar/top" = {
  611. width = "100%";
  612. height = "24";
  613. fixed-center = "false";
  614. background = "\${colors.background}";
  615. foreground = "\${colors.foreground}";
  616. line-size = "3";
  617. line-color = "{$xrdb:color1}";
  618. border-size = "0";
  619. border-color = "#00000000";
  620. padding-left = "0";
  621. padding-right = "0";
  622. module-margin-left = "1";
  623. module-margin-right = "2";
  624. font-0 = "mono:pixelsize=9;1";
  625. modules-center = "bspwm";
  626. modules-right = "cpu memory filesystem wlan eth battery temperature date";
  627. tray-position = "right";
  628. tray-padding = "0 ";
  629. };
  630. "module/filesystem" = {
  631. type = "internal/fs";
  632. interval = "25";
  633. mount-0 = "/";
  634. label-mounted = "%mountpoint%: %used%/%total%: %percentage_used%%";
  635. label-unmounted = "%mountpoint% not mounted";
  636. label-unmounted-foreground = "\${colors.foreground-alt}";
  637. };
  638. "module/bspwm" = {
  639. wm-restack = "bspwm";
  640. scroll-up = "bspwm-desknext";
  641. scroll-down = "bspwm-deskprev";
  642. type = "internal/bspwm";
  643. label-focused = "%index%";
  644. label-focused-background = "\${colors.background-alt}";
  645. label-focused-underline= "\${colors.primary}";
  646. label-focused-padding = "2";
  647. label-occupied = "%index%";
  648. label-occupied-padding = "2";
  649. label-urgent = "%index%!";
  650. label-urgent-background = "\${colors.alert}";
  651. label-urgent-padding = "2";
  652. label-empty = "%index%";
  653. label-empty-foreground = "\${colors.foreground-alt}";
  654. label-empty-padding = "2";
  655. };
  656. "module/cpu" = {
  657. type = "internal/cpu";
  658. interval = "2";
  659. format-prefix = "CPU: ";
  660. label = "%percentage%%";
  661. };
  662. "module/memory" = {
  663. type = "internal/memory";
  664. interval = "2";
  665. format-prefix = "MEM: ";
  666. label = "%percentage_used%%";
  667. };
  668. "module/wlan" = {
  669. type = "internal/network";
  670. interface = "wlan0";
  671. interval = "3.0";
  672. format-connected = "<label-connected>";
  673. format-connected-underline = "\${colors.primary}";
  674. label-connected = "%essid%";
  675. format-disconnected = "<label-disconnected>";
  676. format-disconnected-underline = "\${colors.foreground}";
  677. label-disconnected = "no wifi";
  678. label-disconnected-foreground = "\${colors.foreground-alt}";
  679. };
  680. "module/eth" = {
  681. type = "internal/network";
  682. interface = "eth0";
  683. interval = "3.0";
  684. format-connected-underline = "\${colors.primary}";
  685. format-connected-prefix-foreground = "\${colors.primary}";
  686. label-connected = "%local_ip%";
  687. format-disconnected = "<label-disconnected>";
  688. format-disconnected-underline = "\${colors.foreground}";
  689. label-disconnected = "no eth";
  690. label-disconnected-foreground = "\${colors.foreground-alt}";
  691. };
  692. "module/date" = {
  693. type = "internal/date";
  694. interval = "1 ";
  695. date = "%A, the %d.%m(%B).%Y";
  696. time = ", %X";
  697. format-underline = "\${colors.foreground-alt}";
  698. label = "%date% %time%";
  699. };
  700. "module/battery" = {
  701. type = "internal/battery";
  702. battery = "BAT0";
  703. adapter = "ADP1";
  704. full-at = "98";
  705. format-charging = "<label-charging>";
  706. format-charging-underline = "\${colors.primary}";
  707. format-discharging = "<label-discharging>";
  708. format-discharging-underline = "\${colors.foreground}";
  709. format-full-prefix = "Full ";
  710. format-full-prefix-foreground = "\${colors.foreground-alt}";
  711. format-full-underline = "\${colors.foreground-alt}";
  712. };
  713. "module/temperature" = {
  714. type = "internal/temperature";
  715. thermal-zone = "0";
  716. warn-temperature = "60";
  717. format = "<label>";
  718. format-underline = "\${colors.foreground-alt}";
  719. format-warn = "<label-warn>";
  720. format-warn-underline = "\${colors.primary}";
  721. label = "%temperature-c%";
  722. label-warn = "%temperature-c%";
  723. label-warn-foreground = "\${colors.secondary}";
  724. };
  725. "settings" = {
  726. screenchange-reload = "true";
  727. };
  728. "global/wm" = {
  729. margin-top = "5";
  730. margin-bottom = "5";
  731. };
  732. };
  733. screen-locker = {
  734. enable = true;
  735. lockCmd = "i3lock-fancy";
  736. };
  737. };
  738. home.packages = with pkgs; [
  739. (winetricks.override { wine = wineWowPackages.full; })
  740. wineWowPackages.full
  741. unstable.firefox
  742. unstable.alacritty
  743. unstable.i3lock-fancy
  744. unstable.glxinfo
  745. unstable.arc-kde-theme
  746. unstable.ark
  747. unstable.pa_applet
  748. unstable.qsyncthingtray
  749. unstable.rofi
  750. unstable.dmenu
  751. unstable.chromium
  752. unstable.arc-kde-theme
  753. unstable.ark
  754. unstable.cmatrix
  755. unstable.evince
  756. unstable.file
  757. unstable.filezilla
  758. unstable.ffmpeg-full
  759. unstable.flameshot #is gud
  760. unstable.gimp
  761. unstable.git
  762. unstable.glibcLocales
  763. unstable.glxinfo
  764. unstable.htop
  765. unstable.jdk
  766. unstable.kdeApplications.gwenview
  767. unstable.keepassxc
  768. unstable.krename-qt5
  769. unstable.libreoffice
  770. unstable.lm_sensors
  771. unstable.lolcat
  772. unstable.mpv
  773. unstable.ncdu
  774. unstable.nextcloud-client
  775. unstable.nix-index #i can search for files in nix packages... coool
  776. unstable.notepadqq #hurrdurr emacs masterrace
  777. unstable.oxygen #pretty hard to breathe without
  778. unstable.oxygen-icons5
  779. unstable.pavucontrol
  780. unstable.pciutils #why the fuck is lspci included in here but not in base?
  781. unstable.pcsx2 #wanna heat up my notebook?
  782. unstable.powertop
  783. unstable.qbittorrent
  784. unstable.qsyncthingtray
  785. unstable.quasselClient
  786. unstable.qownnotes
  787. unstable.quaternion #qool matrix client
  788. unstable.quota
  789. unstable.smplayer
  790. unstable.steam
  791. unstable.syncthing
  792. unstable.tdesktop
  793. unstable.thunderbird
  794. unstable.tigervnc
  795. unstable.toilet
  796. unstable.unrar
  797. unstable.unzip
  798. unstable.vimHugeX
  799. unstable.vlc
  800. unstable.vscodium #powershell indent crashes on windows
  801. unstable.weechat
  802. unstable.x11vnc
  803. unstable.xorg.xev #pressing keys n fun
  804. unstable.xorg.xmodmap
  805. unstable.xrdp
  806. #unstable.yakuake #i should configure it already
  807. unstable.youtube-dl
  808. ];
  809. };
  810. # This value determines the NixOS release with which your system is to be
  811. # compatible, in order to avoid breaking some software such as database
  812. # servers. You should change this only after NixOS release notes say you
  813. # should.
  814. powerManagement.enable = true;
  815. powerManagement.powertop.enable = true;
  816. system.copySystemConfiguration = true;
  817. system.stateVersion = "19.03"; # Did you read the comment?
  818. }