From ff968d4a87609461ec9d08f965b33d6aa0ed1190 Mon Sep 17 00:00:00 2001 From: Odweta Date: Sun, 11 Jan 2026 18:52:00 +0100 Subject: [PATCH] waybar integration --- configuration.nix | 1 - home.nix | 1 + hyprland-system.nix | 4 +--- hyprland.nix | 5 ++++- waybar.nix | 27 +++++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 waybar.nix diff --git a/configuration.nix b/configuration.nix index e0ded75..ae34248 100644 --- a/configuration.nix +++ b/configuration.nix @@ -67,6 +67,5 @@ services.openssh.enable = true; system.stateVersion = "25.11"; - } diff --git a/home.nix b/home.nix index db5241d..278c6d0 100644 --- a/home.nix +++ b/home.nix @@ -12,6 +12,7 @@ ./hyprland.nix ./kitty.nix ./vim.nix + ./waybar.nix ./xdg.nix ]; } diff --git a/hyprland-system.nix b/hyprland-system.nix index 3cceabe..8f2145e 100644 --- a/hyprland-system.nix +++ b/hyprland-system.nix @@ -2,9 +2,7 @@ { # program enable - programs.hyprland = { - enable = true; - }; + programs.hyprland.enable = true; # xdg portal for hyprland xdg.portal = { diff --git a/hyprland.nix b/hyprland.nix index 75fa181..e270b25 100644 --- a/hyprland.nix +++ b/hyprland.nix @@ -7,7 +7,6 @@ home.packages = with pkgs; [ hypridle hyprlock - waybar wofi ]; @@ -23,6 +22,10 @@ enable = true; settings = { + exec-once = [ + "waybar" + ]; + monitor = [ "HDMI-A-2, 1920x1080@60, 0x0, 1" "eDP-1, 1920x1080@60, 0x1080, 1" diff --git a/waybar.nix b/waybar.nix new file mode 100644 index 0000000..4448c65 --- /dev/null +++ b/waybar.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: + +{ + programs.waybar = { + enable = true; + + settings = [{ + layer = "top"; + position = "top"; + + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "clock" ]; + modules-right = [ "pulseaudio" "battery" "tray" ]; + + clock = { + format = "{:%Y-%m-%d %H:%M}"; + }; + }]; + + style = '' + * { + font-family: Hurmit Nerd Font Mono; + font-size: 16px; + } + ''; + }; +}