diff options
Diffstat (limited to 'accounts/gkleen@sif/default.nix')
| -rw-r--r-- | accounts/gkleen@sif/default.nix | 143 |
1 files changed, 103 insertions, 40 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 5c90808c..09d0f4fa 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
| @@ -76,6 +76,14 @@ let | |||
| 76 | }) | 76 | }) |
| 77 | ]; | 77 | ]; |
| 78 | }; | 78 | }; |
| 79 | |||
| 80 | nvidiaOffloadScript = pkgs.writeShellScriptBin "nvidia-offload" '' | ||
| 81 | export __NV_PRIME_RENDER_OFFLOAD=1 | ||
| 82 | export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 | ||
| 83 | export __GLX_VENDOR_LIBRARY_NAME=nvidia | ||
| 84 | export __VK_LAYER_NV_optimus=NVIDIA_only | ||
| 85 | exec -a "$1" "$@" | ||
| 86 | ''; | ||
| 79 | in { | 87 | in { |
| 80 | imports = with flake.nixosModules.userProfiles.${userName}; [ | 88 | imports = with flake.nixosModules.userProfiles.${userName}; [ |
| 81 | mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) | 89 | mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) |
| @@ -279,46 +287,98 @@ in { | |||
| 279 | enable = true; | 287 | enable = true; |
| 280 | target = "hyprland-session.target"; | 288 | target = "hyprland-session.target"; |
| 281 | }; | 289 | }; |
| 282 | settings.mainBar = { | 290 | settings = let |
| 283 | layer = "top"; | 291 | windowRewrites = { |
| 284 | position = "top"; | 292 | "(.*) — Mozilla Firefox" = "$1"; |
| 285 | height = 14; | 293 | "(.*) - mpv" = "$1"; |
| 286 | output = [ "eDP-1" ]; | ||
| 287 | modules-left = [ "hyprland/workspaces" ]; | ||
| 288 | modules-center = [ "hyprland/window" ]; | ||
| 289 | modules-right = [ "clock" "tray" "battery" ]; | ||
| 290 | |||
| 291 | clock = { | ||
| 292 | interval = 1; | ||
| 293 | timezone = "Europe/Berlin"; | ||
| 294 | format = "W{:%V-%u %F %H:%M:%S%Ez}"; | ||
| 295 | tooltip-format = "<tt><small>{calendar}</small></tt>"; | ||
| 296 | calendar = { | ||
| 297 | mode = "year"; | ||
| 298 | mode-mon-col = 3; | ||
| 299 | week-pos = "right"; | ||
| 300 | on-scroll = 1; | ||
| 301 | format = { | ||
| 302 | months = "<span color='#ffead3'><b>{}</b></span>"; | ||
| 303 | days = "<span color='#ecc6d9'><b>{}</b></span>"; | ||
| 304 | weeks = "<span color='#99ffdd'><b>W{}</b></span>"; | ||
| 305 | weekdays = "<span color='#ffcc66'><b>{}</b></span>"; | ||
| 306 | today = "<span color='#ff6699'><b><u>{}</u></b></span>"; | ||
| 307 | }; | ||
| 308 | }; | ||
| 309 | }; | 294 | }; |
| 310 | battery = { | 295 | iconSize = 14; |
| 311 | format = "{icon}"; | 296 | in [ |
| 312 | format-icons = ["" "" "" "" ""]; | 297 | { |
| 313 | tooltip-format = "{capacity}% {timeTo}"; | 298 | layer = "top"; |
| 314 | }; | 299 | position = "top"; |
| 315 | icon = { | 300 | height = 14; |
| 316 | icon-size = 12; | 301 | output = "eDP-1"; |
| 317 | show-passive-items = true; | 302 | modules-left = [ "hyprland/workspaces" ]; |
| 318 | spacing = 2; | 303 | modules-center = [ "hyprland/window" ]; |
| 319 | }; | 304 | modules-right = [ "privacy" "clock" "tray" "battery" ]; |
| 320 | }; | 305 | |
| 306 | "hyprland/workspaces" = { | ||
| 307 | all-outputs = true; | ||
| 308 | }; | ||
| 309 | "hyprland/window" = { | ||
| 310 | separate-outputs = true; | ||
| 311 | icon = true; | ||
| 312 | icon-size = iconSize; | ||
| 313 | rewrite = windowRewrites; | ||
| 314 | }; | ||
| 315 | clock = { | ||
| 316 | interval = 1; | ||
| 317 | timezone = "Europe/Berlin"; | ||
| 318 | format = "W{:%V-%u %F %H:%M:%S%Ez}"; | ||
| 319 | tooltip-format = "<tt><small>{calendar}</small></tt>"; | ||
| 320 | calendar = { | ||
| 321 | mode = "year"; | ||
| 322 | mode-mon-col = 3; | ||
| 323 | weeks-pos = "left"; | ||
| 324 | on-scroll = 1; | ||
| 325 | format = { | ||
| 326 | months = "<span color='#ffead3'><b>{}</b></span>"; | ||
| 327 | days = "<span color='#ecc6d9'><b>{}</b></span>"; | ||
| 328 | weeks = "<span color='#99ffdd'><b>{}</b></span>"; | ||
| 329 | weekdays = "<span color='#ffcc66'><b>{}</b></span>"; | ||
| 330 | today = "<span color='#ff6699'><b>{}</b></span>"; | ||
| 331 | }; | ||
| 332 | }; | ||
| 333 | }; | ||
| 334 | battery = { | ||
| 335 | format = "{icon}"; | ||
| 336 | format-icons = ["" "" "" "" ""]; | ||
| 337 | tooltip-format = "{capacity}% {timeTo}"; | ||
| 338 | }; | ||
| 339 | tray = { | ||
| 340 | icon-size = iconSize; | ||
| 341 | # show-passive-items = true; | ||
| 342 | spacing = 2; | ||
| 343 | }; | ||
| 344 | privacy = { | ||
| 345 | icon-spacing = 2; | ||
| 346 | icon-size = iconSize; | ||
| 347 | modules = [ { type = "screenshare"; } { type = "audio-in"; } ]; | ||
| 348 | }; | ||
| 349 | } | ||
| 350 | { | ||
| 351 | layer = "top"; | ||
| 352 | position = "top"; | ||
| 353 | height = 14; | ||
| 354 | output = "!eDP-1"; | ||
| 355 | modules-left = [ "hyprland/workspaces" ]; | ||
| 356 | modules-center = [ "hyprland/window" ]; | ||
| 357 | modules-right = [ "clock" ]; | ||
| 358 | |||
| 359 | "hyprland/workspaces" = { | ||
| 360 | all-outputs = false; | ||
| 361 | }; | ||
| 362 | "hyprland/window" = { | ||
| 363 | separate-outputs = true; | ||
| 364 | icon = true; | ||
| 365 | icon-size = iconSize; | ||
| 366 | rewrite = windowRewrites; | ||
| 367 | }; | ||
| 368 | clock = { | ||
| 369 | interval = 1; | ||
| 370 | timezone = "Europe/Berlin"; | ||
| 371 | format = "{:%H:%M}"; | ||
| 372 | tooltip-format = "W{:%V-%u %F %H:%M:%S%Ez}"; | ||
| 373 | }; | ||
| 374 | } | ||
| 375 | ]; | ||
| 321 | style = '' | 376 | style = '' |
| 377 | @define-color white #dddddd; | ||
| 378 | @define-color blue #1a8fff; | ||
| 379 | @define-color green #23fd00; | ||
| 380 | @define-color red #f2201f; | ||
| 381 | |||
| 322 | * { | 382 | * { |
| 323 | border: none; | 383 | border: none; |
| 324 | font-family: "Fira Sans"; | 384 | font-family: "Fira Sans"; |
| @@ -328,7 +388,7 @@ in { | |||
| 328 | 388 | ||
| 329 | window#waybar { | 389 | window#waybar { |
| 330 | background-color: rgba(0, 0, 0, 0.5); | 390 | background-color: rgba(0, 0, 0, 0.5); |
| 331 | color: #ffffff; | 391 | color: @white; |
| 332 | } | 392 | } |
| 333 | 393 | ||
| 334 | label.module { | 394 | label.module { |
| @@ -344,6 +404,9 @@ in { | |||
| 344 | #workspaces button.urgent { | 404 | #workspaces button.urgent { |
| 345 | color: @red; | 405 | color: @red; |
| 346 | } | 406 | } |
| 407 | #workspaces button.empty { | ||
| 408 | opacity: 0.5; | ||
| 409 | } | ||
| 347 | ''; | 410 | ''; |
| 348 | }; | 411 | }; |
| 349 | wpaperd = { | 412 | wpaperd = { |
| @@ -591,7 +654,7 @@ in { | |||
| 591 | matrix-synapse-tools.synadm wrappedRocketChatDesktop | 654 | matrix-synapse-tools.synadm wrappedRocketChatDesktop |
| 592 | flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs | 655 | flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs |
| 593 | sieve-connect gimp inkscape udiskie glab scrot nitrokey-app | 656 | sieve-connect gimp inkscape udiskie glab scrot nitrokey-app |
| 594 | pynitrokey gtklock wlrctl | 657 | pynitrokey gtklock wlrctl nvidiaOffloadScript |
| 595 | ]; | 658 | ]; |
| 596 | 659 | ||
| 597 | file = { | 660 | file = { |
