From fdd9dd20aef1771e4b7b1493c6fc18315158cdd3 Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 9 May 2025 18:43:27 -0400 Subject: [PATCH] updates --- flake.lock | 398 ++++++++++++------ flake.nix | 5 + homes/x86_64-linux/zoey@earth/default.nix | 2 +- modules/home/apps/helpers/waybar/default.nix | 66 +-- .../home/apps/helpers/waybar/mullvad-menu.nix | 7 + .../home/apps/helpers/waybar/mullvad-menu.sh | 126 ++++++ .../helpers/waybar/mullvad-server-list.nix | 57 +++ .../apps/helpers/waybar/mullvad-status.nix | 4 + .../apps/helpers/waybar/mullvad-status.sh | 35 ++ .../apps/helpers/waybar/mullvad-style.css | 18 + modules/home/apps/helpers/waybar/style.css | 2 +- modules/home/wms/niri/default.nix | 10 +- modules/nixos/protocols/wayland/default.nix | 5 +- systems/x86_64-linux/earth/default.nix | 13 +- 14 files changed, 544 insertions(+), 204 deletions(-) create mode 100644 modules/home/apps/helpers/waybar/mullvad-menu.nix create mode 100755 modules/home/apps/helpers/waybar/mullvad-menu.sh create mode 100644 modules/home/apps/helpers/waybar/mullvad-server-list.nix create mode 100644 modules/home/apps/helpers/waybar/mullvad-status.nix create mode 100755 modules/home/apps/helpers/waybar/mullvad-status.sh create mode 100644 modules/home/apps/helpers/waybar/mullvad-style.css diff --git a/flake.lock b/flake.lock index 348a9b2..9439729 100644 --- a/flake.lock +++ b/flake.lock @@ -136,11 +136,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1746175539, - "narHash": "sha256-/wjcn1CDQqOhwOoYKS8Xp0KejrdXSJZQMF1CbbrVtMw=", + "lastModified": 1746650299, + "narHash": "sha256-4+pxk1KcSH8ww3tgN808nNJ3E7Q8gNWI+U0sesW7mBQ=", "owner": "catppuccin", "repo": "nix", - "rev": "a5db9e41a4dccfa5ffe38e6f1841a5f9ad5c5c04", + "rev": "f746600f15b69df05c84e3037749a3be5b1276d1", "type": "github" }, "original": { @@ -158,11 +158,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1746548387, - "narHash": "sha256-GYk8aP4eRg5SuMXZqx+oYURmQqwLip4Ak/n1K0sI0MQ=", + "lastModified": 1746787516, + "narHash": "sha256-CEaMMkWFO5dSnKheGrT4yPnx6gv+qlCNdtd4tolZL6g=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "1b140c87692a5b3dcf8229ae3677a4d7a121c4e5", + "rev": "a22be7029506f1bf53a24c22fbc7f746680dc733", "type": "github" }, "original": { @@ -237,11 +237,11 @@ ] }, "locked": { - "lastModified": 1746411114, - "narHash": "sha256-mLlkVX1kKbAa/Ns5u26wDYw4YW4ziMFM21fhtRmfirU=", + "lastModified": 1746729224, + "narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=", "owner": "nix-community", "repo": "disko", - "rev": "b5d1320ebc2f34dbea4655f95167f55e2130cdb3", + "rev": "85555d27ded84604ad6657ecca255a03fd878607", "type": "github" }, "original": { @@ -256,11 +256,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1746552390, - "narHash": "sha256-s+SVW+VPmU+RUMhm+9xVEG8dA2F4oCCp/DQ1TQKhDG8=", + "lastModified": 1746807886, + "narHash": "sha256-gNS0r0JdkdsrqYkzpJK20vDRFSy7+1fuziRWd4BZiu4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "cd0ba3fdbed27f695be7c2bd1f2d05acdf6de725", + "rev": "8ae925057bad39c6a72f55dd2ff0b281e2cea714", "type": "github" }, "original": { @@ -278,11 +278,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1746427067, - "narHash": "sha256-MlBKT0A2nK8LHDkeg3jrG2wo80C1bSGyT2tmKrc6pM0=", + "lastModified": 1746599904, + "narHash": "sha256-bykoJKLSbNANMY5nedzVYa2Z3GF8poQsNTHAnc19alM=", "owner": "nix-community", "repo": "fenix", - "rev": "9e7d648c1f8fdf7beb9b0b1abb3a41d0d8b5fb05", + "rev": "589e863010225278a042480fed5b6feacb364a65", "type": "github" }, "original": { @@ -554,6 +554,24 @@ "inputs": { "nixpkgs-lib": "nixpkgs-lib_3" }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_7": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_4" + }, "locked": { "lastModified": 1727826117, "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", @@ -568,9 +586,9 @@ "type": "github" } }, - "flake-parts_7": { + "flake-parts_8": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_4" + "nixpkgs-lib": "nixpkgs-lib_5" }, "locked": { "lastModified": 1719994518, @@ -807,11 +825,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1746553814, - "narHash": "sha256-RTwom24eoEoPO7nCWoQuUtrQLXdeLecQPnx48eO7zWE=", + "lastModified": 1746806042, + "narHash": "sha256-Hx92i3f5IjHaWpReyCKvGdqG55bZFU3wxGzA3wv9VLA=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "d0a8cb671b73cd4e3393c41bb5aaf5900444fc47", + "rev": "7f9bb3c0e54f585e11259bc0c9064813d061929c", "type": "github" }, "original": { @@ -830,11 +848,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1746537231, + "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "type": "github" }, "original": { @@ -960,11 +978,11 @@ ] }, "locked": { - "lastModified": 1746413188, - "narHash": "sha256-i6BoiQP0PasExESQHszC0reQHfO6D4aI2GzOwZMOI20=", + "lastModified": 1746661235, + "narHash": "sha256-TAm/SnOT8AD3YKYOdjtg5Nmf/hCKEwc0USHBIoXV8qo=", "owner": "nix-community", "repo": "home-manager", - "rev": "8a318641ac13d3bc0a53651feaee9560f9b2d89a", + "rev": "ec71b5162848e6369bdf2be8d2f1dd41cded88e8", "type": "github" }, "original": { @@ -980,11 +998,11 @@ ] }, "locked": { - "lastModified": 1746413188, - "narHash": "sha256-i6BoiQP0PasExESQHszC0reQHfO6D4aI2GzOwZMOI20=", + "lastModified": 1746798521, + "narHash": "sha256-axfz/jBEH9XHpS7YSumstV7b2PrPf7L8bhWUtLBv3nA=", "owner": "nix-community", "repo": "home-manager", - "rev": "8a318641ac13d3bc0a53651feaee9560f9b2d89a", + "rev": "e95a7c5b6fa93304cd2fd78cf676c4f6d23c422c", "type": "github" }, "original": { @@ -1115,11 +1133,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1746536008, - "narHash": "sha256-Imezq1cYcJnoxpVjWCR0hR1eG3CIN0bzkVoaqizqk/I=", + "lastModified": 1746794848, + "narHash": "sha256-lrJeeV5W1DbPxtdQsWrEv5ptOU3U7+vSkvhz/4fqFMk=", "ref": "refs/heads/main", - "rev": "708a7c24ef2c137c04c2473ee6b3f841ed5a1d8b", - "revCount": 6083, + "rev": "25cf06f6cfe1b23b97d9beae91247413a3683803", + "revCount": 6101, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -1293,11 +1311,11 @@ ] }, "locked": { - "lastModified": 1745357019, - "narHash": "sha256-q/C3qj9FWHQenObXuw/nGIT8iIsWFjgmcQYcA+ZfpPs=", + "lastModified": 1746655412, + "narHash": "sha256-kVQ0bHVtX6baYxRWWIh4u3LNJZb9Zcm2xBeDPOGz5BY=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "397600c42b8d7a443a5b4e92aa15f46650a90f18", + "rev": "557241780c179cf7ef224df392f8e67dab6cef83", "type": "github" }, "original": { @@ -1343,11 +1361,11 @@ ] }, "locked": { - "lastModified": 1745975815, - "narHash": "sha256-s3GzsRxBL/N/xYgUXZhQh4t62uR1BN4zxXgWBtJ3lWM=", + "lastModified": 1746635225, + "narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "05878d9470c9e5cbc8807813f9ec2006627a0ca0", + "rev": "674ea57373f08b7609ce93baff131117a0dfe70d", "type": "github" }, "original": { @@ -1415,11 +1433,11 @@ ] }, "locked": { - "lastModified": 1746158343, - "narHash": "sha256-i/1os9oEq0m/Da4FTdSqKUdI4+wzrvoDTuk1/dHSVDc=", + "lastModified": 1746656950, + "narHash": "sha256-tnbPgz/TYBsxuidwFwVYgz/aZLVUy1EkIemTDDOh1XY=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "8b45a8efb2829adf2996b51965ada1e4620631ac", + "rev": "87911a856356a11c7864c0a66c4c000f178e19b0", "type": "github" }, "original": { @@ -1482,8 +1500,8 @@ }, "lexical": { "inputs": { - "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_21", + "flake-parts": "flake-parts_8", + "nixpkgs": "nixpkgs_22", "systems": "systems_21" }, "locked": { @@ -1543,11 +1561,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1746545137, - "narHash": "sha256-aqmLaMdzNmpovS8u3M69itFO9o3VKz4d99zPLMn6LF0=", + "lastModified": 1746740198, + "narHash": "sha256-Sbcl1MkJBOMg9BBENRm++clDuk6SihqBNOkPcKt+EF4=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "155ba08be7f9936dae712196d245b57a3795d1ee", + "rev": "1feca020084017b47bcbf893b33e76585785a840", "type": "gitlab" }, "original": { @@ -1567,11 +1585,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1746509854, - "narHash": "sha256-WwpUWaLKrQpeehMal4oCX6jq99dH96DPVsVsf5o9ly4=", + "lastModified": 1746774188, + "narHash": "sha256-CRKb1MnBhcjs8Z1lJHKLHArhPRPZy19iN+814zoNvrg=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "644fce4b887107421779a977aa466fce4a4c496f", + "rev": "07cf14912cb39e1ad4e2b15503a8281e298914a0", "type": "github" }, "original": { @@ -1583,11 +1601,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1746469682, - "narHash": "sha256-nL1H7ypnf4hBV8UYwBjFQHU3kKcC5/NhGOrCFxwxkak=", + "lastModified": 1746746481, + "narHash": "sha256-pqNKlU7CNpO3CpXRga4zF2UlGb7K0NuSndFm91AjFJA=", "owner": "neovim", "repo": "neovim", - "rev": "9efdd4fe98e74b7068bd716388b2437a27d0ce6a", + "rev": "3121e02ae04e489fb11b7058f7b7d0da0901dafa", "type": "github" }, "original": { @@ -1620,6 +1638,29 @@ "type": "github" } }, + "niri-src": { + "inputs": { + "nix-filter": "nix-filter", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_3" + }, + "locked": { + "lastModified": 1743835358, + "narHash": "sha256-HiDNB5meUAsz8gbQrS551M8axbbVx+nHfJdYZedzivQ=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "c359d248257bdb68785597d2822f9c3a5ccbfdfe", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "rev": "c359d248257bdb68785597d2822f9c3a5ccbfdfe", + "type": "github" + } + }, "niri-stable": { "flake": false, "locked": { @@ -1640,11 +1681,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1745913113, - "narHash": "sha256-/Iph65fWHox7tVyfzw0+AGyCqL2FGuHSt+xjFUsxbOk=", + "lastModified": 1746124654, + "narHash": "sha256-LmhkAt2KLvf8lp+kEUQuTFmmv7iXO8IkwwSaPasfXJw=", "owner": "YaLTeR", "repo": "niri", - "rev": "5f117c61dc4dd91564e02b32836e98dd0e648246", + "rev": "6c9705dd4b2eaba25f024d1a3efd7943fd393632", "type": "github" }, "original": { @@ -1653,6 +1694,37 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1731533336, + "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "f7653272fd234696ae94229839a99b73c9ab7de0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts_5", + "nixpkgs": "nixpkgs_12" + }, + "locked": { + "lastModified": 1746818569, + "narHash": "sha256-kFuLmXX/3zVCz0wlyN8ZfXdt3Ri/cOOqXYgDKwVi0lk=", + "path": "/home/zoey/dev/nix-gaming", + "type": "path" + }, + "original": { + "path": "/home/zoey/dev/nix-gaming", + "type": "path" + } + }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -1714,11 +1786,11 @@ }, "nixos-stable": { "locked": { - "lastModified": 1746422338, - "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", + "lastModified": 1746557022, + "narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", + "rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860", "type": "github" }, "original": { @@ -1730,11 +1802,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "lastModified": 1746663147, + "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", + "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", "type": "github" }, "original": { @@ -1785,6 +1857,21 @@ } }, "nixpkgs-lib_3": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_4": { "locked": { "lastModified": 1727825735, "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", @@ -1796,7 +1883,7 @@ "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" } }, - "nixpkgs-lib_4": { + "nixpkgs-lib_5": { "locked": { "lastModified": 1719876945, "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=", @@ -1810,11 +1897,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1746422338, - "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", + "lastModified": 1746557022, + "narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", + "rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860", "type": "github" }, "original": { @@ -1858,11 +1945,11 @@ }, "nixpkgs-stable_4": { "locked": { - "lastModified": 1745868005, - "narHash": "sha256-hZScOyQphT4RUmSEJX+2OxjIlGgLwSd8iW1LNtAWIOs=", + "lastModified": 1746055187, + "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "330d0a4167924b43f31cc9406df363f71b768a02", + "rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5", "type": "github" }, "original": { @@ -1890,11 +1977,11 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1746397377, - "narHash": "sha256-5oLdRa3vWSRbuqPIFFmQBGGUqaYZBxX+GGtN9f/n4lU=", + "lastModified": 1746576598, + "narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ed30f8aba41605e3ab46421e3dcb4510ec560ff8", + "rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55", "type": "github" }, "original": { @@ -1922,11 +2009,27 @@ }, "nixpkgs_12": { "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "lastModified": 1746269363, + "narHash": "sha256-Q0lKWway9OmZnkDTpAoAE9VLXHOHqCqdJ3N0tkSM99g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b6aef6c3553f849e1e6c08f1bcd3061df2b69fc4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_13": { + "locked": { + "lastModified": 1746663147, + "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", + "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", "type": "github" }, "original": { @@ -1936,7 +2039,7 @@ "type": "github" } }, - "nixpkgs_13": { + "nixpkgs_14": { "locked": { "lastModified": 1702151865, "narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=", @@ -1952,7 +2055,7 @@ "type": "github" } }, - "nixpkgs_14": { + "nixpkgs_15": { "locked": { "lastModified": 1736189585, "narHash": "sha256-GBC2LIBk9BuJR4HXfjuNlIWeY15U6jFvaqc7PeToGLw=", @@ -1968,7 +2071,7 @@ "type": "github" } }, - "nixpkgs_15": { + "nixpkgs_16": { "locked": { "lastModified": 1712883908, "narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=", @@ -1984,7 +2087,7 @@ "type": "github" } }, - "nixpkgs_16": { + "nixpkgs_17": { "locked": { "lastModified": 1744536153, "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", @@ -2000,7 +2103,7 @@ "type": "github" } }, - "nixpkgs_17": { + "nixpkgs_18": { "locked": { "lastModified": 1744868846, "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", @@ -2016,7 +2119,7 @@ "type": "github" } }, - "nixpkgs_18": { + "nixpkgs_19": { "locked": { "lastModified": 1740547748, "narHash": "sha256-Ly2fBL1LscV+KyCqPRufUBuiw+zmWrlJzpWOWbahplg=", @@ -2032,22 +2135,6 @@ "type": "github" } }, - "nixpkgs_19": { - "locked": { - "lastModified": 1738142207, - "narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9d3ae807ebd2981d593cddd0080856873139aa40", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1712883908, @@ -2065,6 +2152,22 @@ } }, "nixpkgs_20": { + "locked": { + "lastModified": 1738142207, + "narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9d3ae807ebd2981d593cddd0080856873139aa40", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_21": { "locked": { "lastModified": 1743448293, "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=", @@ -2080,7 +2183,7 @@ "type": "github" } }, - "nixpkgs_21": { + "nixpkgs_22": { "locked": { "lastModified": 1719931832, "narHash": "sha256-0LD+KePCKKEb4CcPsTBOwf019wDtZJanjoKm1S8q3Do=", @@ -2128,11 +2231,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1746328495, - "narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=", + "lastModified": 1746663147, + "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e", + "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", "type": "github" }, "original": { @@ -2144,11 +2247,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1746328495, - "narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=", + "lastModified": 1746663147, + "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e", + "rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54", "type": "github" }, "original": { @@ -2227,7 +2330,7 @@ "pnpm2nix_2": { "inputs": { "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_14" }, "locked": { "lastModified": 1706694632, @@ -2245,7 +2348,7 @@ }, "posting": { "inputs": { - "nixpkgs": "nixpkgs_14", + "nixpkgs": "nixpkgs_15", "utils": "utils" }, "locked": { @@ -2272,11 +2375,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1746537231, + "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "type": "github" }, "original": { @@ -2329,7 +2432,7 @@ }, "resume": { "inputs": { - "nixpkgs": "nixpkgs_15", + "nixpkgs": "nixpkgs_16", "systems": "systems_14" }, "locked": { @@ -2345,19 +2448,19 @@ }, "rio-term": { "inputs": { - "flake-parts": "flake-parts_5", + "flake-parts": "flake-parts_6", "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_3", + "rust-overlay": "rust-overlay_4", "systems": "systems_15" }, "locked": { - "lastModified": 1746467568, - "narHash": "sha256-0ZjON00fi3QY/WJUivTQ3Oa8UuMgVa64DCBZ370iNWg=", + "lastModified": 1746766349, + "narHash": "sha256-5SygQcMjCerpeaO9gigM++mYWrY3Zt41A+C5GQqyWm0=", "owner": "raphamorim", "repo": "rio", - "rev": "cf5a52ebbdd72c4ba4607d4fade95c223784e7e4", + "rev": "d202a5f829710144a179d37b988ba68411812afd", "type": "github" }, "original": { @@ -2386,14 +2489,16 @@ "mailserver": "mailserver", "neovim-nightly-overlay": "neovim-nightly-overlay", "niri": "niri", + "niri-src": "niri-src", + "nix-gaming": "nix-gaming", "nixos-generators": "nixos-generators", "nixos-stable": "nixos-stable", - "nixpkgs": "nixpkgs_12", + "nixpkgs": "nixpkgs_13", "pnpm2nix": "pnpm2nix_2", "posting": "posting", "resume": "resume", "rio-term": "rio-term", - "rust-overlay": "rust-overlay_4", + "rust-overlay": "rust-overlay_5", "snowfall-lib": "snowfall-lib", "solaar": "solaar", "sops-nix": "sops-nix", @@ -2409,11 +2514,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1746332785, - "narHash": "sha256-d4/WBcspAR38AMsZysrQsenF1NmZ0/9GhjD4hxvPygo=", + "lastModified": 1746522319, + "narHash": "sha256-q+Qo00BFgXN6xKrsrQI1P7Z3K1s2zKT0GNl0h8DwBH4=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "3b57c001518aeb42511e177221f98ecf42104016", + "rev": "debaef80be92d957f52d6e89c86286556075ea47", "type": "github" }, "original": { @@ -2468,7 +2573,28 @@ }, "rust-overlay_3": { "inputs": { - "nixpkgs": "nixpkgs_16" + "nixpkgs": [ + "niri-src", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742697269, + "narHash": "sha256-Lpp0XyAtIl1oGJzNmTiTGLhTkcUjwSkEb0gOiNzYFGM=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "01973c84732f9275c50c5f075dd1f54cc04b3316", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_4": { + "inputs": { + "nixpkgs": "nixpkgs_17" }, "locked": { "lastModified": 1746239644, @@ -2484,18 +2610,18 @@ "type": "github" } }, - "rust-overlay_4": { + "rust-overlay_5": { "inputs": { "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1746498961, - "narHash": "sha256-rp+oh/N88JKHu7ySPuGiA3lBUVIsrOtHbN2eWJdYCgk=", + "lastModified": 1746758179, + "narHash": "sha256-JECUw1YBEsTsVauvupRzE5ykZaJoyhHCpoY87ZZJGas=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "24b00064cdd1d7ba25200c4a8565dc455dc732ba", + "rev": "4fd00513eac6b6140c5dced3e1b8133e2369a0f8", "type": "github" }, "original": { @@ -2575,7 +2701,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_17" + "nixpkgs": "nixpkgs_18" }, "locked": { "lastModified": 1746485181, @@ -2599,11 +2725,11 @@ "systems": "systems_18" }, "locked": { - "lastModified": 1746551108, - "narHash": "sha256-sTghs3HNf/hwPXJb5Ii8G53PhQNE1ayWgY9IOYSHAOY=", + "lastModified": 1746738008, + "narHash": "sha256-bIMysaVhNyjuFgt8QpnGZv0T4YMao26Vz5R/xfYAJO0=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "133e882f1266f1bb580bea64b9082d423fa005ba", + "rev": "a43fae27f33f8d3e793a6ca2946190cb24a00b03", "type": "github" }, "original": { @@ -2984,7 +3110,7 @@ }, "umu": { "inputs": { - "nixpkgs": "nixpkgs_18" + "nixpkgs": "nixpkgs_19" }, "locked": { "dir": "packaging/nix", @@ -3022,7 +3148,7 @@ }, "walker": { "inputs": { - "nixpkgs": "nixpkgs_19", + "nixpkgs": "nixpkgs_20", "systems": "systems_20" }, "locked": { @@ -3137,14 +3263,14 @@ "zen-browser": { "inputs": { "home-manager": "home-manager_4", - "nixpkgs": "nixpkgs_20" + "nixpkgs": "nixpkgs_21" }, "locked": { - "lastModified": 1746526870, - "narHash": "sha256-wiYAuu919SIBaH0WqTIQLrjkq8R8NxCy8CDxRNb1SAM=", + "lastModified": 1746822069, + "narHash": "sha256-FX+TYr2qrTBPstpGF9EvcyIcF/7qQR0dt9Z+55ICZuk=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "3ad6fc80856ef6b3959bcf57a57ff2526a945215", + "rev": "98627b680b1434a2b491d50521112362678ac036", "type": "github" }, "original": { @@ -3183,7 +3309,7 @@ }, "zoeycomputer": { "inputs": { - "flake-parts": "flake-parts_6", + "flake-parts": "flake-parts_7", "lexical": "lexical", "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 9150493..89d31cd 100644 --- a/flake.nix +++ b/flake.nix @@ -129,6 +129,11 @@ disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; + nix-gaming.url = "path:/home/zoey/dev/nix-gaming"; + + niri-src.url = "github:YaLTeR/niri/c359d248257bdb68785597d2822f9c3a5ccbfdfe"; + niri-src.inputs.nixpkgs.follows = "nixpkgs"; + niri.url = "github:sodiboo/niri-flake/bc29338ba733e4c1b94c3ed134baabfea587627e"; chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; diff --git a/homes/x86_64-linux/zoey@earth/default.nix b/homes/x86_64-linux/zoey@earth/default.nix index 4ade8b6..da7a93d 100644 --- a/homes/x86_64-linux/zoey@earth/default.nix +++ b/homes/x86_64-linux/zoey@earth/default.nix @@ -5,7 +5,7 @@ lib, ... }: { - # wms.hyprland.enable = true; + wms.hyprland.enable = false; wms.niri.enable = true; apps = { web.librewolf.enable = true; diff --git a/modules/home/apps/helpers/waybar/default.nix b/modules/home/apps/helpers/waybar/default.nix index f4b2c7a..b1e1c82 100644 --- a/modules/home/apps/helpers/waybar/default.nix +++ b/modules/home/apps/helpers/waybar/default.nix @@ -48,55 +48,14 @@ in { @define-color mantle ${colors.mantle.hex}; @define-color crust ${colors.crust.hex}; - /* Mullvad specific styles */ - #custom-mullvad.connected { - color: @green; - } - #custom-mullvad.disconnected { - color: @red; - } - + ${builtins.readFile ./mullvad-style.css} ${builtins.readFile ./style.css} ''; settings = let - # Script to get Mullvad status for Waybar - mullvad-status = pkgs.writeShellScriptBin "mullvad-status-waybar" '' - #!${pkgs.runtimeShell} - set -euo pipefail - # Run mullvad status, capture output, handle potential errors - STATUS=$(mullvad status || echo "Disconnected") - - if echo "$STATUS" | grep -q "Connected"; then - # Extract Relay using sed: find line starting with Relay:, remove prefix - SERVER=$(echo "$STATUS" | sed -n 's/^\s*Relay:\s*//p') - # Extract Location using sed: find line starting with Visible location:, - # remove prefix, keep text up to the first comma - LOCATION=$(echo "$STATUS" | sed -n 's/^\s*Visible location:\s*\([^,]*\).*/\1/p') - - # Trim potential leading/trailing whitespace just in case sed leaves some - SERVER=$(echo "$SERVER" | sed 's/^[ \t]*//;s/[ \t]*$//') - LOCATION=$(echo "$LOCATION" | sed 's/^[ \t]*//;s/[ \t]*$//') - - # Construct tooltip based on extracted info - if [ -n "$SERVER" ] && [ -n "$LOCATION" ]; then - TOOLTIP="Mullvad: Connected via $SERVER ($LOCATION)" - elif [ -n "$SERVER" ]; then - # Fallback if location parsing failed but server was found - TOOLTIP="Mullvad: Connected via $SERVER" - else - # Generic fallback if parsing failed - TOOLTIP="Mullvad: Connected" - fi - - # Output JSON for Waybar - # Using nerd font icons: nf-fa-lock (connected), nf-fa-unlock (disconnected) - # Ensure your font supports these glyphs:  (U+F023),  (U+F09C) - echo '{"text": "", "tooltip": "'"$TOOLTIP"'", "class": "connected"}' - else - # Output disconnected status - echo '{"text": "", "tooltip": "Mullvad: Disconnected", "class": "disconnected"}' - fi - ''; + # Import the Mullvad scripts + mullvad-status = import ./mullvad-status.nix {inherit pkgs;}; + mullvad-server-list = import ./mullvad-server-list.nix {inherit pkgs;}; + mullvad-menu = import ./mullvad-menu.nix {inherit pkgs;}; # Script to toggle Mullvad connection mullvad-toggle = pkgs.writeShellScriptBin "mullvad-toggle" '' @@ -155,6 +114,7 @@ in { interval = 1; exec = "${mullvad-status}/bin/mullvad-status-waybar"; "on-click" = "${mullvad-toggle}/bin/mullvad-toggle"; + "on-click-right" = "${mullvad-menu}/bin/mullvad-menu"; tooltip = true; }; @@ -217,7 +177,7 @@ in { "custom/gpu-temp" = { interval = 10; exec = "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits"; - format = "{}°C "; + format = "{}°C "; tooltip = false; }; @@ -238,8 +198,8 @@ in { "network#speed" = { interval = 1; format = "{ifname}%%"; - format-wifi = " {bandwidthDownBytes}  {bandwidthUpBytes}"; - format-ethernet = " {bandwidthDownBytes}  {bandwidthUpBytes}"; + format-wifi = " {bandwidthDownBytes} {bandwidthUpBytes}"; + format-ethernet = " {bandwidthDownBytes} {bandwidthUpBytes}"; format-disconnected = "󰌙"; tooltip-format = "{ipaddr}"; format-linked = "󰈁 {ifname} (No IP)"; @@ -277,7 +237,7 @@ in { hwmon-path-abs = "/sys/devices/platform/asus-ec-sensors/hwmon/hwmon3"; input_filename = "temp2_input"; critical-threshold = 70; - format = "{temperatureC}°C "; + format = "{temperatureC}°C "; format-critical = "󰸁 {temperatureC}°C"; }; @@ -311,10 +271,10 @@ in { pulseaudio = { format = "{icon} {volume}%"; - "format-muted" = ""; + "format-muted" = ""; "format-icons" = { - headphone = ""; - default = ["" ""]; + headphone = ""; + default = ["" ""]; }; "on-click" = "pavucontrol"; }; diff --git a/modules/home/apps/helpers/waybar/mullvad-menu.nix b/modules/home/apps/helpers/waybar/mullvad-menu.nix new file mode 100644 index 0000000..ec8c242 --- /dev/null +++ b/modules/home/apps/helpers/waybar/mullvad-menu.nix @@ -0,0 +1,7 @@ +{pkgs}: let + script = ./mullvad-menu.sh; +in + pkgs.writeScriptBin "mullvad-menu" '' + #!${pkgs.runtimeShell} + exec ${pkgs.bash}/bin/bash ${script} + '' diff --git a/modules/home/apps/helpers/waybar/mullvad-menu.sh b/modules/home/apps/helpers/waybar/mullvad-menu.sh new file mode 100755 index 0000000..5e647b6 --- /dev/null +++ b/modules/home/apps/helpers/waybar/mullvad-menu.sh @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Helper: pick a relay (country [city] [hostname]) via fuzzel + jq +pick_relay() { + local api="$API_RESPONSE" + local country_list country_sel country_code + local city_list city_sel city_code loc_key + local host_list host_sel + + # Build "Country Name (cc)" array + mapfile -t country_list < <( + jq -r ' + .locations + | to_entries[] + | "\(.value.country) (\(.key|split("-")[0]))" + ' <<<"$api" | sort -u + ) + country_sel=$(printf '%s\n' "${country_list[@]}" | + fuzzel --dmenu --prompt="Select country:") + [[ -z "$country_sel" ]] && return 1 + country_code=$(grep -oP '(?<=\()[^)]+(?=\))' <<<"$country_sel") + + # Build "City Name (ccc)" array for that country + mapfile -t city_list < <( + jq -r --arg cc "$country_code" ' + .locations + | to_entries[] + | select(.key|startswith("\($cc)-")) + | "\(.value.city) (\(.key|split("-")[1]))" + ' <<<"$api" | sort -u + ) + if ((${#city_list[@]})); then + city_sel=$(printf '%s\n' "${city_list[@]}" | + fuzzel --dmenu --prompt="Select city in $country_sel:") + [[ -z "$city_sel" ]] && return 1 + city_code=$(grep -oP '(?<=\()[^)]+(?=\))' <<<"$city_sel") + loc_key="$country_code-$city_code" + fi + + # Optional hostname picker + mapfile -t host_list < <( + jq -r --arg loc "${loc_key:-}" ' + ( .openvpn.relays[] + , .wireguard.relays[] + , .bridge.relays[] ) + | select(.location == $loc) + | .hostname + ' <<<"$api" | sort -u + ) + if ((${#host_list[@]})); then + host_sel=$(printf '%s\n' "${host_list[@]}" | + fuzzel --dmenu --prompt="Select hostname (optional):") + # if they pick a hostname, we switch to pure-hostname mode + [[ -n "$host_sel" ]] && { + RELAY_CMD_ARGS=("$host_sel") + return 0 + } + fi + + # Assemble country [city] + RELAY_CMD_ARGS=("$country_code") + [[ -n "${city_code-}" ]] && RELAY_CMD_ARGS+=("$city_code") + return 0 +} + +# Ensure mullvad CLI exists +if ! command -v mullvad >/dev/null 2>&1; then + echo "Mullvad CLI not found" | fuzzel --dmenu + exit 1 +fi + +# Fetch status and API once +STATUS_RAW=$(mullvad status 2>/dev/null || echo "Disconnected") +API_RESPONSE=$(curl -s "https://api.mullvad.net/app/v1/relays") + +# Determine state and current relay (if any) +if [[ $STATUS_RAW == Connecting* ]]; then + STATE=Connecting +elif grep -q "^Connected" <<<"$STATUS_RAW"; then + STATE=Connected +else + STATE=Disconnected +fi + +# Try to parse the current relay hostname for Connected/Connecting +if [[ $STATE != Disconnected ]]; then + CURRENT_RELAY=$(grep -E 'Relay:' <<<"$STATUS_RAW" | + sed -E 's/.*Relay:[[:space:]]*//') +fi + +# Main menu +case $STATE in +Connected | Connecting) + # Offer Disconnect or Change Location + CHOICE=$(printf "Disconnect\nChange Location" | + fuzzel --dmenu --prompt="$STATE ${CURRENT_RELAY:-}") + case "$CHOICE" in + Disconnect) + mullvad disconnect + ;; + "Change Location") + if pick_relay; then + mullvad relay set location "${RELAY_CMD_ARGS[@]}" + fi + ;; + esac + ;; +Disconnected) + # Offer Connect or Connect to Location + CHOICE=$(printf "Connect\nConnect to Location" | + fuzzel --dmenu --prompt="Disconnected") + case "$CHOICE" in + Connect) + mullvad connect + ;; + "Connect to Location") + if pick_relay; then + mullvad relay set location "${RELAY_CMD_ARGS[@]}" + mullvad connect + fi + ;; + esac + ;; +esac + diff --git a/modules/home/apps/helpers/waybar/mullvad-server-list.nix b/modules/home/apps/helpers/waybar/mullvad-server-list.nix new file mode 100644 index 0000000..1dc0a25 --- /dev/null +++ b/modules/home/apps/helpers/waybar/mullvad-server-list.nix @@ -0,0 +1,57 @@ +{pkgs}: +pkgs.writeShellScriptBin "mullvad-server-list" '' + #!${pkgs.runtimeShell} + set -euo pipefail + + # Check if mullvad is installed + if ! command -v mullvad >/dev/null 2>&1; then + echo "Mullvad CLI not found" | fuzzel --dmenu + exit 1 + fi + + # Get the list of countries + COUNTRIES=$(mullvad relay list | grep -E "^[[:space:]]+[[:alpha:]]" | sed 's/^[[:space:]]*//g') + + # If no argument is provided, show the list of countries + if [ $# -eq 0 ]; then + echo "$COUNTRIES" | sort | fuzzel --dmenu --prompt="Select country: " + exit 0 + fi + + COUNTRY="$1" + + # If country is provided but no city, show cities for that country + if [ $# -eq 1 ]; then + CITIES=$(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -E "^[[:space:]]{4}[[:alpha:]]" | sed 's/^[[:space:]]*//g' | head -n $(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -E "^[[:space:]]{4}[[:alpha:]]" | wc -l)) + + if [ -z "$CITIES" ]; then + # If no cities found, show servers for this country + SERVERS=$(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -E "^[[:space:]]{8}[a-z0-9]+" | sed 's/^[[:space:]]*//g' | cut -d' ' -f1-2) + echo "$SERVERS" | fuzzel --dmenu --prompt="Select server in $COUNTRY: " + else + echo "$CITIES" | fuzzel --dmenu --prompt="Select city in $COUNTRY: " + fi + exit 0 + fi + + # If both country and city are provided, show servers in that city + CITY="$2" + SERVERS=$(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -A 100 "^[[:space:]]*$CITY" | grep -E "^[[:space:]]{8}[a-z0-9]+" | sed 's/^[[:space:]]*//g') + + # Extract server information and load (where available) + SERVER_INFO="" + while read -r server; do + # Get server details + SERVER_NAME=$(echo "$server" | awk '{print $1}') + SERVER_TYPE=$(echo "$server" | awk '{print $2}') + + # Get server load if available (using 'mullvad relay list --location all') + LOAD_INFO=$(mullvad relay list --location all | grep "$SERVER_NAME" | grep -o '[0-9]\+%' || echo "N/A") + + # Add server with load info to the list + SERVER_INFO="${SERVER_INFO}${SERVER_NAME} (${SERVER_TYPE}) - Load: ${LOAD_INFO}"$'\n' + done <<< "$SERVERS" + + # Display the server list with load information + echo "$SERVER_INFO" | grep -v "^$" | fuzzel --dmenu --prompt="Select server in $CITY: " +'' diff --git a/modules/home/apps/helpers/waybar/mullvad-status.nix b/modules/home/apps/helpers/waybar/mullvad-status.nix new file mode 100644 index 0000000..5d2edcf --- /dev/null +++ b/modules/home/apps/helpers/waybar/mullvad-status.nix @@ -0,0 +1,4 @@ +{pkgs}: +pkgs.writeShellScriptBin "mullvad-status-waybar" '' + exec ${pkgs.bash}/bin/bash ${./mullvad-status.sh} | jq -c +'' diff --git a/modules/home/apps/helpers/waybar/mullvad-status.sh b/modules/home/apps/helpers/waybar/mullvad-status.sh new file mode 100755 index 0000000..bfc3438 --- /dev/null +++ b/modules/home/apps/helpers/waybar/mullvad-status.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Get status (fall back to “Disconnected” on error) +STATUS=$(mullvad status 2>/dev/null || echo "Disconnected") + +if echo "$STATUS" | grep -q "^Connected"; then + # Extract relay hostname + SERVER=$(echo "$STATUS" | + sed -n 's/^[[:space:]]*Relay:[[:space:]]*//p' | + sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + + # Grab the entire Visible location line (location + IPs) + FULL_LOC=$(echo "$STATUS" | + sed -n 's/^[[:space:]]*Visible location:[[:space:]]*//p') + + # Split off the human‐readable location (before first dot) + LOCATION=${FULL_LOC%%.*} + + # The part after the first “. ” is the IP info + IPS=${FULL_LOC#*. } + + TOOLTIP="Connected via ${SERVER} (${IPS})" + + # Emit JSON for Waybar + echo '{"text": "'"${LOCATION}"'" + , "tooltip": "'"${TOOLTIP}"'" + , "class": "connected" + }' +else + echo '{"text": "Disconnected" + , "tooltip": "Mullvad: Disconnected" + , "class": "disconnected" + }' +fi diff --git a/modules/home/apps/helpers/waybar/mullvad-style.css b/modules/home/apps/helpers/waybar/mullvad-style.css new file mode 100644 index 0000000..9f0d527 --- /dev/null +++ b/modules/home/apps/helpers/waybar/mullvad-style.css @@ -0,0 +1,18 @@ +/* Mullvad specific styles */ +#custom-mullvad.connected { + color: @green; + border-bottom: 2px solid @green; + padding-bottom: 2px; +} + +#custom-mullvad.disconnected { + color: @red; + border-bottom: 2px solid @red; + padding-bottom: 2px; +} + +#custom-mullvad { + margin: 0 8px; + padding: 0 5px; + min-width: 100px; +} diff --git a/modules/home/apps/helpers/waybar/style.css b/modules/home/apps/helpers/waybar/style.css index 70e18eb..73e084f 100644 --- a/modules/home/apps/helpers/waybar/style.css +++ b/modules/home/apps/helpers/waybar/style.css @@ -1,5 +1,5 @@ * { - font-family: Iosevka Nerd Font; + font-family: Iosevka Nerd Font, monospace; min-height: 14px; font-size: 14px; border: none; diff --git a/modules/home/wms/niri/default.nix b/modules/home/wms/niri/default.nix index f3ed9d1..5b3b2f5 100644 --- a/modules/home/wms/niri/default.nix +++ b/modules/home/wms/niri/default.nix @@ -340,11 +340,11 @@ in { "Super+Alt+L" = {action = actions.spawn "swaylock";}; # "Mod+T" = { action = actions.spawn "bash" "-c" "notify-send hello && exec alacritty"; }; - "Mod+S" = {action = actions.set-dynamic-cast-window;}; - - "Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;}; - - "Mod+Z" = {action = actions.clear-dynamic-cast-target;}; + # "Mod+S" = {action = actions.set-dynamic-cast-window;}; + # + # "Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;}; + # + # "Mod+Z" = {action = actions.clear-dynamic-cast-target;}; "XF86AudioRaiseVolume" = { allow-when-locked = true; diff --git a/modules/nixos/protocols/wayland/default.nix b/modules/nixos/protocols/wayland/default.nix index 4151e2c..29e98bd 100644 --- a/modules/nixos/protocols/wayland/default.nix +++ b/modules/nixos/protocols/wayland/default.nix @@ -30,7 +30,6 @@ in { }; programs.uwsm = { - enable = false; waylandCompositors = { # "mwc" = { # prettyName = "MWC"; @@ -51,14 +50,14 @@ in { programs.hyprland = { withUWSM = true; - enable = false; + enable = true; xwayland.enable = true; package = inputs.hyprland.packages.${pkgs.system}.hyprland; portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; }; programs.niri.enable = true; - programs.niri.package = pkgs.niri-unstable; + programs.niri.package = inputs.niri-src.packages.${pkgs.system}.niri; environment = { variables = { diff --git a/systems/x86_64-linux/earth/default.nix b/systems/x86_64-linux/earth/default.nix index 17992a1..8823cbb 100644 --- a/systems/x86_64-linux/earth/default.nix +++ b/systems/x86_64-linux/earth/default.nix @@ -51,11 +51,18 @@ }; specialisation = { + hyprland = { + configuration = { + services.greetd.settings.default_session.command = lib.mkForce "Hyprland"; + }; + }; plasma6 = { configuration = { services.desktopManager.plasma6.enable = true; + services.displayManager.sddm.enable = true; programs.seahorse.enable = lib.mkForce false; + services.greetd.enable = lib.mkForce false; }; }; }; @@ -168,10 +175,6 @@ boot.supportedFilesystems = ["ntfs"]; services.dlna.enable = false; - # services.openssh = { - # enable = true; - # PasswordAuthentication = true; - # }; time.timeZone = "America/Detroit"; @@ -191,7 +194,7 @@ pkgs.mangohud (pkgs.lutris.override { extraPkgs = pkgs: [ - pkgs.wineWowPackages.stagingFull + inputs.nix-gaming.packages.${pkgs.system}.wine-tkg-zoey pkgs.winetricks ]; })