From 9e01d35ce4326e883587133638f5399c12f522be Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Wed, 11 Mar 2026 16:02:26 +0100 Subject: [PATCH] working on eww --- Droidnix/README.html | 723 ++++++++++-------- Droidnix/README.org | 48 ++ Droidnix/assets/system/conf/eww/eww.yuck | 90 +++ .../assets/system/conf/eww/styles/main.css | 130 ++++ Droidnix/assets/system/conf/waybar/config | 113 +++ Droidnix/assets/system/conf/waybar/style.css | 225 ++++++ Droidnix/generated/system/core/eww.nix | 36 + Droidnix/generated/system/core/top.nix | 2 + Droidnix/generated/system/core/waybar.nix | 1 + 9 files changed, 1038 insertions(+), 330 deletions(-) create mode 100644 Droidnix/assets/system/conf/eww/eww.yuck create mode 100644 Droidnix/assets/system/conf/eww/styles/main.css create mode 100644 Droidnix/assets/system/conf/waybar/config create mode 100644 Droidnix/assets/system/conf/waybar/style.css create mode 100644 Droidnix/generated/system/core/eww.nix create mode 100644 Droidnix/generated/system/core/waybar.nix diff --git a/Droidnix/README.html b/Droidnix/README.html index 376ecd210..c616bfa4e 100644 --- a/Droidnix/README.html +++ b/Droidnix/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Droidnix: A Dendritic NixOS + Home Manager Configuration NixOS Configuration Structure @@ -204,120 +204,122 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -333,26 +335,26 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. It allows users to choose between Hyprland and Mangowc as their window manager, with shared and WM-specific configurations managed via Emacs Org and Nix Flakes. The project is designed for reproducibility, maintainability, and cross-machine compatibility.

-
-

Installed components:

-
+
+

Installed components:

+
    -
  • Core
  • -
  • Hyprland
  • -
  • Mangowc
  • +
  • Core
  • +
  • Hyprland
  • +
  • Mangowc
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

This project uses a modular NixOS configuration with Hyprland and MangoWC support, designed for literate programming and cross-device reusability. The Droidnix repository is organized into two main parts: @@ -365,9 +367,9 @@ The Droidnix repository is organized into two main parts:

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -379,23 +381,23 @@ The Droidnix repository is organized into two main parts:
-
-

Generated Structure

-
+
+

Generated Structure

+

The generated/ directory contains all generated configurations, divided into three main groups: system, hyprland, and mangowc.

-
-

System (generated/system/)

-
+
+

System (generated/system/)

+

This directory contains system-wide configurations that are independent of the window manager.

-
-

Applications (applications/)

-
+
+

Applications (applications/)

+
  • file_management/: Configurations for file managers and storage solutions.
  • gaming/: Settings for gaming-related software.
  • @@ -405,9 +407,9 @@ This directory contains system-wide configurations that are independent of the w
-
-

Development (development/)

-
+
+

Development (development/)

+
  • databases/: Settings for local databases.
  • devops_ci_cd/: Configurations for DevOps tools.
  • @@ -417,9 +419,9 @@ This directory contains system-wide configurations that are independent of the w
-
-

System Management (system_management/)

-
+
+

System Management (system_management/)

+
  • backups/: Settings for backup software.
  • bluetooth/: Configurations for Bluetooth devices and services.
  • @@ -438,9 +440,9 @@ This directory contains system-wide configurations that are independent of the w
-
-

Hyprland (generated/hyprland/)

-
+
+

Hyprland (generated/hyprland/)

+

This directory contains configurations specific to Hyprland.

@@ -457,9 +459,9 @@ This directory contains configurations specific to Hyprland.
-
-

MangoWC (generated/mangowc/)

-
+
+

MangoWC (generated/mangowc/)

+

This directory contains configurations specific to MangoWC.

@@ -493,7 +495,7 @@ This directory contains configurations specific to MangoWC.
  • Scalability: Easy to add new machines or configurations.
  • -
    +
     .
     ├── assets
     │   ├── system
    @@ -675,9 +677,9 @@ This directory contains configurations specific to MangoWC.
     
    -
    -

    First Setup

    -
    +
    +

    First Setup

    +
    1. Clone this repository.
    2. Run the setup script: ./setup_droidnix.sh.
    3. @@ -699,9 +701,9 @@ This directory contains configurations specific to MangoWC. The .assets/ folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.

    -
    -

    .assets/system/

    -
    +
    +

    .assets/system/

    +

    This folder contains files shared across both window managers, such as wallpapers, shell configs, and system scripts.

    @@ -712,9 +714,9 @@ This folder contains files shared across both window managers, such as wallpaper
    -
    -

    .assets/hyprland/

    -
    +
    +

    .assets/hyprland/

    +

    Hyprland-specific assets, including configs, themes, and scripts.

    @@ -726,9 +728,9 @@ Hyprland-specific assets, including configs, themes, and scripts.
    -
    -

    .assets/mangowc/

    -
    +
    +

    .assets/mangowc/

    +

    Mangowc-specific assets, including configs, themes, and scripts.

    @@ -740,9 +742,9 @@ Mangowc-specific assets, including configs, themes, and scripts.
    -
    -

    .assets/machines/

    -
    +
    +

    .assets/machines/

    +

    Machine-specific NixOS configurations (e.g., configuration.nix for maindroid and traveldroid).

    @@ -760,9 +762,9 @@ Machine-specific NixOS configurations (e.g., configuration.nix for This section contains the Org blocks for tangling Nix code into the generated folders.

    -
    -

    flake.nix

    -
    +
    +

    flake.nix

    +

    The Nix flake definition for Droidnix.

    @@ -847,13 +849,13 @@ The Nix flake definition for Droidnix.
    -
    -

    First the nix-files that flake really needs and that do not fit wel in the hierarchical structure

    -
    +
    +

    First the nix-files that flake really needs and that do not fit wel in the hierarchical structure

    +
    -
    -

    assets/flake/users/henrov.nix

    -
    +
    +

    assets/flake/users/henrov.nix

    +

    This is the default user, just search and replace henrov another name if you want to change

    @@ -869,9 +871,9 @@ This is the default user, just search and replace henrov another name if you wan
    -
    -

    assets/flake/terminal_shell/devshell.nix

    -
    +
    +

    assets/flake/terminal_shell/devshell.nix

    +

    This code defines a Nix shell environment (also called a "devShell") that you can enter using the nix develop command. When you enter this shell, Nix will provide the tools and dependencies listed in buildInputs.

    @@ -887,9 +889,9 @@ mkShell {
    -
    -

    assets/flake/machines/traveldroid/top.nix

    -
    +
    +

    assets/flake/machines/traveldroid/top.nix

    +

    This code defines the machine to build. Just search and replace traveldroid to provision another machine.

    @@ -931,9 +933,9 @@ This code defines the machine to build. Just search and replace traveldroid to p
    -
    -

    assets/flake/machines/traveldroid/boot.nix

    -
    +
    +

    assets/flake/machines/traveldroid/boot.nix

    +

    This file has most of the settings the control how the computer boots up.

    @@ -968,13 +970,13 @@ This file has most of the settings the control how the computer boots up.
    -
    -

    Now we reach the top of the hierarchy which will call all other imports

    -
    +
    +

    Now we reach the top of the hierarchy which will call all other imports

    +
    -
    -

    generated/top.nix

    -
    +
    +

    generated/top.nix

    +

    The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure.

    @@ -991,9 +993,9 @@ The ./generated/top.nix file acts as an anchor or entry point for the entire cha
    -
    -

    generated/hyprland/top.nix

    -
    +
    +

    generated/hyprland/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1016,9 +1018,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/hyprland/hyprland.nix

    -
    +
    +

    generated/hyprland/hyprland.nix

    +

    The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure.

    @@ -1069,9 +1071,9 @@ in
    -
    -

    generated/mangowc/top.nix

    -
    +
    +

    generated/mangowc/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1094,9 +1096,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/top.nix

    -
    +
    +

    generated/system/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1115,9 +1117,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/top.nix

    -
    +
    +

    generated/system/applications/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1140,9 +1142,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/packages.nix

    -
    +
    +

    generated/system/applications/packages.nix

    +

    This will import all packages listed in ./assets/system/apps/packlages.conf

    @@ -1195,9 +1197,9 @@ in
    -
    -

    generated/system/applications/flatpaks.nix

    -
    +
    +

    generated/system/applications/flatpaks.nix

    +

    This will import all packages listed in ./assets/system/apps/flatpaks.conf

    @@ -1318,9 +1320,9 @@ in
    -
    -

    generated/system/core/top.nix

    -
    +
    +

    generated/system/core/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1329,6 +1331,8 @@ This is top file of this level which contains just an import statement for all r { imports = [ ./wayland.nix + ./eww.nix + # ./waybar.nix ./login-tuigreeter.nix # ./login-lightdm.nix ]; @@ -1338,9 +1342,68 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/core/login-tuigreeter.nix

    -
    +
    +

    generated/system/core/eww.nix

    +
    +

    +This file installs and configures eww +

    +
    +
    { lib, config, pkgs, flakeRoot, user, ... }:
    +
    +let
    +  ewwConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/eww";
    +  # Dynamically read all files in assets/system/conf/eww/
    +  ewwConfs = lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/system/conf/eww")) (name: {
    +    text = builtins.readFile "${flakeRoot}/assets/system/conf/eww/${name}";
    +  });
    +in
    +{
    +  environment.systemPackages = with pkgs; [ eww ];
    +
    +  home-manager.users.${user.username} = {
    +    home.file = {
    +      "${ewwConfigDir}" = {
    +        source = "${flakeRoot}/assets/system/conf/eww";
    +        recursive = true;
    +      };
    +    };
    +
    +    home.sessionVariables = {
    +      EWW_BIN = "${pkgs.eww}/bin/eww";
    +    };
    +
    +    # Start eww with Hyprland/MangoWC
    +    wayland.windowManager.hyprland.settings = lib.mkForce {
    +      exec-once = [ "eww daemon" ];
    +      exec = [ "eww open-many ${ewwConfigDir}/widgets" ]; # Adjust as needed
    +    };
    +    # For MangoWC, use:
    +    # wayland.windowManager.mangowc.config = {
    +    #   exec = [ "eww daemon" ];
    +    #   exec-once = [ "eww open-many ${ewwConfigDir}/widgets" ];
    +    # };
    +  };
    +}
    +
    +
    +
    +
    +
    +

    generated/system/core/waybar.nix

    +
    +

    +This file installs and configures waybar +

    +
    +
    +
    +
    +
    +
    +
    +

    generated/system/core/login-tuigreeter.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1363,9 +1426,9 @@ settings = {
    -
    -

    generated/system/core/wayland.nix

    -
    +
    +

    generated/system/core/wayland.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1409,9 +1472,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/development/top.nix

    -
    +
    +

    generated/system/development/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1431,9 +1494,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/top.nix

    -
    +
    +

    generated/system/system_management/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1461,9 +1524,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/hyprland/animations_effects/top.nix

    -
    +
    +

    generated/hyprland/animations_effects/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1479,9 +1542,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/hyprland/decorations/top.nix

    -
    +
    +

    generated/hyprland/decorations/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1497,9 +1560,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/hyprland/keyboard_binds/top.nix

    -
    +
    +

    generated/hyprland/keyboard_binds/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1528,9 +1591,9 @@ in
    -
    -

    generated/hyprland/notifications/top.nix

    -
    +
    +

    generated/hyprland/notifications/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1546,9 +1609,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/hyprland/statusbar_tray/top.nix

    -
    +
    +

    generated/hyprland/statusbar_tray/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1564,9 +1627,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/hyprland/task_launcher/top.nix

    -
    +
    +

    generated/hyprland/task_launcher/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1582,9 +1645,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/task_launcher/wofi.nix

    -
    +
    +

    generated/system/task_launcher/wofi.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1629,9 +1692,9 @@ in
    -
    -

    generated/hyprland/task_window_workspace_switcher/top.nix

    -
    +
    +

    generated/hyprland/task_window_workspace_switcher/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1647,9 +1710,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/hyprland/window_rules/top.nix

    -
    +
    +

    generated/hyprland/window_rules/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1665,9 +1728,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/animations_effects/top.nix

    -
    +
    +

    generated/mangowc/animations_effects/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1683,9 +1746,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/decorations/top.nix

    -
    +
    +

    generated/mangowc/decorations/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1701,9 +1764,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/keyboard_binds/top.nix

    -
    +
    +

    generated/mangowc/keyboard_binds/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1713,9 +1776,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/notifications/top.nix

    -
    +
    +

    generated/mangowc/notifications/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1731,9 +1794,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/statusbar_tray/top.nix

    -
    +
    +

    generated/mangowc/statusbar_tray/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1749,9 +1812,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/task_launcher/top.nix

    -
    +
    +

    generated/mangowc/task_launcher/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1767,9 +1830,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/task_window_workspace_switcher/top.nix

    -
    +
    +

    generated/mangowc/task_window_workspace_switcher/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1785,9 +1848,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/mangowc/window_rules/top.nix

    -
    +
    +

    generated/mangowc/window_rules/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1803,9 +1866,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/accessibility/top.nix

    -
    +
    +

    generated/system/applications/accessibility/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1821,9 +1884,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/file_management/top.nix

    -
    +
    +

    generated/system/applications/file_management/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1839,9 +1902,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/gaming/top.nix

    -
    +
    +

    generated/system/applications/gaming/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1857,9 +1920,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/media_playback_editing/top.nix

    -
    +
    +

    generated/system/applications/media_playback_editing/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1875,9 +1938,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/office_productivity/top.nix

    -
    +
    +

    generated/system/applications/office_productivity/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1893,9 +1956,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/terminal_shell/top.nix

    -
    +
    +

    generated/system/applications/terminal_shell/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -1913,9 +1976,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/applications/terminal_shell/kitty.nix

    -
    +
    +

    generated/system/applications/terminal_shell/kitty.nix

    +

    This file sets up Kitty terminal

    @@ -1943,9 +2006,9 @@ in
    -
    -

    generated/system/applications/terminal_shell/starship.nix

    -
    +
    +

    generated/system/applications/terminal_shell/starship.nix

    +

    This file sets up starship prompt

    @@ -1970,9 +2033,9 @@ in
    -
    -

    generated/system/applications/terminal_shell/zsh.nix

    -
    +
    +

    generated/system/applications/terminal_shell/zsh.nix

    +

    This sets up the zsh terminal

    @@ -2077,9 +2140,9 @@ This sets up the zsh terminal
    -
    -

    generated/system/development/databases/top.nix

    -
    +
    +

    generated/system/development/databases/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2095,9 +2158,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/development/devops_ci_cd/top.nix

    -
    +
    +

    generated/system/development/devops_ci_cd/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2113,9 +2176,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/development/programming_languages/top.nix

    -
    +
    +

    generated/system/development/programming_languages/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2131,9 +2194,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/development/virtualization/top.nix

    -
    +
    +

    generated/system/development/virtualization/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2149,9 +2212,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/development/web_development/top.nix

    -
    +
    +

    generated/system/development/web_development/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2167,9 +2230,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/audio/top.nix

    -
    +
    +

    generated/system/system_management/audio/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2185,9 +2248,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/backups/top.nix

    -
    +
    +

    generated/system/system_management/backups/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2203,9 +2266,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/bluetooth/top.nix

    -
    +
    +

    generated/system/system_management/bluetooth/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2221,9 +2284,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/disk_management/top.nix

    -
    +
    +

    generated/system/system_management/disk_management/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2239,9 +2302,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/hardware_sensors/top.nix

    -
    +
    +

    generated/system/system_management/hardware_sensors/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2257,9 +2320,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/logging_monitoring/top.nix

    -
    +
    +

    generated/system/system_management/logging_monitoring/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2275,9 +2338,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/login_manager/top.nix

    -
    +
    +

    generated/system/system_management/login_manager/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2293,9 +2356,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/monitor_setup/top.nix

    -
    +
    +

    generated/system/system_management/monitor_setup/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2311,9 +2374,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/networking/top.nix

    -
    +
    +

    generated/system/system_management/networking/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2329,9 +2392,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/power_management/top.nix

    -
    +
    +

    generated/system/system_management/power_management/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2347,9 +2410,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/printers_scanners/top.nix

    -
    +
    +

    generated/system/system_management/printers_scanners/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2365,9 +2428,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/security/top.nix

    -
    +
    +

    generated/system/system_management/security/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2383,9 +2446,9 @@ This is top file of this level which contains just an import statement for all r
    -
    -

    generated/system/system_management/system_updates/top.nix

    -
    +
    +

    generated/system/system_management/system_updates/top.nix

    +

    This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

    @@ -2405,7 +2468,7 @@ This is top file of this level which contains just an import statement for all r

    Author: Henro Veijer

    -

    Created: 2026-03-11 wo 15:33

    +

    Created: 2026-03-11 wo 16:02

    Validate

    diff --git a/Droidnix/README.org b/Droidnix/README.org index 6600a6f98..152383f58 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -821,6 +821,8 @@ This is top file of this level which contains just an import statement for all r { imports = [ ./wayland.nix + ./eww.nix + # ./waybar.nix ./login-tuigreeter.nix # ./login-lightdm.nix ]; @@ -828,6 +830,52 @@ This is top file of this level which contains just an import statement for all r } #+END_SRC +** =generated/system/core/eww.nix= +This file installs and configures eww +#+BEGIN_SRC nix :tangle generated/system/core/eww.nix :noweb tangle :mkdirp yes :eval never-html +{ lib, config, pkgs, flakeRoot, user, ... }: + +let + ewwConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/eww"; + # Dynamically read all files in assets/system/conf/eww/ + ewwConfs = lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/system/conf/eww")) (name: { + text = builtins.readFile "${flakeRoot}/assets/system/conf/eww/${name}"; + }); +in +{ + environment.systemPackages = with pkgs; [ eww ]; + + home-manager.users.${user.username} = { + home.file = { + "${ewwConfigDir}" = { + source = "${flakeRoot}/assets/system/conf/eww"; + recursive = true; + }; + }; + + home.sessionVariables = { + EWW_BIN = "${pkgs.eww}/bin/eww"; + }; + + # Start eww with Hyprland/MangoWC + wayland.windowManager.hyprland.settings = lib.mkForce { + exec-once = [ "eww daemon" ]; + exec = [ "eww open-many ${ewwConfigDir}/widgets" ]; # Adjust as needed + }; + # For MangoWC, use: + # wayland.windowManager.mangowc.config = { + # exec = [ "eww daemon" ]; + # exec-once = [ "eww open-many ${ewwConfigDir}/widgets" ]; + # }; + }; +} +#+END_SRC + +** =generated/system/core/waybar.nix= +This file installs and configures waybar +#+BEGIN_SRC nix :tangle generated/system/core/waybar.nix :noweb tangle :mkdirp yes :eval never-html +#+END_SRC + ** =generated/system/core/login-tuigreeter.nix= This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder #+BEGIN_SRC nix :tangle generated/system/core/login-tuigreeter.nix :noweb tangle :mkdirp yes :eval never-html diff --git a/Droidnix/assets/system/conf/eww/eww.yuck b/Droidnix/assets/system/conf/eww/eww.yuck new file mode 100644 index 000000000..41e993f77 --- /dev/null +++ b/Droidnix/assets/system/conf/eww/eww.yuck @@ -0,0 +1,90 @@ +(defvar colors + @(eww -c + (defvar base "#1E1E2E") + (defvar text "#CDD6F4") + (defvar lavender "#B4BEFE") + (defvar blue "#89B4FA") + (defvar green "#A6E3A1") + (defvar yellow "#F9E2AF") + (defvar red "#F38BA8") + (defvar surface0 "#313244") + (defvar surface1 "#45475A") + ) +) + +;; Main bar widget +(defwidget bar [] + (box :class "bar" :orientation "h" :space-evenly false + ;; Left: Workspaces (Hyprland) + (box :class "workspaces" :orientation "h" + (label :class "workspace" :id "workspace_1" :text "1") + (label :class "workspace" :id "workspace_2" :text "2") + (label :class "workspace" :id "workspace_3" :text "3") + (label :class "workspace" :id "workspace_4" :text "4") + (label :class "workspace" :id "workspace_5" :text "5") + ) + + ;; Center: Empty (placeholder for alignment) + (box :halign "center" :hexpand true) + + ;; Right: System modules + (box :class "right-items" :orientation "h" :spacing 8 + ;; Idle inhibitor + (button :class "idle-inhibitor" :onclick "eww update idle_inhibitor_icon=' '; notify-send 'Idle inhibitor' 'Activated'" + :label (label :id "idle_inhibitor_icon" :text "󰒲")) + + ;; PulseAudio + (button :class "pulseaudio" :onclick "pavucontrol" + :label (label :id "pulseaudio_label" :text " 100%")) + + ;; Network + (button :class "network" :onclick "impala" :onclick-right "nm-connection-editor" + :label (label :id "network_label" :text "Disconnected ⚠")) + + ;; Battery + (button :class "battery" :label (label :id "battery_label" :text "100% 󰂄")) + + ;; Tray placeholder (requires external tray like waybar-tray) + (box :class "tray" :orientation "h" :spacing 4 + (label :text "Tray")) + + ;; Clock + (button :class "clock" :onclick "flatpak run eu.betterbird.Betterbird -calendar" + :label (label :id "clock_label" :text "Mon, 01 Jan 2024 - 12:00")) + ) + ) +) + +;; Window definition +(defwindow bar-window + :geometry (geometry :x 0 :y 0 :width 1920 :height 34 :anchor "top left") + :layer "top" + :exclusivity "ignore" + (bar) +) + +;; Scripts to update dynamic content +(defpoll [1000] ;; Update every second + ;; Update PulseAudio volume + (setq pulseaudio-volume (exec "pamixer --get-volume")) + (setq pulseaudio-muted (exec "pamixer --get-mute")) + (if (= pulseaudio-muted "true") + (eww update pulseaudio_label="") + (eww update pulseaudio_label=(strfmt "{}% {}" pulseaudio-volume (if (> (string->number pulseaudio-volume) 50) "" ""))) + + ;; Update network status + (setq network-essid (exec "nmcli -t -f TYPE,NAME dev status | awk -F: '/wifi/{print $2}' | xargs -I {} sh -c 'nmcli -t -f SIGNAL dev wifi list ifname {} | awk -F: \"NR==2{print \\$1}\"'")) + (if (string-empty? network-essid) + (eww update network_label="Disconnected ⚠") + (eww update network_label=(strfmt " ({}%)" network-essid))) + + ;; Update clock + (eww update clock_label=(strftime "%a, %d %b %Y - %H:%M")) + + ;; Update battery status + (setq battery-capacity (exec "cat /sys/class/power_supply/BAT0/capacity")) + (setq battery-status (exec "cat /sys/class/power_supply/BAT0/status")) + (if (string= battery-status "Charging") + (eww update battery_label=(strfmt "{}% 󰂄" battery-capacity)) + (eww update battery_label=(strfmt "{}% 󰁹" battery-capacity))) +) diff --git a/Droidnix/assets/system/conf/eww/styles/main.css b/Droidnix/assets/system/conf/eww/styles/main.css new file mode 100644 index 000000000..cc46719e6 --- /dev/null +++ b/Droidnix/assets/system/conf/eww/styles/main.css @@ -0,0 +1,130 @@ +/* Catppuccin Mocha theme for EWW */ + +:root { + --base: #1e1e2e; + --mantle: #181825; + --crust: #11111b; + --text: #cdd6f4; + --subtext1: #bac2de; + --subtext0: #a6adc8; + --overlay2: #9399b2; + --overlay1: #7f849c; + --overlay0: #6c7086; + --surface2: #585b70; + --surface1: #45475a; + --surface0: #313244; + --lavender: #b4befe; + --blue: #89b4fa; + --sapphire: #74c7ec; + --teal: #94e2d5; + --green: #a6e3a1; + --yellow: #f9e2af; + --peach: #fab387; + --maroon: #eba0ac; + --red: #f38ba8; + --mauve: #cba6f7; + --pink: #f5c2e7; + --flamingo: #f2cdcd; + --rosewater: #f5e0dc; +} + +* { + all: unset; + font-family: "JetBrainsMono Nerd Font", monospace; + font-size: 12px; + color: var(--text); +} + +window { + background-color: rgba(30, 30, 46, 0.9); /* --base with transparency */ + border-radius: 8px; + padding: 0; + margin: 0; + border: 1px solid var(--surface0); + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); +} + +box { + background-color: transparent; + padding: 4px 8px; + spacing: 8px; +} + +label { + color: var(--text); + padding: 2px 6px; +} + +button { + color: var(--text); + background-color: var(--surface1); + border-radius: 4px; + padding: 2px 8px; + transition: all 0.2s ease; +} + +button:hover { + background-color: var(--surface2); + color: var(--lavender); +} + +button:active { + background-color: var(--blue); + color: var(--crust); +} + +/* Workspace buttons */ +.workspace { + color: var(--subtext1); + background-color: transparent; + border-radius: 4px; + padding: 2px 8px; + margin: 0 2px; +} + +.workspace.active { + background-color: var(--blue); + color: var(--base); +} + +.workspace.urgent { + background-color: var(--red); + color: var(--crust); +} + +.workspace.focused { + background-color: var(--lavender); + color: var(--base); +} + +/* Clock */ +#clock { + color: var(--peach); + padding: 2px 8px; + background-color: transparent; +} + +/* System stats */ +#cpu, +#ram, +#temp { + color: var(--green); + padding: 2px 8px; + background-color: transparent; +} + +#volume { + color: var(--mauve); +} + +#battery { + color: var(--green); +} + +#battery.discharging { + color: var(--yellow); +} + +#battery.critical { + color: var(--red); +} diff --git a/Droidnix/assets/system/conf/waybar/config b/Droidnix/assets/system/conf/waybar/config new file mode 100644 index 000000000..fe8d7a754 --- /dev/null +++ b/Droidnix/assets/system/conf/waybar/config @@ -0,0 +1,113 @@ +{ + "layer": "top", + "height": 34, + + //"modules-left": ["hyprland/window"], + + "modules-center": ["hyprland/workspaces" ], + + "modules-right": [ + "idle_inhibitor", + "pulseaudio", + "network", + // "cpu", + // "memory", + // "temperature", + "battery", + "tray", + "clock", + "custom/notifications", + ], + + /* + "custom/notifications": { + "tooltip": false, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "format": "{icon}", + "format-icons": { + "notification": "", + "none": "", + "dnd-notification": "󰂠", + "dnd-none": "󰪓", + }, + "on-click": "swaync-client -t", + "on-click-right": "swaync-client -d", + "on-click-middle": "swaync-client -dn", + }, +*/ + + "idle_inhibitor": { + "tooltip": true, + "format": "{icon}", + "format-icons": { + "activated": "  ", + "deactivated": " 󰒲 ", + }, + "tooltip-format-activated": "Staying awake", + "tooltip-format-deactivated": "Might sleep....", + }, + + "pulseaudio": { + "format": "{volume}% {icon}", + "format-bluetooth": "{volume}% {icon}", + "format-muted": "", + "format-icons": { + "headphones": "", + "headset": "", + "phone": "", + "portable": "", + "default": ["", ""], + }, + "on-click": "pavucontrol", + }, + + "network": { + "format-wifi": " ({bandwidthDownBits})", + "format-ethernet": " ({bandwidthDownBits})", + "format-disconnected": "Disconnected ⚠", + "tooltip-format-wifi": "{essid} ({signalStrength}%)", + "tooltip-format-ethernet": "{ifname}: {ipaddr}/{cidr}", + "on-click": "impala", + "on-click-right": "nm-connection-editor", + }, + + "cpu": { + "format": "{usage}%  ", + "tooltip": false, + }, + + "memory": { + "format": "{percentage}%  ", + }, + + "temperature": { + "format": "{temperatureC}°C ", + "tooltip": false, + }, + + "tray": { + "spacing": 10, + "icon-size": 14, + }, + + "clock": { + "format": "{:%a, %d %b %Y - %H:%M}", + "tooltip": false, + "on-click": "flatpak run eu.betterbird.Betterbird -calendar", + }, + + "battery": { + "bat": "BAT0", + "states": { + "good": 95, + "warning": 30, + "critical": 15, + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% 󰂄", + "format-plugged": "{capacity}%  ", + "format-icons": ["󰁺", "󰁼", "󰁾", "󰂀", "󱈏 "], + }, +} diff --git a/Droidnix/assets/system/conf/waybar/style.css b/Droidnix/assets/system/conf/waybar/style.css new file mode 100644 index 000000000..a6d5b75c7 --- /dev/null +++ b/Droidnix/assets/system/conf/waybar/style.css @@ -0,0 +1,225 @@ +/* --- Hyprland palette (ported) --- */ +@define-color base rgba(30, 30, 46, 1.0); /* 1e1e2eff */ +@define-color inactive rgba(89, 89, 89, 0.667); /* 595959aa */ +@define-color blue rgba(51, 204, 255, 0.933); /* 33ccffee */ +@define-color green rgba(0, 255, 153, 0.933); /* 00ff99ee */ + +/* extra colors you referenced but didn’t define */ +@define-color text rgba(255, 255, 255, 1.0); +@define-color surface1 rgba(255, 255, 255, 0.08); +@define-color subtext1 rgba(255, 255, 255, 0.35); +@define-color red rgba(255, 0, 0, 0.90); +@define-color overlay1 rgba(255, 255, 255, 0.35); +@define-color yellow rgba(255, 215, 0, 0.95); + +* { + font-family: + Aporetic Sans Mono, + Iosevka Nerd Font, + Roboto, + Helvetica, + Arial, + sans-serif; + font-size: 13px; +} + +window#waybar { + background-color: transparent; + color: @text; + transition-property: background-color; + border-bottom: 0px solid rgba(0, 0, 0, 0); + transition-duration: 0.5s; +} + +#workspaces button { + padding: 0px 1px; + min-width: 80px; + background-color: transparent; + color: @text; + border: 2px solid @inactive; + border-radius: 10px; +} + +#custom-notifications.empty { + color: @overlay1; +} + +#custom-notifications.unread { + color: @yellow; +} + +#workspaces button:hover { + background-color: @surface1; + color: @text; +} + +#workspaces button.active { + padding: 0px 1px; + min-width: 80px; + color: @text; + border-radius: 10px; + font-weight: bold; + border: 1px solid transparent; + background: + linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)) + padding-box, + linear-gradient(45deg, @blue, @green) border-box; +} + +#custom-hyprscroll_overflow.overflow { + padding: 0px 1px; + min-width: 80px; + color: @text; + border-radius: 10px; + font-weight: bold; + border: 1px dashed transparent; + background: + linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)) + padding-box, + linear-gradient(45deg, @blue, @green) border-box; +} + +#custom-hyprscroll_overflow.overflow { + background: + linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)) + padding-box, + linear-gradient(45deg, @blue, @green) border-box; +} + +#custom-hyprscroll_overflow.hidden { + padding: 0; + margin: 0; + min-width: 0; + border: 0; + background: transparent; + opacity: 0; +} + +#clock, +#idle_inhibitor, +#battery, +#cpu, +#memory, +#temperature, +#network, +#pulseaudio, +#tray { + margin: 0 5px; + padding: 0 2px; +} + +#idle_inhibitor.activated { + background-color: @green; +} + +#battery.charging { + color: @green; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: black; + } +} + +#battery.warning:not(.charging) { + color: white; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#window, +#workspaces { + margin: 0 4px; +} + +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +#network.disconnected { + background-color: @red; +} + +#temperature.critical { + background-color: @red; +} + +/* ========================================================= + * Notifications + * ========================================================= */ +#custom-notifications { + margin: 0 4px; + padding: 0 4px; + min-width: 0; +} + +#custom-notifications.empty { + color: @overlay1; +} +#custom-notifications.unread { + color: @yellow; +} + +/* ========================================================= + * Hyprscroll overflow indicator (custom/hyprscroll_overflow) + * States: .ok, .overflow, .error + * ========================================================= */ + +/* Default (no overflow): subtle pill, still hoverable for tooltip */ +#custom-hyprscroll_overflow.ok { + padding: 0px 1px; + min-width: 80px; + color: @subtext1; + border-radius: 10px; + + /* subtle outline so you know it's there */ + border: 1px solid rgba(255, 255, 255, 0.12); + background: rgba(255, 255, 255, 0.03); +} + +/* Make it feel interactive (hover) */ +#custom-hyprscroll_overflow.ok:hover { + color: @text; + background-color: @surface1; + border: 1px solid rgba(255, 255, 255, 0.18); +} + +/* Overflow state: you already have this; keep it. + Optional: add hover tweak so it "pops" a bit. */ +#custom-hyprscroll_overflow.overflow:hover { + background: + linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)) + padding-box, + linear-gradient(45deg, @blue, @green) border-box; +} + +/* Error state: clear but not screaming */ +#custom-hyprscroll_overflow.error { + padding: 0px 1px; + min-width: 80px; + color: @text; + border-radius: 10px; + + border: 1px solid rgba(255, 0, 0, 0.55); + background: rgba(255, 0, 0, 0.15); + font-weight: bold; +} + +/* Optional: if you keep .hidden in the script for any reason */ +#custom-hyprscroll_overflow.hidden { + padding: 0; + margin: 0; + min-width: 0; + border: 0; + background: transparent; + opacity: 0; +} diff --git a/Droidnix/generated/system/core/eww.nix b/Droidnix/generated/system/core/eww.nix new file mode 100644 index 000000000..474f440c4 --- /dev/null +++ b/Droidnix/generated/system/core/eww.nix @@ -0,0 +1,36 @@ +{ lib, config, pkgs, flakeRoot, user, ... }: + +let + ewwConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/eww"; + # Dynamically read all files in assets/system/conf/eww/ + ewwConfs = lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/system/conf/eww")) (name: { + text = builtins.readFile "${flakeRoot}/assets/system/conf/eww/${name}"; + }); +in +{ + environment.systemPackages = with pkgs; [ eww ]; + + home-manager.users.${user.username} = { + home.file = { + "${ewwConfigDir}" = { + source = "${flakeRoot}/assets/system/conf/eww"; + recursive = true; + }; + }; + + home.sessionVariables = { + EWW_BIN = "${pkgs.eww}/bin/eww"; + }; + + # Start eww with Hyprland/MangoWC + wayland.windowManager.hyprland.settings = lib.mkForce { + exec-once = [ "eww daemon" ]; + exec = [ "eww open-many ${ewwConfigDir}/widgets" ]; # Adjust as needed + }; + # For MangoWC, use: + # wayland.windowManager.mangowc.config = { + # exec = [ "eww daemon" ]; + # exec-once = [ "eww open-many ${ewwConfigDir}/widgets" ]; + # }; + }; +} diff --git a/Droidnix/generated/system/core/top.nix b/Droidnix/generated/system/core/top.nix index cbd37c08c..e0b1e4454 100644 --- a/Droidnix/generated/system/core/top.nix +++ b/Droidnix/generated/system/core/top.nix @@ -2,6 +2,8 @@ { imports = [ ./wayland.nix + ./eww.nix + # ./waybar.nix ./login-tuigreeter.nix # ./login-lightdm.nix ]; diff --git a/Droidnix/generated/system/core/waybar.nix b/Droidnix/generated/system/core/waybar.nix new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/Droidnix/generated/system/core/waybar.nix @@ -0,0 +1 @@ +