diff --git a/Droidnix/README.html b/Droidnix/README.html index 000c771f5..aa6c973d1 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,114 +204,116 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -327,26 +329,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: @@ -359,9 +361,9 @@ The Droidnix repository is organized into two main parts:

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -372,16 +374,16 @@ 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.

-
-

First Setup

-
+
+

First Setup

+
  1. Clone this repository.
  2. Run the setup script: ./setup_droid.
  3. @@ -411,9 +413,9 @@ The .assets/ folder contains all static files, such as configs, scr This section contains the Org blocks for tangling Nix code into the generated folders.

-
-

flake.nix

-
+
+

flake.nix

+

The Nix flake definition for Droidnix.

@@ -482,9 +484,9 @@ The Nix flake definition for Droidnix.
-
-

generated/hosts/traveldroid/host.nix

-
+
+

generated/hosts/traveldroid/host.nix

+
{ lib, config, pkgs, flakeRoot, import-tree, home-manager, ... }:
 
@@ -542,9 +544,9 @@ in
 
-
-

generated/hosts/traveldroid/hardware-configuration.nix

-
+
+

generated/hosts/traveldroid/hardware-configuration.nix

+
  1. Boot into NixOS Live ISO or your installed system.
  2. Open a terminal.
  3. @@ -602,9 +604,9 @@ in
-
-

generated/hosts/traveldroid/boot.nix

-
+
+

generated/hosts/traveldroid/boot.nix

+
{ config, pkgs, lib, flakeRoot, ... }:
 
@@ -653,17 +655,17 @@ in
 
-
-

Following are the imported modules

+
+

Following are the imported modules

-
-

generated/traveldroid/modules/apps

-
+
+

generated/traveldroid/modules/apps

+
-
-

generated/modules/traveldroid/apps/2_b_installed.nix

-
+
+

generated/modules/traveldroid/apps/2_b_installed.nix

+

This installs a list of apps

@@ -771,9 +773,9 @@ in {
-
-

generated/assets/2_b_installed.conf

-
+
+

generated/assets/2_b_installed.conf

+

This is a list of additional apps to install

@@ -781,7 +783,6 @@ This is a list of additional apps to install
#packages
 bluez
 blueman
-pavucontrol
 usbutils
 todoist
 brave
@@ -827,9 +828,9 @@ com.todoist.Todoist
 
-
-

generated/modules/traveldroid/apps/kitty.nix

-
+
+

generated/modules/traveldroid/apps/kitty.nix

+

This file sets up Kitty terminal

@@ -887,9 +888,9 @@ in
-
-

generated/modules/traveldroid/apps/starship.nix

-
+
+

generated/modules/traveldroid/apps/starship.nix

+

This file sets up starship prompt

@@ -928,9 +929,9 @@ in
-
-

.config/starship.toml

-
+
+

.config/starship.toml

+

These are config files for .config

@@ -1219,9 +1220,9 @@ crust = "#181926"
-
-

generated/modules/traveldroid/apps/thunar.nix

-
+
+

generated/modules/traveldroid/apps/thunar.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

@@ -1262,9 +1263,9 @@ in
-
-

generated/modules/traveldroid/apps/wofi.nix

-
+
+

generated/modules/traveldroid/apps/wofi.nix

+

This is the install for Wofi, the launcher

@@ -1297,9 +1298,9 @@ in
-
-

.config/wofi/config

-
+
+

.config/wofi/config

+

These are config files for .config/wofi

@@ -1346,9 +1347,9 @@ prompt = >
-
-

.config/wofi/style.css

-
+
+

.config/wofi/style.css

+

These are config files for .config/wofi

@@ -1437,9 +1438,9 @@ These are config files for .config/wofi
-
-

generated/modules/traveldroid/apps/zenbrowser.nix

-
+
+

generated/modules/traveldroid/apps/zenbrowser.nix

+

This installs zen browser

@@ -1459,9 +1460,9 @@ in
-
-

generated/modules/traveldroid/apps/zsh.nix

-
+
+

generated/modules/traveldroid/apps/zsh.nix

+

This sets up the zsh in the terminal

@@ -1524,9 +1525,9 @@ in
-
-

=generated/.config/zsh/.zshrc

-
+
+

=generated/.config/zsh/.zshrc

+

This sets up the zsh in the terminal

@@ -1547,9 +1548,9 @@ fi
-
-

generated/modules/traveldroid/apps/emacs/emacs.nix

-
+
+

generated/modules/traveldroid/apps/emacs/emacs.nix

+

This installs emacs

@@ -1645,9 +1646,9 @@ in
-
-

generated/.config/emacs/early-init.el

-
+
+

generated/.config/emacs/early-init.el

+

This contaions emacs

@@ -1748,9 +1749,9 @@ package-archive-priorities '(("gnu" . 99)
-
-

generated/.config/emacs/init.el

-
+
+

generated/.config/emacs/init.el

+

This contaions emacs

@@ -2161,13 +2162,13 @@ the top of the file."
-
-

generated/modules/traveldroid/desktop

-
+
+

generated/modules/traveldroid/desktop

+
-
-

generated/modules/traveldroid/desktop/fonts.nix

-
+
+

generated/modules/traveldroid/desktop/fonts.nix

+

This file installs and configures fonts

@@ -2185,9 +2186,9 @@ This file installs and configures fonts
-
-

generated/modules/traveldroid/desktop/gtk.nix

-
+
+

generated/modules/traveldroid/desktop/gtk.nix

+

Setting up GTK

@@ -2213,9 +2214,9 @@ in
-
-

generated/modules/traveldroid/desktop/hyprland.nix

-
+
+

generated/modules/traveldroid/desktop/hyprland.nix

+

Setting up Hyprland

@@ -2262,9 +2263,9 @@ in
-
-

.config/hypr/animations.conf

-
+
+

.config/hypr/animations.conf

+

These are config files for .config/hypr

@@ -2285,9 +2286,9 @@ animations {
-
-

.config/hypr/behaviour.conf

-
+
+

.config/hypr/behaviour.conf

+

These are config files for .config/hypr

@@ -2329,9 +2330,9 @@ misc {
-
-

.config/hypr/bindings.conf

-
+
+

.config/hypr/bindings.conf

+

These are config files for .config/hypr

@@ -2494,9 +2495,9 @@ bind = $mainMod, W, exec, zen
-
-

.config/hypr/exec-once.conf

-
+
+

.config/hypr/exec-once.conf

+

These are config files for .config/hypr

@@ -2512,9 +2513,9 @@ exec-once = sh ~/Wallpapers/scripts/wallpaper.sh &
-
-

.config/hypr/hypridle.conf

-
+
+

.config/hypr/hypridle.conf

+

These are config files for .config/hypr

@@ -2539,9 +2540,9 @@ listener {
-
-

.config/hypr/hyprland.conf

-
+
+

.config/hypr/hyprland.conf

+

These are config files for .config/hypr

@@ -2588,9 +2589,9 @@ misc {
-
-

.config/hypr/hyprlock.conf

-
+
+

.config/hypr/hyprlock.conf

+

These are config files for .config/hypr

@@ -2631,9 +2632,9 @@ label {
-
-

.config/hypr/layer-rules.conf

-
+
+

.config/hypr/layer-rules.conf

+

These are config files for .config/hypr

@@ -2648,9 +2649,9 @@ layerrule = blur on, ignore_alpha 1, match:namespace swaync-notification-window
-
-

.config/hypr/layout.conf

-
+
+

.config/hypr/layout.conf

+

These are config files for .config/hypr

@@ -2660,9 +2661,9 @@ These are config files for .config/hypr
-
-

.config/hypr/monitor-rules.conf

-
+
+

.config/hypr/monitor-rules.conf

+

These are config files for .config/hypr

@@ -2673,9 +2674,9 @@ monitor=DP-1,3840x1080@144,1920x0,1
-
-

.config/hypr/scripts/layout-selector.sh

-
+
+

.config/hypr/scripts/layout-selector.sh

+

These are config files for .config/hypr/scripts

@@ -2718,9 +2719,9 @@ hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000
-
-

.config/hypr/theming.css

-
+
+

.config/hypr/theming.css

+

These are config files for .config/hypr

@@ -2769,9 +2770,9 @@ decoration {
-
-

.config/hypr/window-rules.conf

-
+
+

.config/hypr/window-rules.conf

+

These are config files for .config/hypr

@@ -2800,9 +2801,9 @@ windowrulev2 = floatclass:Wofi,opacity:0.9,blur:15
-
-

.config/hypr/workspace-rules.conf

-
+
+

.config/hypr/workspace-rules.conf

+

These are config files for .config/hypr

@@ -2828,9 +2829,9 @@ workspace = 10
-
-

generated/modules/traveldroid/desktop/wallpaper.nix

-
+
+

generated/modules/traveldroid/desktop/wallpaper.nix

+

Setting up wallpaper engine + wallpaper gui

@@ -2908,10 +2909,21 @@ in description = "Dynamic wallpapers per workspace for Hyprland"; after = [ "graphical-session.target" ]; wants = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh"; - Restart = "always"; + Restart = "on-failure"; + RestartSec = 5; + WorkingDirectory = homeDir; + Environment = [ + "XDG_RUNTIME_DIR=${config.xdg.runtimeDir}" + "HYPRLAND_INSTANCE_SIGNATURE=${builtins.getEnv "HYPRLAND_INSTANCE_SIGNATURE"}" + "WAYLAND_DISPLAY=wayland-1" + "PATH=/run/current-system/sw/bin:/usr/bin:/bin" + ]; }; + wantedBy = [ "default.target" ]; }; } @@ -2919,9 +2931,9 @@ in
-
-

generated/modules/traveldroid/desktop/stylix.nix

-
+
+

generated/modules/traveldroid/desktop/stylix.nix

+
{ lib, config, pkgs, flakeRoot, stylix, ... }:
 
@@ -3008,9 +3020,9 @@ in
 
-
-

.config/stylix/stylix.conf

-
+
+

.config/stylix/stylix.conf

+

These are config files for .config/stylix

@@ -3047,9 +3059,9 @@ icons = {
-
-

.config/stylix/palette.json

-
+
+

.config/stylix/palette.json

+

These are config files for .config/stylix

@@ -3079,9 +3091,9 @@ These are config files for .config/stylix
-
-

.config/stylix/palette.html

-
+
+

.config/stylix/palette.html

+

These are config files for .config/stylix

@@ -3159,9 +3171,9 @@ These are config files for .config/stylix
-
-

generated/modules/traveldroid/desktop/waybar.nix

-
+
+

generated/modules/traveldroid/desktop/waybar.nix

+

This file installs and configures waybar

@@ -3227,9 +3239,9 @@ in
-
-

.config/waybar/config

-
+
+

.config/waybar/config

+

These are config files for waybar

@@ -3372,9 +3384,9 @@ These are config files for waybar
-
-

.config/waybar/style.css

-
+
+

.config/waybar/style.css

+

These are config files for waybar

@@ -3608,9 +3620,9 @@ window#waybar {
-
-

.config/waybar/scripts/bluetooth-status.sh

-
+
+

.config/waybar/scripts/bluetooth-status.sh

+

These are config files for waybar

@@ -3636,9 +3648,9 @@ printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
-
-

.config/waybar/scripts/hyprscroll-overflow.sh

-
+
+

.config/waybar/scripts/hyprscroll-overflow.sh

+

These are config files for waybar

@@ -3676,9 +3688,9 @@ echo "{\"text\":\"★ $total_clients\",\"tooltip\":\"$tooltip\",\"class\":\"over
-
-

.config/waybar/scripts/hyprscroll-menu.sh

-
+
+

.config/waybar/scripts/hyprscroll-menu.sh

+

These are config files for waybar

@@ -3695,9 +3707,9 @@ hyprctl dispatch focuswindow address:$addr
-
-

.config/waypaper/config.ini

-
+
+

.config/waypaper/config.ini

+

These are config files for waypaper

@@ -3734,9 +3746,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/modules/traveldroid/desktop/wayland.nix

-
+
+

generated/modules/traveldroid/desktop/wayland.nix

+
{ lib, config, pkgs, ... }:
 
@@ -3766,9 +3778,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
 
-
-

generated/modules/traveldroid/desktop/xdg.nix

-
+
+

generated/modules/traveldroid/desktop/xdg.nix

+

This sets the XDG implementation

@@ -3822,13 +3834,44 @@ in
-
-

generated/modules/traveldroid/system

-
+
+

generated/modules/traveldroid/system

+
-
-

generated/modules/traveldroid/system/bluetooth.nix

-
+
+

generated/modules/traveldroid/system/audio.nix

+
+
+
{ lib, config, pkgs, ... }:
+
+{
+  ############################
+  # Audio system
+  ############################
+  environment.systemPackages = with pkgs; [
+    pulseaudio       # PulseAudio daemon
+    pavucontrol      # GUI mixer
+    pamixer          # CLI mixer
+  ];
+
+  ############################
+  # Enable PulseAudio system-wide
+  ############################
+  sound.enable = true;
+  hardware.pulseaudio.enable = true;
+
+  ############################
+  # Optional: enable ALSA support
+  ############################
+  hardware.pulseaudio.support32Bit = true; # for 32-bit apps
+}
+
+
+
+
+
+

generated/modules/traveldroid/system/bluetooth.nix

+
{ lib, config, pkgs, home-manager, ... }:
 
@@ -3849,9 +3892,9 @@ in
 
-
-

generated/modules/traveldroid/system/dbus.nix

-
+
+

generated/modules/traveldroid/system/dbus.nix

+

This sets the dbus implementation

@@ -3878,9 +3921,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/login-tuigreet.nix

-
+
+

generated/modules/traveldroid/system/login-tuigreet.nix

+

This sets up tuigreeter which is not fancy but imo fits the aesthetic I am aiming for

@@ -3934,9 +3977,9 @@ in
-
-

generated/modules/traveldroid/system/networking.nix

-
+
+

generated/modules/traveldroid/system/networking.nix

+

This sets the networking.

@@ -3998,9 +4041,9 @@ This sets the networking.
-
-

generated/modules/traveldroid/system/nix.nix

-
+
+

generated/modules/traveldroid/system/nix.nix

+
{ lib, config, ... }:
 
@@ -4016,14 +4059,41 @@ This sets the networking.
 
+
+

generated/modules/traveldroid/system/printing.nix

+
+

+This sets the dbus implementation +

+
+
{ lib, config, pkgs, ... }:
+
+{
+  ############################
+  # Printing system
+  ############################
+  services.printing.enable = true;          # enable CUPS printing service
+  services.printing.drivers = [ "all" ];   # include all drivers (optional)
+
+  ############################
+  # System packages for GUI management
+  ############################
+  environment.systemPackages = with pkgs; [
+    system-config-printer    # GUI to manage printers
+  ];
+}
+
-
-

generated/users

-
-
-

generated/users/henrov.nix

-
+
+
+
+

generated/users

+
+
+
+

generated/users/henrov.nix

+

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

@@ -4081,9 +4151,9 @@ in

These are all the prepared config files

-
-

.config/waybar/style.css

-
+
+

.config/waybar/style.css

+

These are config files for .config/waybar

@@ -4317,9 +4387,9 @@ window#waybar {
-
-

.config/waypaper/config.ini

-
+
+

.config/waypaper/config.ini

+

These are config files for .config/waypaper

@@ -4356,9 +4426,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

.config/zed/settings.json

-
+
+

.config/zed/settings.json

+

These are config files for .config/zed

@@ -4398,7 +4468,7 @@ These are config files for .config/zed

Author: Henro Veijer

-

Created: 2026-04-01 wo 20:34

+

Created: 2026-04-01 wo 21:17

Validate

diff --git a/Droidnix/README.org b/Droidnix/README.org index 98e594746..e19301661 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -401,7 +401,6 @@ This is a list of additional apps to install #packages bluez blueman -pavucontrol usbutils todoist brave @@ -2340,10 +2339,21 @@ in description = "Dynamic wallpapers per workspace for Hyprland"; after = [ "graphical-session.target" ]; wants = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh"; - Restart = "always"; + Restart = "on-failure"; + RestartSec = 5; + WorkingDirectory = homeDir; + Environment = [ + "XDG_RUNTIME_DIR=${config.xdg.runtimeDir}" + "HYPRLAND_INSTANCE_SIGNATURE=${builtins.getEnv "HYPRLAND_INSTANCE_SIGNATURE"}" + "WAYLAND_DISPLAY=wayland-1" + "PATH=/run/current-system/sw/bin:/usr/bin:/bin" + ]; }; + wantedBy = [ "default.target" ]; }; } @@ -3179,6 +3189,34 @@ in * generated/modules/traveldroid/system +** =generated/modules/traveldroid/system/audio.nix= +#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/audio.nix :noweb yes :mkdirp yes :eval never +{ lib, config, pkgs, ... }: + +{ + ############################ + # Audio system + ############################ + environment.systemPackages = with pkgs; [ + pulseaudio # PulseAudio daemon + pavucontrol # GUI mixer + pamixer # CLI mixer + ]; + + ############################ + # Enable PulseAudio system-wide + ############################ + sound.enable = true; + hardware.pulseaudio.enable = true; + + ############################ + # Optional: enable ALSA support + ############################ + hardware.pulseaudio.support32Bit = true; # for 32-bit apps +} +#+END_SRC + + ** =generated/modules/traveldroid/system/bluetooth.nix= #+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/bluetooth.nix :noweb yes :mkdirp yes :eval never { lib, config, pkgs, home-manager, ... }: @@ -3343,6 +3381,27 @@ This sets the networking. } #+END_SRC +** =generated/modules/traveldroid/system/printing.nix= +This sets the dbus implementation +#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/printing.nix :noweb yes :mkdirp yes :eval never +{ lib, config, pkgs, ... }: + +{ + ############################ + # Printing system + ############################ + services.printing.enable = true; # enable CUPS printing service + services.printing.drivers = [ "all" ]; # include all drivers (optional) + + ############################ + # System packages for GUI management + ############################ + environment.systemPackages = with pkgs; [ + system-config-printer # GUI to manage printers + ]; +} +#+END_SRC + * generated/users diff --git a/Droidnix/assets/traveldroid/Wallpapers/scripts/workspace-wallpapers.sh b/Droidnix/assets/traveldroid/Wallpapers/scripts/workspace-wallpapers.sh index 177debc1d..929090ac1 100755 --- a/Droidnix/assets/traveldroid/Wallpapers/scripts/workspace-wallpapers.sh +++ b/Droidnix/assets/traveldroid/Wallpapers/scripts/workspace-wallpapers.sh @@ -1,41 +1,83 @@ -#!/run/current-system/sw/bin/bash +#!/usr/bin/env bash set -euo pipefail -currentpath=/run/current-system/sw/bin -PICTURES_DIR="$HOME/Wallpapers/pictures" +# ------------------------------- +# Config +# ------------------------------- +HOME_DIR="$HOME" +PICTURES_DIR="$HOME_DIR/Wallpapers/pictures" +STATE_DIR="$HOME_DIR/.cache/hypr-wallpapers" NAMESPACE="main" +CURRENTPATH=/run/current-system/sw/bin + +# Required environment variables : "${XDG_RUNTIME_DIR:?XDG_RUNTIME_DIR is not set}" : "${HYPRLAND_INSTANCE_SIGNATURE:?HYPRLAND_INSTANCE_SIGNATURE is not set}" +: "${WAYLAND_DISPLAY:?WAYLAND_DISPLAY is not set}" IPC_SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" -while [ ! -S "$IPC_SOCKET" ]; do sleep 1; done +# ------------------------------- +# Wait for Hyprland IPC socket +# ------------------------------- +until [ -S "$IPC_SOCKET" ]; do + echo "Waiting for Hyprland IPC socket..." + sleep 1 +done -echo $IPC_SOCKET +# ------------------------------- +# Start swww-daemon if not already running +# ------------------------------- +SWWW_SOCKET="$XDG_RUNTIME_DIR/swww/$NAMESPACE.sock" -# Start swww-daemon only if not already running for this namespace -if [ ! -S "$XDG_RUNTIME_DIR/swww/$NAMESPACE.sock" ]; then - "$currentpath/swww-daemon" --namespace "$NAMESPACE" & - sleep 0.5 +if [ ! -S "$SWWW_SOCKET" ]; then + if ! pgrep -f "swww-daemon.*--namespace $NAMESPACE" >/dev/null; then + echo "Starting swww-daemon for namespace $NAMESPACE..." + "$CURRENTPATH/swww-daemon" --namespace "$NAMESPACE" & + sleep 0.5 + else + echo "swww-daemon already running for namespace $NAMESPACE" + fi fi +# ------------------------------- # Load wallpapers +# ------------------------------- mapfile -t IMAGES < <(find "$PICTURES_DIR" -type f \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' \)) -[ "${#IMAGES[@]}" -eq 0 ] && exit 1 +[ "${#IMAGES[@]}" -eq 0 ] && { echo "No wallpapers found in $PICTURES_DIR"; exit 1; } +mkdir -p "$STATE_DIR" + +get_wallpaper() { + local ws="$1" + local mon="$2" + local key="$STATE_DIR/ws${ws}_mon${mon}.txt" + + if [ -f "$key" ]; then + cat "$key" + else + local image="${IMAGES[RANDOM % ${#IMAGES[@]}]}" + echo "$image" > "$key" + echo "$image" + fi +} + +# ------------------------------- # Subscribe to workspace events +# ------------------------------- { echo '{"subscribe":["workspace"]}' - "$currentpath/socat" - UNIX-CONNECT:"$IPC_SOCKET" + "$CURRENTPATH/socat" - UNIX-CONNECT:"$IPC_SOCKET" } | while read -r line; do - # Only parse lines starting with '{' (JSON) - if [[ "$line" =~ ^\{ ]]; then - WS_NUM=$(echo "$line" | "$currentpath/jq" -e -r 'select(.type=="workspace" and .active==true) | .workspace' 2>/dev/null || true) - if [ -n "$WS_NUM" ]; then - RAND_IMAGE="${IMAGES[RANDOM % ${#IMAGES[@]}]}" - MONITOR=$(echo "$line" | "$currentpath/jq" -r '.monitor') - "$currentpath/swww" img "$RAND_IMAGE" --resize stretch --transition-type random --namespace "$WS_NUM" - fi + [[ "$line" =~ ^\{ ]] || continue + + WS_NUM=$("$CURRENTPATH/jq" -r 'select(.type=="workspace" and .active==true) | .workspace' <<< "$line" 2>/dev/null || true) + MONITOR=$("$CURRENTPATH/jq" -r '.monitor' <<< "$line" 2>/dev/null || true) + + if [ -n "$WS_NUM" ] && [ -n "$MONITOR" ]; then + WALLPAPER=$(get_wallpaper "$WS_NUM" "$MONITOR") + echo "Setting wallpaper for workspace $WS_NUM on monitor $MONITOR: $WALLPAPER" + "$CURRENTPATH/swww" img "$WALLPAPER" --resize stretch --namespace "$WS_NUM" fi done diff --git a/Droidnix/generated/assets/2_b_installed.conf b/Droidnix/generated/assets/2_b_installed.conf index afe986d85..45f861124 100644 --- a/Droidnix/generated/assets/2_b_installed.conf +++ b/Droidnix/generated/assets/2_b_installed.conf @@ -1,7 +1,6 @@ #packages bluez blueman -pavucontrol usbutils todoist brave diff --git a/Droidnix/generated/modules/traveldroid/desktop/wallpaper.nix b/Droidnix/generated/modules/traveldroid/desktop/wallpaper.nix index c14320e18..ecd6368d1 100644 --- a/Droidnix/generated/modules/traveldroid/desktop/wallpaper.nix +++ b/Droidnix/generated/modules/traveldroid/desktop/wallpaper.nix @@ -71,10 +71,21 @@ in description = "Dynamic wallpapers per workspace for Hyprland"; after = [ "graphical-session.target" ]; wants = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; ExecStart = "${homeDir}/Wallpapers/scripts/workspace-wallpapers.sh"; - Restart = "always"; + Restart = "on-failure"; + RestartSec = 5; + WorkingDirectory = homeDir; + Environment = [ + "XDG_RUNTIME_DIR=${config.xdg.runtimeDir}" + "HYPRLAND_INSTANCE_SIGNATURE=${builtins.getEnv "HYPRLAND_INSTANCE_SIGNATURE"}" + "WAYLAND_DISPLAY=wayland-1" + "PATH=/run/current-system/sw/bin:/usr/bin:/bin" + ]; }; + wantedBy = [ "default.target" ]; }; } diff --git a/Droidnix/generated/modules/traveldroid/system/audio.nix b/Droidnix/generated/modules/traveldroid/system/audio.nix new file mode 100644 index 000000000..08a3353fa --- /dev/null +++ b/Droidnix/generated/modules/traveldroid/system/audio.nix @@ -0,0 +1,23 @@ +{ lib, config, pkgs, ... }: + +{ + ############################ + # Audio system + ############################ + environment.systemPackages = with pkgs; [ + pulseaudio # PulseAudio daemon + pavucontrol # GUI mixer + pamixer # CLI mixer + ]; + + ############################ + # Enable PulseAudio system-wide + ############################ + sound.enable = true; + hardware.pulseaudio.enable = true; + + ############################ + # Optional: enable ALSA support + ############################ + hardware.pulseaudio.support32Bit = true; # for 32-bit apps +} diff --git a/Droidnix/generated/modules/traveldroid/system/printing.nix b/Droidnix/generated/modules/traveldroid/system/printing.nix new file mode 100644 index 000000000..c4119a2e2 --- /dev/null +++ b/Droidnix/generated/modules/traveldroid/system/printing.nix @@ -0,0 +1,16 @@ +{ lib, config, pkgs, ... }: + +{ + ############################ + # Printing system + ############################ + services.printing.enable = true; # enable CUPS printing service + services.printing.drivers = [ "all" ]; # include all drivers (optional) + + ############################ + # System packages for GUI management + ############################ + environment.systemPackages = with pkgs; [ + system-config-printer # GUI to manage printers + ]; +}