From 849b0f0cfd5498d0d38be1d3e19c80a9b0b25bea Mon Sep 17 00:00:00 2001 From: kptltd00m Date: Sun, 28 Jun 2026 12:48:00 +0200 Subject: [PATCH 1/3] Replace caelestia shell with Waybar and Walker Remove caelestia-shell/cli inputs and prune corresponding flake.lock entries. Update Hyprland keybindings to use walker, grimblast and Waybar, use loginctl for locking and pkill/waybar for restart. Add new home/system modules for waybar and walker and enable them in host configs. Delete obsolete INSTALL-laptop.md. --- INSTALL-laptop.md | 223 ------------------------------ flake.lock | 137 ------------------ flake.nix | 9 +- home/system/hyprland/bindings.nix | 63 ++++----- home/system/walker/default.nix | 9 ++ home/system/waybar/default.nix | 128 +++++++++++++++++ hosts/home-pc/home.nix | 3 +- hosts/laptop/home.nix | 3 +- hosts/work/home.nix | 3 +- 9 files changed, 169 insertions(+), 409 deletions(-) delete mode 100644 INSTALL-laptop.md create mode 100644 home/system/walker/default.nix create mode 100644 home/system/waybar/default.nix diff --git a/INSTALL-laptop.md b/INSTALL-laptop.md deleted file mode 100644 index c6dba84..0000000 --- a/INSTALL-laptop.md +++ /dev/null @@ -1,223 +0,0 @@ -# ThinkPad NixOS Installation Guide - -This guide provides step-by-step instructions for installing the NixOS configuration on your ThinkPad laptop. - -## Prerequisites - -- **ThinkPad laptop** (tested models: T480, T490, X1 Carbon) -- **USB flash drive** (8GB+ recommended) -- **Backup your data** - this will erase everything on the target device -- **NixOS ISO** - Download from [nixos.org](https://nixos.org/download.html) -- **Internet connection** (wired recommended for initial setup) - -## Preparation - -### 1. Create NixOS Installation Media - -```bash -# On another Linux machine or macOS: -sudo dd if=nixos-minimal-*.iso of=/dev/sdX bs=4M status=progress oflag=sync -# Replace /dev/sdX with your USB device (e.g., /dev/sdb) -# WARNING: This will erase the target device completely -``` - -### 2. Boot from USB - -1. Insert USB drive into ThinkPad -2. Power on and press **F12** to enter boot menu -3. Select the USB drive -4. At GRUB menu, select "NixOS" - -## Installation Steps - -### 3. Prepare Disks - -```bash -# Identify your disk (likely /dev/nvme0n1 for NVMe SSDs) -lsblk - -# Partition the disk (adjust for your needs) -sudo gdisk /dev/nvme0n1 -# Use: o (create new GPT), n (new partition), accept defaults for EFI (512M), then Linux filesystem (rest) -# Set type for EFI to EF00, Linux filesystem to 8300 -# Write changes with w -``` - -### 4. Format Partitions - -```bash -# Format EFI partition -sudo mkfs.fat -F32 /dev/nvme0n1p1 - -# Format root partition -sudo mkfs.ext4 /dev/nvme0n1p2 - -# Mount partitions -sudo mount /dev/nvme0n1p2 /mnt -sudo mkdir -p /mnt/boot/efi -sudo mount /dev/nvme0n1p1 /mnt/boot/efi -``` - -### 5. Generate NixOS Configuration - -```bash -# Generate initial configuration -sudo nixos-generate-config --root /mnt - -# This creates /mnt/etc/nixos/configuration.nix and hardware-configuration.nix -``` - -### 6. Clone Your Nixy Configuration - -```bash -# Clone your nixy repository -sudo nix-shell -p git -git clone https://gitea.doomlabs.de/KptltD00M/nixy.git /mnt/etc/nixos/nixy -cd /mnt/etc/nixos/nixy - -# Copy hardware configuration -sudo cp /mnt/etc/nixos/hardware-configuration.nix hosts/laptop/hardware-configuration.nix -``` - -### 7. Install NixOS - -```bash -# Switch to your laptop configuration -sudo nixos-install --flake /mnt/etc/nixos/nixy#laptop - -# When prompted, set a root password -``` - -### 8. Post-Installation - -```bash -# After reboot, log in as root -# Clone your configuration to your user -git clone https://gitea.doomlabs.de/KptltD00M/nixy.git ~/nixy -cd ~/nixy - -# Switch to your user configuration -nix run nixpkgs#home-manager -- switch --flake .#andi@laptop - -# Reboot -reboot -``` - -## ThinkPad-Specific Configuration - -### 1. Trackpad Configuration - -The configuration includes touchpad settings optimized for ThinkPad hardware. If you need to adjust: - -```nix -# Edit hosts/laptop/home.nix -programs.hyprland = { - touchpad = { - naturalScroll = true; - tap-to-click = true; - disableWhileTyping = false; - }; -}; -``` - -### 2. Keyboard Backlight - -```bash -# Enable keyboard backlight control -sudo nix-env -iA nixos.hid-tools -sudo systemctl enable --now thinkpad-keyboard-backlight.service -``` - -### 3. Power Management - -```bash -# Install TLP for better power management -sudo nix-env -iA nixos.tlp -sudo systemctl enable --now tlp -``` - -## Troubleshooting - -### Common Issues - -**1. WiFi not working:** -```bash -# Install firmware for your WiFi card -sudo nix-env -iA nixos.firmware -``` - -**2. Suspend/resume issues:** -```bash -# Edit hardware-configuration.nix -boot.kernelPackages = pkgs.linuxPackages_latest; -``` - -**3. Screen tearing:** -```bash -# Enable TearFree in hosts/laptop/configuration.nix -services.xserver.videoDrivers = [ "modesetting" ]; -``` - -### Debugging Commands - -```bash -# Check hardware detection -sudo dmesg | grep -i thinkpad - -# Check battery status -upower -i /org/freedesktop/UPower/devices/battery_BAT0 - -# Check display configuration -hyprctl monitors -``` - -## Maintenance - -### Updating Your System - -```bash -# Update flake inputs -nix flake update - -# Rebuild system -sudo nixos-rebuild switch --flake ~/nixy#laptop - -# Rebuild home configuration -nix run nixpkgs#home-manager -- switch --flake ~/nixy#andi@laptop -``` - -### Backup Configuration - -```bash -# Backup your hardware configuration -cp /etc/nixos/hardware-configuration.nix ~/nixy/hosts/laptop/ - -# Commit changes -cd ~/nixy -git add . -git commit -m "Update hardware config for ThinkPad" -git push -``` - -## Additional Resources - -- [NixOS Manual](https://nixos.org/manual/nixos/stable/) -- [ThinkPad Wiki](https://www.thinkwiki.org/) -- [NixOS Discourse](https://discourse.nixos.org/) - -## Notes - -- **ThinkPad T480/X1 Carbon specific:** These models have excellent Linux support. The configuration includes: - - Trackpoint acceleration settings - - Keyboard backlight control - - Power management profiles - - Display brightness controls - - Suspend/resume fixes - -- **Encryption:** If you enabled encryption during install, use: - ```bash - sudo cryptsetup luksOpen /dev/nvme0n1p2 cryptroot - sudo mount /dev/mapper/cryptroot /mnt - ``` - -- **Multi-boot:** If dual-booting with Windows, ensure Secure Boot is disabled in BIOS. diff --git a/flake.lock b/flake.lock index ba5fdc0..1587984 100644 --- a/flake.lock +++ b/flake.lock @@ -213,98 +213,6 @@ "type": "github" } }, - "caelestia-cli": { - "inputs": { - "caelestia-shell": "caelestia-shell", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1780375472, - "narHash": "sha256-Q8RAJoYlakA6B2I5DVcuxzNbhCNU1nnIjqQZYP1KGrM=", - "owner": "caelestia-dots", - "repo": "cli", - "rev": "d1c8c8fc09738d1b40576e97c274b4a11a2e0ac7", - "type": "github" - }, - "original": { - "owner": "caelestia-dots", - "repo": "cli", - "type": "github" - } - }, - "caelestia-cli_2": { - "inputs": { - "caelestia-shell": [ - "caelestia-shell" - ], - "nixpkgs": [ - "caelestia-shell", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1779768519, - "narHash": "sha256-2n/447oNfAZrl1yncafLPgXMx5tuTF6T2B+zI/zFYkI=", - "owner": "caelestia-dots", - "repo": "cli", - "rev": "64a5507e74f6c7d0c29f9131964412f8f8c4dd89", - "type": "github" - }, - "original": { - "owner": "caelestia-dots", - "repo": "cli", - "type": "github" - } - }, - "caelestia-shell": { - "inputs": { - "caelestia-cli": [ - "caelestia-cli" - ], - "nixpkgs": [ - "caelestia-cli", - "nixpkgs" - ], - "quickshell": "quickshell" - }, - "locked": { - "lastModified": 1780196414, - "narHash": "sha256-iXmyWULTZuRd68xRL79e9GyYL9FZ6gfh6zl1PPlWX2A=", - "owner": "caelestia-dots", - "repo": "shell", - "rev": "63bb82762bb29ac9b7fcd5b97839abae721ce860", - "type": "github" - }, - "original": { - "owner": "caelestia-dots", - "repo": "shell", - "type": "github" - } - }, - "caelestia-shell_2": { - "inputs": { - "caelestia-cli": "caelestia-cli_2", - "nixpkgs": [ - "nixpkgs" - ], - "quickshell": "quickshell_2" - }, - "locked": { - "lastModified": 1780196414, - "narHash": "sha256-iXmyWULTZuRd68xRL79e9GyYL9FZ6gfh6zl1PPlWX2A=", - "owner": "caelestia-dots", - "repo": "shell", - "rev": "63bb82762bb29ac9b7fcd5b97839abae721ce860", - "type": "github" - }, - "original": { - "owner": "caelestia-dots", - "repo": "shell", - "type": "github" - } - }, "crane": { "locked": { "lastModified": 1779130139, @@ -1660,55 +1568,10 @@ "type": "github" } }, - "quickshell": { - "inputs": { - "nixpkgs": [ - "caelestia-cli", - "caelestia-shell", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1779430452, - "narHash": "sha256-zTslhsxLqUlRTML506iougTGzyR38Fzhzn7t4KDEuuE=", - "ref": "refs/heads/master", - "rev": "4b4fca3224ab977dc515ac0bb78d00b3dfa71e00", - "revCount": 819, - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - }, - "original": { - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - } - }, - "quickshell_2": { - "inputs": { - "nixpkgs": [ - "caelestia-shell", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1779430452, - "narHash": "sha256-zTslhsxLqUlRTML506iougTGzyR38Fzhzn7t4KDEuuE=", - "ref": "refs/heads/master", - "rev": "4b4fca3224ab977dc515ac0bb78d00b3dfa71e00", - "revCount": 819, - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - }, - "original": { - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - } - }, "root": { "inputs": { "awesome-wallpapers": "awesome-wallpapers", "blog": "blog", - "caelestia-cli": "caelestia-cli", - "caelestia-shell": "caelestia-shell_2", "default-creds": "default-creds", "helium-browser": "helium-browser", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 5041027..f694390 100644 --- a/flake.nix +++ b/flake.nix @@ -28,14 +28,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - caelestia-shell = { - url = "github:caelestia-dots/shell"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - caelestia-cli = { - url = "github:caelestia-dots/cli"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + # Server nixarr.url = "github:rasmus-kirk/nixarr"; diff --git a/home/system/hyprland/bindings.nix b/home/system/hyprland/bindings.nix index 526c782..ccab2a2 100644 --- a/home/system/hyprland/bindings.nix +++ b/home/system/hyprland/bindings.nix @@ -91,14 +91,13 @@ in { "$mod,B, exec, uwsm app -- ${config.programs.librewolf.package}/bin/helium" # Browser # Power - "$mod, X, global, caelestia:session" # Powermenu ( - "$shiftMod, X, exec, " + "$mod, X, exec, " + lib.getExe (mkMenu [ { key = "l"; desc = "Lock"; - cmd = "hyprctl dispatch global caelestia:lock"; + cmd = "loginctl lock-session"; } { key = "s"; @@ -122,8 +121,8 @@ in { } { key = "c"; - desc = "Restart caelestia"; - cmd = "hyprctl dispatch exec 'caelestia-shell kill | sleep 1 | caelestia-shell'"; + desc = "Restart Waybar"; + cmd = "pkill -x waybar; waybar"; } ]) ) @@ -131,10 +130,9 @@ in { # Quick launch "$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal) "$mod,E, exec, uwsm app -- ${pkgs.thunar}/bin/thunar" # Thunar - "$shiftMod, E, exec, pkill fuzzel || caelestia emoji -p" # Emoji picker - "$mod, SPACE, global, caelestia:launcher" # Launcher - "$mod, N, exec, caelestia shell drawers toggle sidebar" # Sidebar (Notifications, quick actions) - "$mod, D, exec, caelestia shell drawers toggle dashboard" # Dashboard + "$mod, SPACE, exec, walker" # Launcher + "$mod, N, exec, ${lib.getExe pkgs.grimblast} save area" # Save screenshot + "$mod, D, exec, ${lib.getExe pkgs.grimblast} copy area" # Copy screenshot # Windows "$mod,Q, killactive," # Close window @@ -152,10 +150,9 @@ in { "$shiftMod,L, focusmonitor, 1" # Focus next monitor # Utilities - "$shiftMod, SPACE, exec, caelestia shell gameMode toggle" # Toggle Focus/Game mode - "$shiftMod, S, global, caelestia:screenshotFreeze" # Capture region (freeze) - ", Print, global, caelestia:screenshotFreeze" # Capture region (freeze) - "$shiftMod+Alt, S, global, caelestia:screenshot" # Capture region + "$shiftMod, S, exec, ${lib.getExe pkgs.grimblast} copy area" # Capture region + ", Print, exec, ${lib.getExe pkgs.grimblast} copy area" # Capture region + "$shiftMod+Alt, S, exec, ${lib.getExe pkgs.grimblast} save area" # Capture region ] ++ (builtins.concatLists ( builtins.genList ( @@ -175,33 +172,23 @@ in { ]; bindl = [ - # Brightness - ", XF86MonBrightnessUp, global, caelestia:brightnessUp" - ", XF86MonBrightnessDown, global, caelestia:brightnessDown" + # Brightness + ", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set 5%+" + ", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%-" - # Media - ", XF86AudioPlay, global, caelestia:mediaToggle" - ", XF86AudioPause, global, caelestia:mediaToggle" - ", XF86AudioNext, global, caelestia:mediaNext" - ", XF86AudioPrev, global, caelestia:mediaPrev" - ", XF86AudioStop, global, caelestia:mediaStop" + # Media + ", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause" + ", XF86AudioPause, exec, ${lib.getExe pkgs.playerctl} play-pause" + ", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next" + ", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous" + ", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop" + + # Sound + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ]; - # Sound - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ]; - bindin = [ - # Launcher - "$mod, mouse:272, global, caelestia:launcherInterrupt" - "$mod, mouse:273, global, caelestia:launcherInterrupt" - "$mod, mouse:274, global, caelestia:launcherInterrupt" - "$mod, mouse:275, global, caelestia:launcherInterrupt" - "$mod, mouse:276, global, caelestia:launcherInterrupt" - "$mod, mouse:277, global, caelestia:launcherInterrupt" - "$mod, mouse_up, global, caelestia:launcherInterrupt" - "$mod, mouse_down, global, caelestia:launcherInterrupt" - ]; }; } diff --git a/home/system/walker/default.nix b/home/system/walker/default.nix new file mode 100644 index 0000000..9da806d --- /dev/null +++ b/home/system/walker/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + walker + ]; + + wayland.windowManager.hyprland.settings.exec-once = [ + "walker --gapplication-service" + ]; +} diff --git a/home/system/waybar/default.nix b/home/system/waybar/default.nix new file mode 100644 index 0000000..35ac402 --- /dev/null +++ b/home/system/waybar/default.nix @@ -0,0 +1,128 @@ +{pkgs, config, ...}: let + colors = config.lib.stylix.colors; +in { + home.packages = with pkgs; [ + waybar + ]; + + xdg.configFile."waybar/config".text = builtins.toJSON { + layer = "top"; + position = "top"; + height = 34; + spacing = 8; + margin-top = 8; + margin-left = 8; + margin-right = 8; + "modules-left" = [ + "hyprland/workspaces" + ]; + "modules-center" = [ + "hyprland/window" + ]; + "modules-right" = [ + "tray" + "network" + "pulseaudio" + "clock" + ]; + + "hyprland/workspaces" = { + format = "{name}"; + "disable-scroll" = true; + "all-outputs" = true; + "on-click" = "activate"; + }; + + "hyprland/window" = { + format = "{}"; + "max-length" = 80; + "separate-outputs" = true; + }; + + tray = { + "icon-size" = 18; + spacing = 10; + }; + + network = { + format-wifi = "󰖩 {signalStrength}%"; + format-ethernet = "󰈀 {ifname}"; + format-linked = "󰈀 {ifname}"; + format-disconnected = "󰖪 Disconnected"; + tooltip-format = "{ifname} via {gwaddr}"; + }; + + pulseaudio = { + format = "󰕾 {volume}%"; + format-muted = "󰖁 Muted"; + tooltip = true; + }; + + clock = { + format = " {:%H:%M}"; + tooltip-format = "{:%A, %B %d, %Y}"; + }; + }; + + xdg.configFile."waybar/style.css".text = '' + * { + border: none; + border-radius: 0; + min-height: 0; + font-family: "${config.stylix.fonts.sansSerif.name}", "${config.stylix.fonts.monospace.name}", sans-serif; + font-size: 13px; + } + + window#waybar { + background: #${colors.base00}E6; + color: #${colors.base05}; + } + + #waybar { + background: transparent; + } + + #workspaces, + #window, + #tray, + #network, + #pulseaudio, + #clock { + margin: 8px 0; + padding: 0 12px; + border-radius: ${toString config.theme.bar-rounding}px; + background: #${colors.base01}E6; + border: 1px solid #${colors.base02}; + } + + #workspaces button { + padding: 0 10px; + margin: 0 2px; + border-radius: ${toString config.theme.bar-rounding}px; + color: #${colors.base05}; + background: transparent; + } + + #workspaces button.active { + background: #${colors.base0D}; + color: #${colors.base00}; + } + + #workspaces button:hover { + background: #${colors.base02}; + } + + #window { + min-width: 180px; + } + + #network.disconnected, + #pulseaudio.muted { + color: #${colors.base08}; + } + ''; + + wayland.windowManager.hyprland.settings.exec-once = [ + "waybar" + ]; +} diff --git a/hosts/home-pc/home.nix b/hosts/home-pc/home.nix index 24621cc..0910d70 100644 --- a/hosts/home-pc/home.nix +++ b/hosts/home-pc/home.nix @@ -33,7 +33,8 @@ # System # ───────────────────────────────────────────────────────────── ../../home/system/hyprland - ../../home/system/caelestia-shell + ../../home/system/waybar + ../../home/system/walker ../../home/system/hyprpaper ../../home/system/mime ../../home/system/udiskie diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index c2c4860..c17e10e 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -31,7 +31,8 @@ # System # ───────────────────────────────────────────────────────────── ../../home/system/hyprland - ../../home/system/caelestia-shell + ../../home/system/waybar + ../../home/system/walker ../../home/system/hyprpaper ../../home/system/mime ../../home/system/udiskie diff --git a/hosts/work/home.nix b/hosts/work/home.nix index a64d1a9..3f7887d 100644 --- a/hosts/work/home.nix +++ b/hosts/work/home.nix @@ -22,7 +22,8 @@ # System (Desktop environment like stuff) ../../home/system/hyprland - ../../home/system/caelestia-shell + ../../home/system/waybar + ../../home/system/walker ../../home/system/hyprpaper ../../home/system/mime ../../home/system/udiskie From beda75270300e97eb6279787502ef8aad9a35ae2 Mon Sep 17 00:00:00 2001 From: kptltd00m Date: Sun, 28 Jun 2026 13:58:14 +0200 Subject: [PATCH 2/3] Polish Waybar and add Bluetooth and walker service Refactor Waybar config and CSS: add rgb/radius helpers and tweak sizes, spacing, colors, tooltips, icons and transitions Enable gtk-layer-shell and reload-on-change. Move exec-once into settings and adjust modules and workspaces formatting Add blueman and bluez to basic apps for Bluetooth support Add elephant to home packages and add a systemd user service for walker; change Hyprland exec-once to enable and start elephant.service --- docs/CONTRIBUTING.md | 32 ++--- home/programs/group/basic-apps.nix | 3 + home/system/walker/default.nix | 26 ++++- home/system/waybar/default.nix | 181 ++++++++++++++++++++++------- 4 files changed, 183 insertions(+), 59 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 7cf1fd7..ce0b532 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,16 +1,16 @@ -# Contributing to Nixy - -Everybody is invited and welcome to contribute to Nixy. There is a lot to do... Check the issues! - -The process is straight-forward. - -- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0 and 1) -- Fork Nixy [git repository](https://github.com/anotherhadi/nixy). -- Write your changes (new theme, bug fixes, issues fix, ...). -- Create a Pull Request against the main branch of Nixy. - -> [!TIP] -> To update the README, change the `./.github/assets/README_template.md` - -> [!IMPORTANT] -> Don't push your host's folder +# Contributing to Nixy + +Everybody is invited and welcome to contribute to Nixy. There is a lot to do... Check the issues! + +The process is straight-forward. + +- Read [How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) by Kubernetes (but skip step 0 and 1) +- Fork Nixy [git repository](https://github.com/anotherhadi/nixy). +- Write your changes (new theme, bug fixes, issues fix, ...). +- Create a Pull Request against the main branch of Nixy. + +> [!TIP] +> To update the README, change the `./.github/assets/README_template.md` + +> [!IMPORTANT] +> Don't push your host's folder diff --git a/home/programs/group/basic-apps.nix b/home/programs/group/basic-apps.nix index b1e9dc0..fc65068 100644 --- a/home/programs/group/basic-apps.nix +++ b/home/programs/group/basic-apps.nix @@ -26,6 +26,9 @@ pkgs.wifitui # TUI for managing wifi pkgs-nur-hadi.usbguard-tui # TUI for managing USBGuard rules + blueman # Bluetooth manager (blueman-manager, blueman-adapters, blueman-sendto) + bluez # Bluetooth stack tools (bluetoothctl) + # I love CLIs httpie # Command-line HTTP client, a user-friendly cURL replacement diff --git a/home/system/walker/default.nix b/home/system/walker/default.nix index 9da806d..3d1060c 100644 --- a/home/system/walker/default.nix +++ b/home/system/walker/default.nix @@ -1,9 +1,29 @@ -{pkgs, ...}: { +{ pkgs, ... }: + +{ home.packages = with pkgs; [ walker + elephant ]; + systemd.user.services.walker = { + Unit = { + Description = "Walker application service"; + After = [ "graphical-session.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.walker}/bin/walker --gapplication-service"; + Restart = "on-failure"; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + wayland.windowManager.hyprland.settings.exec-once = [ - "walker --gapplication-service" + "sh -lc 'elephant service enable && systemctl --user start elephant.service'" ]; -} +} \ No newline at end of file diff --git a/home/system/waybar/default.nix b/home/system/waybar/default.nix index 35ac402..83aa5b7 100644 --- a/home/system/waybar/default.nix +++ b/home/system/waybar/default.nix @@ -1,6 +1,14 @@ -{pkgs, config, ...}: let +{ pkgs, config, ... }: + +let colors = config.lib.stylix.colors; -in { + + rgb = base: + "${colors."${base}-rgb-r"}, ${colors."${base}-rgb-g"}, ${colors."${base}-rgb-b"}"; + + radius = toString config.theme.bar-rounding; +in +{ home.packages = with pkgs; [ waybar ]; @@ -8,17 +16,25 @@ in { xdg.configFile."waybar/config".text = builtins.toJSON { layer = "top"; position = "top"; - height = 34; - spacing = 8; - margin-top = 8; - margin-left = 8; - margin-right = 8; + height = 38; + + spacing = 10; + + "margin-top" = 8; + "margin-left" = 8; + "margin-right" = 8; + + "gtk-layer-shell" = true; + "reload_style_on_change" = true; + "modules-left" = [ "hyprland/workspaces" ]; + "modules-center" = [ "hyprland/window" ]; + "modules-right" = [ "tray" "network" @@ -31,55 +47,73 @@ in { "disable-scroll" = true; "all-outputs" = true; "on-click" = "activate"; + + "persistent-workspaces" = { + "*" = 5; + }; }; "hyprland/window" = { format = "{}"; - "max-length" = 80; + "max-length" = 70; "separate-outputs" = true; }; tray = { - "icon-size" = 18; - spacing = 10; + spacing = 8; + "icon-size" = 20; }; network = { - format-wifi = "󰖩 {signalStrength}%"; - format-ethernet = "󰈀 {ifname}"; - format-linked = "󰈀 {ifname}"; - format-disconnected = "󰖪 Disconnected"; - tooltip-format = "{ifname} via {gwaddr}"; + interval = 2; + + "format-wifi" = "󰖩 {signalStrength}%"; + "format-ethernet" = "󰈀 {ifname}"; + "format-linked" = "󰈀 {ifname}"; + "format-disconnected" = "󰖪"; + + "tooltip-format" = "{essid}\n{ipaddr}"; }; pulseaudio = { + "scroll-step" = 5; + format = "󰕾 {volume}%"; - format-muted = "󰖁 Muted"; + "format-muted" = "󰖁"; + tooltip = true; }; clock = { - format = " {:%H:%M}"; - tooltip-format = "{:%A, %B %d, %Y}"; + interval = 1; + + format = "󰥔 {:%H:%M}"; + "tooltip-format" = "{:%A, %d %B %Y}"; }; }; xdg.configFile."waybar/style.css".text = '' * { border: none; - border-radius: 0; min-height: 0; - font-family: "${config.stylix.fonts.sansSerif.name}", "${config.stylix.fonts.monospace.name}", sans-serif; + + font-family: + "${config.stylix.fonts.sansSerif.name}", + "${config.stylix.fonts.monospace.name}", + sans-serif; + font-size: 13px; } window#waybar { - background: #${colors.base00}E6; + background: transparent; color: #${colors.base05}; } - #waybar { - background: transparent; + .modules-left, + .modules-center, + .modules-right { + margin: 6px 0; } #workspaces, @@ -88,19 +122,40 @@ in { #network, #pulseaudio, #clock { - margin: 8px 0; - padding: 0 12px; - border-radius: ${toString config.theme.bar-rounding}px; - background: #${colors.base01}E6; - border: 1px solid #${colors.base02}; + background: rgba(${rgb "base01"}, 0.82); + + border: 1px solid rgba(${rgb "base03"}, 0.45); + + border-radius: ${radius}px; + + padding: 0 14px; + margin: 6px 4px; + + transition: + background-color 180ms ease, + border-color 180ms ease, + color 180ms ease; + } + + #workspaces { + padding: 4px; } #workspaces button { - padding: 0 10px; - margin: 0 2px; - border-radius: ${toString config.theme.bar-rounding}px; - color: #${colors.base05}; background: transparent; + color: #${colors.base04}; + + padding: 0 12px; + margin: 0 2px; + + border-radius: ${radius}px; + + transition: all 180ms ease; + } + + #workspaces button:hover { + background: rgba(${rgb "base02"}, 0.70); + color: #${colors.base05}; } #workspaces button.active { @@ -108,21 +163,67 @@ in { color: #${colors.base00}; } - #workspaces button:hover { - background: #${colors.base02}; + #workspaces button.urgent { + background: #${colors.base08}; + color: #${colors.base00}; } #window { - min-width: 180px; + min-width: 260px; + + padding-left: 18px; + padding-right: 18px; + + color: #${colors.base05}; + } + + #window.empty { + background: transparent; + border: none; + } + + #tray { + padding-left: 10px; + padding-right: 10px; + } + + #network { + color: #${colors.base0C}; + } + + #network.disconnected { + color: #${colors.base08}; + } + + #pulseaudio { + color: #${colors.base0B}; } - #network.disconnected, #pulseaudio.muted { color: #${colors.base08}; } + + #clock { + color: #${colors.base0D}; + font-weight: 600; + } + + tooltip { + background: rgba(${rgb "base00"}, 0.95); + + border: 1px solid rgba(${rgb "base03"}, 0.70); + + border-radius: ${radius}px; + } + + tooltip label { + color: #${colors.base05}; + } ''; - wayland.windowManager.hyprland.settings.exec-once = [ - "waybar" - ]; -} + wayland.windowManager.hyprland.settings = { + exec-once = [ + "waybar" + ]; + }; +} \ No newline at end of file From 1bb36771dd4b1ceb82bc7769f39416db5710361a Mon Sep 17 00:00:00 2001 From: kptltd00m Date: Sun, 28 Jun 2026 14:42:33 +0200 Subject: [PATCH 3/3] chore(home): add elephant service and improve waybar configuration - Add elephant backend service with systemd user service - Update walker service to depend on elephant service - Improve waybar configuration with new modules (tray, bluetooth, battery) - Add click handlers for network, pulseaudio, and bluetooth - Update colors and styling for better visibility - Include gaming-apps in laptop home configuration --- home/system/walker/default.nix | 27 +++++++++++---- home/system/waybar/default.nix | 60 ++++++++++++++++++++++++++++++---- hosts/laptop/home.nix | 1 + 3 files changed, 75 insertions(+), 13 deletions(-) diff --git a/home/system/walker/default.nix b/home/system/walker/default.nix index 3d1060c..78284ef 100644 --- a/home/system/walker/default.nix +++ b/home/system/walker/default.nix @@ -6,24 +6,37 @@ elephant ]; + systemd.user.services.elephant = { + Unit = { + Description = "Elephant backend service"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.elephant}/bin/elephant"; + Restart = "on-failure"; + RestartSec = 5; + }; + }; + systemd.user.services.walker = { Unit = { Description = "Walker application service"; - After = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ]; + After = [ "elephant.service" "graphical-session.target" ]; + Requires = [ "elephant.service" ]; }; Service = { ExecStart = "${pkgs.walker}/bin/walker --gapplication-service"; Restart = "on-failure"; - }; - - Install = { - WantedBy = [ "graphical-session.target" ]; + RestartSec = 5; }; }; wayland.windowManager.hyprland.settings.exec-once = [ - "sh -lc 'elephant service enable && systemctl --user start elephant.service'" + "dbus-update-activation-environment --systemd --all" + "systemctl --user start elephant.service walker.service" ]; -} \ No newline at end of file +} diff --git a/home/system/waybar/default.nix b/home/system/waybar/default.nix index 83aa5b7..f168144 100644 --- a/home/system/waybar/default.nix +++ b/home/system/waybar/default.nix @@ -1,10 +1,10 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: let colors = config.lib.stylix.colors; - rgb = base: "${colors."${base}-rgb-r"}, ${colors."${base}-rgb-g"}, ${colors."${base}-rgb-b"}"; + terminal = cmd: "uwsm app -- ${lib.getExe pkgs.ghostty} -e ${cmd}"; radius = toString config.theme.bar-rounding; in @@ -29,6 +29,7 @@ in "modules-left" = [ "hyprland/workspaces" + "tray" ]; "modules-center" = [ @@ -36,8 +37,9 @@ in ]; "modules-right" = [ - "tray" + "custom/bluetooth" "network" + "battery" "pulseaudio" "clock" ]; @@ -73,6 +75,28 @@ in "format-disconnected" = "󰖪"; "tooltip-format" = "{essid}\n{ipaddr}"; + "on-click" = terminal "wifitui"; + }; + + battery = { + interval = 30; + states = { + warning = 30; + critical = 15; + }; + + format = "󰁹 {capacity}%"; + "format-charging" = "󰂄 {capacity}%"; + "format-plugged" = "󰂄 {capacity}%"; + "format-full" = "󰁹 {capacity}%"; + "tooltip-format" = "Battery {capacity}%\n{timeTo} remaining"; + }; + + "custom/bluetooth" = { + exec = "echo 󰂯"; + interval = 3600; + tooltip = false; + "on-click" = "uwsm app -- blueman-manager"; }; pulseaudio = { @@ -82,6 +106,7 @@ in "format-muted" = "󰖁"; tooltip = true; + "on-click" = terminal "wiremix"; }; clock = { @@ -119,10 +144,12 @@ in #workspaces, #window, #tray, + #custom-bluetooth, #network, + #battery, #pulseaudio, #clock { - background: rgba(${rgb "base01"}, 0.82); + background: rgba(${rgb "base01"}, 0.76); border: 1px solid rgba(${rgb "base03"}, 0.45); @@ -187,6 +214,10 @@ in padding-right: 10px; } + #custom-bluetooth { + color: #${colors.base0E}; + } + #network { color: #${colors.base0C}; } @@ -195,6 +226,23 @@ in color: #${colors.base08}; } + #battery { + color: #${colors.base0A}; + } + + #battery.charging, + #battery.plugged { + color: #${colors.base0B}; + } + + #battery.warning { + color: #${colors.base0A}; + } + + #battery.critical { + color: #${colors.base08}; + } + #pulseaudio { color: #${colors.base0B}; } @@ -209,7 +257,7 @@ in } tooltip { - background: rgba(${rgb "base00"}, 0.95); + background: rgba(${rgb "base00"}, 0.90); border: 1px solid rgba(${rgb "base03"}, 0.70); @@ -226,4 +274,4 @@ in "waybar" ]; }; -} \ No newline at end of file +} diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index c17e10e..32d3403 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -26,6 +26,7 @@ ../../home/programs/group/basic-apps.nix ../../home/programs/group/dev.nix ../../home/programs/group/misc.nix + ../../home/programs/group/gaming-apps.nix # ───────────────────────────────────────────────────────────── # System