diff --git a/_old/desktop/waybar/default.nix b/_old/desktop/waybar/default.nix
deleted file mode 100644
index ea131a3..0000000
--- a/_old/desktop/waybar/default.nix
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- programs.waybar = {
- enable = true;
- systemd.enable = true;
-
- settings.main = {
- height = 34;
- spacing = 10;
-
- modules-left = [
- "hyprland/workspaces"
- "hyprland/submap"
- "hyprland/window"
- ];
- modules-right = [
- "keyboard-state"
- "pulseaudio"
- "network"
- "cpu"
- "memory"
- "temperature"
- "battery"
- "clock"
- "tray"
- "custom/power"
- ];
-
- "hyprland/window" = {
- rewrite = {
- "(.*) — (Zen Browser|Mozilla Firefox)" = "🌎 $1";
- "(.*) - Discord" = "💬 $1";
- };
- separate-outputs = true;
- };
-
- keyboard-state = {
- numlock = true;
- capslock = true;
- format = {
- capslock = "C {icon}";
- numlock = "{icon} N";
- };
- format-icons = {
- locked = " ";
- unlocked = " ";
- };
- };
-
- pulseaudio = {
- format = "{volume}% {icon} {format_source}";
- format-bluetooth = "{volume}% {icon} {format_source}";
- format-bluetooth-muted = " {icon} {format_source}";
- format-muted = " {format_source}";
- format-source = "{volume}% ";
- format-source-muted = " ";
- format-icons = {
- headphone = "";
- default = [
- " "
- " "
- " "
- ];
- };
- on-click = "pavucontrol";
- };
-
- network = {
- format-wifi = "{essid} ({signalStrength}%) ";
- format-ethernet = "{ipaddr}/{cidr} 🔌";
- tooltip-format = "{ifname} via {gwaddr} ";
- format-linked = "{ifname} (No IP) ";
- format-disconnected = "Disconnected ⚠";
- format-alt = "{ifname}: {ipaddr}/{cidr}";
- };
-
- cpu = {
- format = "{usage}% ";
- tooltip = true;
- };
-
- memory = {
- format = "{used}/{total} GiB ({percentage}%) ";
- tooltip = false;
- };
-
- temperature = {
- critical-threshold = 80;
- format = "{temperatureC}°C {icon}";
- format-icons = [
- ""
- ""
- ""
- ];
- };
-
- battery = {
- format = "{capacity}% {icon}";
- };
-
- clock = {
- tooltip-format = "{calendar}";
- format = "{0:%H:%M} {0:%Y-%m-%d}";
- };
-
- tray = {
- spacing = 20;
- };
-
- "custom/power" = {
- format = "⏻ ";
- tooltip = false;
- menu = "on-click";
- menu-file = "$HOME/.config/waybar/power_menu.xml";
- menu-actions = {
- shutdown = "hyprshutdown --post-cmd 'shutdown -P 0'";
- reboot = "hyprshutdown --post-cmd 'reboot'";
- };
- };
- };
-
- style = ./style.css;
- };
-
- home.file = {
- waybar-custom-power = {
- target = ".config/waybar/power_menu.xml";
- source = ./power_menu.xml;
- };
- };
-}
diff --git a/modules/hyprland/hyprland.nix b/modules/hyprland/hyprland.nix
index ee2e0ac..f393e61 100644
--- a/modules/hyprland/hyprland.nix
+++ b/modules/hyprland/hyprland.nix
@@ -1,7 +1,4 @@
-{ inputs, ... }:
-let
- hyprland = inputs.hyprland;
-in
+{ den, inputs, ... }:
{
flake-file.inputs = {
hyprcursor-phinger.url = "github:jappie3/hyprcursor-phinger";
@@ -9,14 +6,20 @@ in
};
den.aspects.hyprland = {
+ includes = with den.aspects; [ hyprland.waybar ];
+
nixos = { pkgs, ... }: {
- programs.hyprland = {
- enable = true;
- package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
- portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
- xwayland.enable = true;
- withUWSM = true;
- };
+ programs.hyprland =
+ let
+ hyprland = inputs.hyprland;
+ in
+ {
+ enable = true;
+ package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
+ portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
+ xwayland.enable = true;
+ withUWSM = true;
+ };
# Use cachix
nix.settings = {
diff --git a/_old/desktop/waybar/power_menu.xml b/modules/hyprland/waybar/power_menu.xml
similarity index 100%
rename from _old/desktop/waybar/power_menu.xml
rename to modules/hyprland/waybar/power_menu.xml
diff --git a/_old/desktop/waybar/style.css b/modules/hyprland/waybar/style.css
similarity index 100%
rename from _old/desktop/waybar/style.css
rename to modules/hyprland/waybar/style.css
diff --git a/modules/hyprland/waybar/waybar.nix b/modules/hyprland/waybar/waybar.nix
new file mode 100644
index 0000000..64dbd99
--- /dev/null
+++ b/modules/hyprland/waybar/waybar.nix
@@ -0,0 +1,134 @@
+{
+ den.aspects.hyprland.waybar = {
+ homeManager = {
+ programs.waybar = {
+ enable = true;
+ systemd.enable = true;
+
+ settings.main = {
+ height = 34;
+ spacing = 10;
+
+ modules-left = [
+ "hyprland/workspaces"
+ "hyprland/submap"
+ "hyprland/window"
+ ];
+ modules-right = [
+ "keyboard-state"
+ "pulseaudio"
+ "network"
+ "cpu"
+ "memory"
+ "temperature"
+ "battery"
+ "clock"
+ "tray"
+ "custom/power"
+ ];
+
+ "hyprland/window" = {
+ rewrite = {
+ "(.*) — (Zen Browser|Mozilla Firefox)" = "🌎 $1";
+ "(.*) - Discord" = "💬 $1";
+ };
+ separate-outputs = true;
+ };
+
+ keyboard-state = {
+ numlock = true;
+ capslock = true;
+ format = {
+ capslock = "C {icon}";
+ numlock = "{icon} N";
+ };
+ format-icons = {
+ locked = " ";
+ unlocked = " ";
+ };
+ };
+
+ pulseaudio = {
+ format = "{volume}% {icon} {format_source}";
+ format-bluetooth = "{volume}% {icon} {format_source}";
+ format-bluetooth-muted = " {icon} {format_source}";
+ format-muted = " {format_source}";
+ format-source = "{volume}% ";
+ format-source-muted = " ";
+ format-icons = {
+ headphone = "";
+ default = [
+ " "
+ " "
+ " "
+ ];
+ };
+ on-click = "pavucontrol";
+ };
+
+ network = {
+ format-wifi = "{essid} ({signalStrength}%) ";
+ format-ethernet = "{ipaddr}/{cidr} 🔌";
+ tooltip-format = "{ifname} via {gwaddr} ";
+ format-linked = "{ifname} (No IP) ";
+ format-disconnected = "Disconnected ⚠";
+ format-alt = "{ifname}: {ipaddr}/{cidr}";
+ };
+
+ cpu = {
+ format = "{usage}% ";
+ tooltip = true;
+ };
+
+ memory = {
+ format = "{used}/{total} GiB ({percentage}%) ";
+ tooltip = false;
+ };
+
+ temperature = {
+ critical-threshold = 80;
+ format = "{temperatureC}°C {icon}";
+ format-icons = [
+ ""
+ ""
+ ""
+ ];
+ };
+
+ battery = {
+ format = "{capacity}% {icon}";
+ };
+
+ clock = {
+ tooltip-format = "{calendar}";
+ format = "{0:%H:%M} {0:%Y-%m-%d}";
+ };
+
+ tray = {
+ spacing = 20;
+ };
+
+ "custom/power" = {
+ format = "⏻ ";
+ tooltip = false;
+ menu = "on-click";
+ menu-file = "$HOME/.config/waybar/power_menu.xml";
+ menu-actions = {
+ shutdown = "hyprshutdown --post-cmd 'shutdown -P 0'";
+ reboot = "hyprshutdown --post-cmd 'reboot'";
+ };
+ };
+ };
+
+ style = ./style.css;
+ };
+
+ home.file = {
+ waybar-custom-power = {
+ target = ".config/waybar/power_menu.xml";
+ source = ./power_menu.xml;
+ };
+ };
+ };
+ };
+}