|
1 | 1 | { |
2 | 2 | pkgs, |
3 | | - lib, |
4 | 3 | ... |
5 | 4 | }: |
6 | 5 |
|
|
10 | 9 | ctrlMod = "CTRL"; |
11 | 10 | in |
12 | 11 | { |
13 | | - # Copy wallpapers to local directory |
14 | | - home.file = { |
15 | | - wallpapers = { |
16 | | - source = ../../dots/wallpapers; |
17 | | - target = ".local/nix-wallpapers"; |
18 | | - }; |
19 | | - }; |
20 | | - |
21 | 12 | wayland.windowManager.hyprland = { |
22 | 13 | enable = true; |
23 | 14 |
|
|
281 | 272 | xdgOpenUsePortal = true; |
282 | 273 | }; |
283 | 274 |
|
284 | | - services.hyprpaper = { |
285 | | - enable = true; |
286 | | - |
287 | | - settings = { |
288 | | - ipc = "on"; |
289 | | - splash = false; |
290 | | - splash_offset = 2.0; |
291 | | - |
292 | | - preload = [ "~/.local/nix-wallpapers/default.jpg" ]; |
293 | | - wallpaper = [ ",~/.local/nix-wallpapers/default.jpg" ]; |
294 | | - }; |
295 | | - }; |
296 | | - |
297 | | - # waybar |
298 | | - programs.waybar = { |
299 | | - enable = true; |
300 | | - |
301 | | - style = builtins.readFile ../../dots/waybar/style.css; |
302 | | - settings = { |
303 | | - mainBar = { |
304 | | - layer = "top"; |
305 | | - position = "top"; |
306 | | - |
307 | | - # Display waybar only on HDMI (big screen) |
308 | | - output = [ "HDMI-A-1" ]; |
309 | | - |
310 | | - modules-left = [ |
311 | | - "temperature" |
312 | | - "memory" |
313 | | - "cpu" |
314 | | - "custom/nvidia" |
315 | | - "custom/aiotemp" |
316 | | - "custom/pumpspeed" |
317 | | - ]; |
318 | | - modules-center = [ "hyprland/workspaces" ]; |
319 | | - modules-right = [ |
320 | | - "custom/spotify" |
321 | | - "custom/mic" |
322 | | - "wireplumber" |
323 | | - "clock" |
324 | | - "tray" |
325 | | - ]; |
326 | | - |
327 | | - tray = { |
328 | | - icon-size = 21; |
329 | | - spacing = 10; |
330 | | - }; |
331 | | - |
332 | | - cpu = { |
333 | | - format = " {usage}%"; |
334 | | - interval = 1; |
335 | | - on-click = "kitty -e btop"; |
336 | | - }; |
337 | | - |
338 | | - "custom/nvidia" = { |
339 | | - format = " {}%"; |
340 | | - escape = true; |
341 | | - interval = 1; |
342 | | - tooltip = false; |
343 | | - exec = "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits"; |
344 | | - on-click = "kitty -e nvtop"; |
345 | | - max-length = 50; |
346 | | - }; |
347 | | - |
348 | | - "custom/aiotemp" = { |
349 | | - format = " {} °C"; |
350 | | - escape = true; |
351 | | - interval = 1; |
352 | | - tooltip = false; |
353 | | - exec = "sudo liquidctl status | grep 'Liquid temperature' | awk '{print $(NF-1)}'"; |
354 | | - max-length = 50; |
355 | | - }; |
356 | | - |
357 | | - "custom/pumpspeed" = { |
358 | | - format = " {}%"; |
359 | | - escape = true; |
360 | | - interval = 1; |
361 | | - tooltip = false; |
362 | | - exec = "sudo liquidctl status | grep 'Pump duty' | awk '{print $(NF-1)}'"; |
363 | | - max-length = 50; |
364 | | - }; |
365 | | - |
366 | | - # network = { |
367 | | - # interval = 1; |
368 | | - # format = "{ifname}"; |
369 | | - # # format-wifi = "{icon} {bandwidthDownBytes} {bandwidthUpBytes} "; |
370 | | - # format-ethernet = "{icon} {bandwidthDownBytes} {bandwidthUpBytes} "; |
371 | | - # format-disconnected = ""; |
372 | | - # # tooltip-format = "{ipaddr}"; |
373 | | - # # format-linked = " {ifname} (No IP)"; |
374 | | - # # tooltip-format-wifi = "{essid} {icon} {signalStrength}%"; |
375 | | - # tooltip-format-ethernet = " {ifname}"; |
376 | | - # tooltip-format-disconnected = " Disconnected"; |
377 | | - # max-length = 50; |
378 | | - # }; |
379 | | - |
380 | | - temperature = { |
381 | | - format = " {temperatureC} °C"; |
382 | | - hwmon-path = [ "/sys/class/hwmon/hwmon2/temp1_input" ]; |
383 | | - interval = 1; |
384 | | - on-click = "kitty -e btop"; |
385 | | - }; |
386 | | - |
387 | | - memory = { |
388 | | - format = " {}%"; |
389 | | - interval = 1; |
390 | | - on-click = "kitty -e btop"; |
391 | | - }; |
392 | | - |
393 | | - "hyprland/workspaces" = { |
394 | | - format = "{icon}"; |
395 | | - on-click = "activate"; |
396 | | - sort-by-number = true; |
397 | | - }; |
398 | | - |
399 | | - # cpu = { |
400 | | - # format = " {usage}%"; |
401 | | - # interval = 1; |
402 | | - # on-click = "kitty -e btop"; |
403 | | - # }; |
404 | | - |
405 | | - "custom/mic" = { |
406 | | - format = "{}"; |
407 | | - escape = true; |
408 | | - interval = 1; |
409 | | - tooltip = false; |
410 | | - exec = '' |
411 | | - wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print ($NF == "[MUTED]") ? " " : " " int($2*100)"%"}' |
412 | | - ''; |
413 | | - on-click = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; |
414 | | - max-length = 50; |
415 | | - }; |
416 | | - |
417 | | - "custom/spotify" = { |
418 | | - format = " {}"; |
419 | | - escape = true; |
420 | | - interval = 1; |
421 | | - tooltip = false; |
422 | | - exec = "spotifycli --status"; |
423 | | - on-click = "spotifycli --playpause"; |
424 | | - on-scroll-up = "spotifycli --next"; |
425 | | - on-scroll-down = "spotifycli --prev"; |
426 | | - max-length = 50; |
427 | | - }; |
428 | | - |
429 | | - wireplumber = { |
430 | | - format = "{icon} {volume}%"; |
431 | | - format-muted = " "; |
432 | | - format-icons = { |
433 | | - default = [ |
434 | | - "" |
435 | | - "" |
436 | | - " " |
437 | | - ]; |
438 | | - }; |
439 | | - on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; |
440 | | - }; |
441 | | - |
442 | | - clock = { |
443 | | - timezone = "Europe/Berlin"; |
444 | | - format = "{:%d.%m.%Y %H:%M}"; |
445 | | - |
446 | | - tooltip-format = "<tt><small>{calendar}</small></tt>"; |
447 | | - |
448 | | - # https://github.com/Alexays/Waybar/wiki/Module:-Clock |
449 | | - calendar = { |
450 | | - mode = "year"; |
451 | | - mode-mon-col = 3; |
452 | | - weeks-pos = "right"; |
453 | | - on-scroll = 1; |
454 | | - format = { |
455 | | - months = "<span color='#ffead3'><b>{}</b></span>"; |
456 | | - days = "<span color='#d6d2d4'><b>{}</b></span>"; |
457 | | - weeks = "<span color='#99ffdd'><b>W{}</b></span>"; |
458 | | - weekdays = "<span color='#ffcc66'><b>{}</b></span>"; |
459 | | - today = "<span color='#b33e5f'><b>{}</b></span>"; |
460 | | - }; |
461 | | - }; |
462 | | - }; |
463 | | - }; |
464 | | - }; |
465 | | - }; |
466 | | - |
467 | | - # notifications |
468 | | - services.swaync = { |
469 | | - enable = true; |
470 | | - style = lib.mkForce (builtins.readFile ../../dots/swaync/theme.css); |
471 | | - }; |
472 | | - |
473 | 275 | # auto mount removable drives |
474 | 276 | services.udiskie.enable = true; |
475 | 277 | # TODO: should this be enabled for non-hyprland? |
|
0 commit comments