From 489830ce90fa74d82d249bb3461158e42912b5e0 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Sat, 11 Apr 2026 09:55:08 +0200 Subject: [PATCH] Regenerated --- Droidnix/README.html | 716 ++++++++++-------- Droidnix/README.org | 85 ++- Droidnix/generated/.config/scripts/power.sh | 47 ++ Droidnix/generated/.config/waybar/config | 2 +- .../traveldroid/system/copy_scripts.nix | 30 +- 5 files changed, 541 insertions(+), 339 deletions(-) create mode 100644 Droidnix/generated/.config/scripts/power.sh diff --git a/Droidnix/README.html b/Droidnix/README.html index 3ed7f1db4..14ecc4cf8 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,123 +204,124 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -336,25 +337,25 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. with 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
  • +
  • Core
  • +
  • Hyprland
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

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

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -380,16 +381,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. @@ -410,9 +411,9 @@ The generated/ directory contains all generated configurations, div The .assets/ folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.

-
-

generated/assets/2_b_installed.conf

-
+
+

generated/assets/2_b_installed.conf

+

This is a list of additional apps to install

@@ -490,9 +491,9 @@ com.todoist.Todoist This section contains the Org blocks for tangling Nix code into the generated folders.

-
-

generated/flake.nix

-
+
+

generated/flake.nix

+

The Nix flake definition for Droidnix.

@@ -561,9 +562,9 @@ The Nix flake definition for Droidnix.
-
-

generated/hosts/traveldroid/boot.nix

-
+
+

generated/hosts/traveldroid/boot.nix

+
{ config, pkgs, lib, flakeRoot, ... }:
 
@@ -609,9 +610,9 @@ The Nix flake definition for Droidnix.
 
-
-

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. @@ -669,9 +670,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, ... }:
 
@@ -730,13 +731,13 @@ in
 
-
-

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

@@ -844,9 +845,9 @@ in {
-
-

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

-
+
+

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

+

This installs emacs

@@ -942,9 +943,9 @@ in
-
-

generated/modules/traveldroid/apps/flameshot.nix

-
+
+

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

@@ -983,9 +984,9 @@ in
-
-

generated/modules/traveldroid/apps/kitty.nix

-
+
+

generated/modules/traveldroid/apps/kitty.nix

+

This file sets up Kitty terminal

@@ -1043,9 +1044,9 @@ in
-
-

generated/modules/traveldroid/apps/starship.nix

-
+
+

generated/modules/traveldroid/apps/starship.nix

+

This file sets up starship prompt

@@ -1084,9 +1085,9 @@ in
-
-

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

@@ -1127,9 +1128,9 @@ in
-
-

generated/modules/traveldroid/apps/wofi.nix

-
+
+

generated/modules/traveldroid/apps/wofi.nix

+

This is the install for Wofi, the launcher

@@ -1162,9 +1163,9 @@ in
-
-

generated/modules/traveldroid/apps/zenbrowser.nix

-
+
+

generated/modules/traveldroid/apps/zenbrowser.nix

+

This installs zen browser

@@ -1184,9 +1185,9 @@ in
-
-

generated/modules/traveldroid/apps/zsh.nix

-
+
+

generated/modules/traveldroid/apps/zsh.nix

+

This sets up the zsh in the terminal

@@ -1249,13 +1250,13 @@ in
-
-

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

@@ -1273,9 +1274,9 @@ This file installs and configures fonts
-
-

generated/modules/traveldroid/desktop/gtk.nix

-
+
+

generated/modules/traveldroid/desktop/gtk.nix

+

Setting up GTK

@@ -1301,9 +1302,9 @@ in
-
-

generated/modules/traveldroid/desktop/hyprland.nix

-
+
+

generated/modules/traveldroid/desktop/hyprland.nix

+

Setting up Hyprland

@@ -1350,9 +1351,9 @@ in
-
-

generated/modules/traveldroid/desktop/stylix.nix

-
+
+

generated/modules/traveldroid/desktop/stylix.nix

+
{ lib, config, pkgs, flakeRoot, stylix, ... }:
 
@@ -1439,9 +1440,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/wallpaper.nix

-
+
+

generated/modules/traveldroid/desktop/wallpaper.nix

+

Setting up wallpaper engine + wallpaper gui

@@ -1540,9 +1541,9 @@ in
-
-

generated/modules/traveldroid/desktop/waybar.nix

-
+
+

generated/modules/traveldroid/desktop/waybar.nix

+

This file installs and configures waybar

@@ -1608,9 +1609,9 @@ in
-
-

generated/modules/traveldroid/desktop/wayland.nix

-
+
+

generated/modules/traveldroid/desktop/wayland.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1640,9 +1641,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/xdg.nix

-
+
+

generated/modules/traveldroid/desktop/xdg.nix

+

This sets the XDG implementation

@@ -1696,13 +1697,13 @@ in
-
-

generated/modules/traveldroid/system

-
+
+

generated/modules/traveldroid/system

+
-
-

generated/modules/traveldroid/system/audio.nix

-
+
+

generated/modules/traveldroid/system/audio.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1720,9 +1721,9 @@ in
 
-
-

generated/modules/traveldroid/system/base-colors.nix

-
+
+

generated/modules/traveldroid/system/base-colors.nix

+
{ config, pkgs, flakeRoot, ... }:
 let
@@ -1744,9 +1745,9 @@ in
 
-
-

generated/modules/traveldroid/system/bluetooth.nix

-
+
+

generated/modules/traveldroid/system/bluetooth.nix

+
{ lib, config, pkgs, home-manager, ... }:
 
@@ -1767,26 +1768,40 @@ in
 
-
-

generated/modules/traveldroid/system/copy_scripts.nix

-
+
+

generated/modules/traveldroid/system/copy_scripts.nix

+
{ lib, config, pkgs, flakeRoot, ... }:
-
 let
   username = config.defaultUser or "henrov";
   scriptsPath = flakeRoot + "/generated/.config/scripts";
+
+  # Get all files in the scripts directory recursively
+  scriptFiles = lib.filesystem.listFilesRecursive scriptsPath;
+
+  # Convert a file path to a relative string like ".config/scripts/foo.sh"
+  toRelative = file:
+    let
+      fullStr = toString file;
+      baseStr = toString (flakeRoot + "/generated/");
+    in
+      lib.removePrefix baseStr fullStr;
+
+  # Build the attrset entry for each file
+  toFileEntry = file: {
+    name = toRelative file;
+    value = {
+      text = builtins.readFile file;
+      executable = true;
+      force = true;
+    };
+  };
 in
 {
   home-manager.users = {
     ${username} = {
-      home.file = {
-        ".config/scripts/update.sh" = {
-          text = builtins.readFile (flakeRoot + "/generated/.config/scripts/update.sh");
-          executable = true;
-          force = true;
-        };
-      };
+      home.file = builtins.listToAttrs (map toFileEntry scriptFiles);
     };
   };
 }
@@ -1794,9 +1809,9 @@ in
 
-
-

generated/modules/traveldroid/system/dbus.nix

-
+
+

generated/modules/traveldroid/system/dbus.nix

+

This sets the dbus implementation

@@ -1823,9 +1838,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/gnome-keyring.nix

-
+
+

generated/modules/traveldroid/system/gnome-keyring.nix

+

This sets the dbus implementation

@@ -1873,9 +1888,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

@@ -1929,9 +1944,9 @@ in
-
-

generated/modules/traveldroid/system/networking.nix

-
+
+

generated/modules/traveldroid/system/networking.nix

+

This sets the networking.

@@ -1994,9 +2009,9 @@ This sets the networking.
-
-

generated/modules/traveldroid/system/nix.nix

-
+
+

generated/modules/traveldroid/system/nix.nix

+
{ lib, config, ... }:
 
@@ -2012,9 +2027,9 @@ This sets the networking.
 
-
-

generated/modules/traveldroid/system/printing.nix

-
+
+

generated/modules/traveldroid/system/printing.nix

+

This sets the dbus implementation

@@ -2039,13 +2054,13 @@ This sets the dbus implementation
-
-

generated/users

-
+
+

generated/users

+
-
-

generated/users/

-
+
+

generated/users/

+

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

@@ -2107,9 +2122,9 @@ in

These are all the prepared config files

-
-

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

-
+
+

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

+

This contaions emacs

@@ -2210,9 +2225,9 @@ package-archive-priorities '(("gnu" . 99)
-
-

generated/.config/emacs/init.el

-
+
+

generated/.config/emacs/init.el

+

This contaions emacs

@@ -2622,9 +2637,9 @@ the top of the file."
-
-

generated/.config/hypr/animations.conf

-
+
+

generated/.config/hypr/animations.conf

+

These are config files for .config/hypr

@@ -2645,9 +2660,9 @@ animations {
-
-

generated/.config/hypr/behaviour.conf

-
+
+

generated/.config/hypr/behaviour.conf

+

These are config files for .config/hypr

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

generated/.config/hypr/bindings.conf

-
+
+

generated/.config/hypr/bindings.conf

+

These are config files for .config/hypr

@@ -2825,9 +2840,9 @@ bind = $mainMod, U, exec, kitty -e bash -lc "$HOME/.config/scripts/update.sh"
-
-

generated/.config/hypr/exec-once.conf

-
+
+

generated/.config/hypr/exec-once.conf

+

These are config files for .config/hypr

@@ -2846,9 +2861,9 @@ exec-once = nextcloud --background
-
-

generated/.config/hypr/hypridle.conf

-
+
+

generated/.config/hypr/hypridle.conf

+

These are config files for .config/hypr

@@ -2873,9 +2888,9 @@ listener {
-
-

generated/.config/hypr/hyprland.conf

-
+
+

generated/.config/hypr/hyprland.conf

+

These are config files for .config/hypr

@@ -2921,9 +2936,9 @@ misc {
-
-

generated/.config/hypr/hyprlock.conf

-
+
+

generated/.config/hypr/hyprlock.conf

+

These are config files for .config/hypr

@@ -2964,9 +2979,9 @@ label {
-
-

generated/.config/hypr/layer-rules.conf

-
+
+

generated/.config/hypr/layer-rules.conf

+

These are config files for .config/hypr

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

generated/.config/hypr/layout.conf

-
+
+

generated/.config/hypr/layout.conf

+

These are config files for .config/hypr

@@ -2993,9 +3008,9 @@ These are config files for .config/hypr
-
-

generated/.config/hypr/monitor-rules.conf

-
+
+

generated/.config/hypr/monitor-rules.conf

+

These are config files for .config/hypr

@@ -3006,9 +3021,9 @@ monitor=DP-1,3840x1080@144,1920x0,1
-
-

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

-
+
+

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

+

These are config files for .config/hypr/scripts

@@ -3051,9 +3066,9 @@ hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000
-
-

generated/.config/hypr/theming.css

-
+
+

generated/.config/hypr/theming.css

+

These are config files for .config/hypr

@@ -3102,9 +3117,9 @@ decoration {
-
-

generated/.config/hypr/window-rules.conf

-
+
+

generated/.config/hypr/window-rules.conf

+

These are config files for .config/hypr

@@ -3142,9 +3157,9 @@ windowrule {
-
-

generated/.config/hypr/workspace-rules.conf

-
+
+

generated/.config/hypr/workspace-rules.conf

+

These are config files for .config/hypr

@@ -3169,9 +3184,68 @@ workspace = 10
-
-

generated/.config/scripts/update.sh

-
+
+

generated/.config/scripts/power.sh

+
+

+A file containing color variables +

+
+
#!/usr/bin/env bash
+#
+# Launch a power menu
+#
+# Requires fzf and systemd (loginctl, systemctl)
+#
+# Author:  Jesse Mirabel <sejjymvm@gmail.com>
+# Date:    August 19, 2025
+# License: MIT
+
+main() {
+        local list=(
+                "Lock"
+                "Shutdown"
+                "Reboot"
+                "Logout"
+                "Hibernate"
+                "Suspend"
+        )
+
+        local options=(
+                "--border=sharp"
+                "--border-label= Power Menu "
+                "--cycle"
+                "--ghost=Search"
+                "--height=~100%"
+                "--highlight-line"
+                "--info=inline-right"
+                "--pointer="
+                "--reverse"
+        )
+
+        local selected
+        selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}")
+
+        case $selected in
+                Lock)      loginctl lock-session ;;
+                Shutdown)  systemctl poweroff ;;
+                Reboot)    systemctl reboot ;;
+                Logout)    loginctl terminate-session "$XDG_SESSION_ID" ;;
+                Hibernate) systemctl hibernate ;;
+                Suspend)   systemctl suspend ;;
+                *)         return 1 ;;
+        esac
+}
+
+main
+
+
+
+
+
+
+

generated/.config/scripts/update.sh

+

A file containing color variables

@@ -3191,9 +3265,9 @@ flatpak update -y
-
-

generated/.config/shared/colors.css

-
+
+

generated/.config/shared/colors.css

+

A file containing color variables

@@ -3233,9 +3307,9 @@ A file containing color variables
-
-

generated/.config/starship.toml

-
+
+

generated/.config/starship.toml

+

These are config files for Starship

@@ -3523,9 +3597,9 @@ crust = "#181926"
-
-

generated/.config/stylix/stylix.conf

-
+
+

generated/.config/stylix/stylix.conf

+

These are config files for .config/stylix

@@ -3562,9 +3636,9 @@ icons = {
-
-

generated/.config/stylix/palette.json

-
+
+

generated/.config/stylix/palette.json

+

These are config files for .config/stylix

@@ -3594,9 +3668,9 @@ These are config files for .config/stylix
-
-

generated/.config/stylix/palette.html

-
+
+

generated/.config/stylix/palette.html

+

These are config files for .config/stylix

@@ -3674,9 +3748,9 @@ These are config files for .config/stylix
-
-

generated/.config/waybar/config

-
+
+

generated/.config/waybar/config

+

These are config files for waybar

@@ -3825,7 +3899,7 @@ These are config files for waybar // "max-length": // "align": // "justify": - "on-click": "kitty -e ~/.config/waybar/scripts/power", + "on-click": "kitty -e ~/.config/scripts/power", // "on-click-middle": // "on-click-right": // "on-update": @@ -3927,9 +4001,9 @@ These are config files for waybar
-
-

generated/.config/waybar/style.css

-
+
+

generated/.config/waybar/style.css

+

This file contains all css for waybar

@@ -4122,9 +4196,9 @@ activeworkspaces:not(.active) {
-
-

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

-
+
+

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

+

These are config files for waybar

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

generated/.config/waybar/scripts/hypr-workspaces.sh

-
+
+

generated/.config/waybar/scripts/hypr-workspaces.sh

+

These are config files for waybar

@@ -4182,9 +4256,9 @@ jq -c -n \
-
-

generated/.config/waybar/scripts/hypr-workspacesmenu.sh

-
+
+

generated/.config/waybar/scripts/hypr-workspacesmenu.sh

+

These are config files for waybar

@@ -4201,9 +4275,9 @@ hyprctl dispatch focuswindow address:$addr
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for waypaper

@@ -4240,9 +4314,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for .config/waypaper

@@ -4278,9 +4352,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/wofi/config

-
+
+

generated/.config/wofi/config

+

These are config files for .config/wofi

@@ -4329,9 +4403,9 @@ prompt = > ...
-
-

generated/.config/wofi/style.css

-
+
+

generated/.config/wofi/style.css

+

These are config files for .config/wofi

@@ -4426,9 +4500,9 @@ These are config files for .config/wofi
-
-

generated/.config/zed/settings.json

-
+
+

generated/.config/zed/settings.json

+

These are config files for Zed editor

@@ -4464,9 +4538,9 @@ These are config files for Zed editor
-
-

generated/.config/zsh/.zshrc

-
+
+

generated/.config/zsh/.zshrc

+

This sets up the zsh in the terminal

@@ -4491,7 +4565,7 @@ fi

Author: Henro Veijer

-

Created: 2026-04-11 za 09:46

+

Created: 2026-04-11 za 09:55

Validate

diff --git a/Droidnix/README.org b/Droidnix/README.org index f5d11016a..0b2bdabc5 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -1277,21 +1277,35 @@ in ** =generated/modules/traveldroid/system/copy_scripts.nix= #+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/copy_scripts.nix :noweb yes :mkdirp yes :eval never { lib, config, pkgs, flakeRoot, ... }: - let username = config.defaultUser or "henrov"; scriptsPath = flakeRoot + "/generated/.config/scripts"; + + # Get all files in the scripts directory recursively + scriptFiles = lib.filesystem.listFilesRecursive scriptsPath; + + # Convert a file path to a relative string like ".config/scripts/foo.sh" + toRelative = file: + let + fullStr = toString file; + baseStr = toString (flakeRoot + "/generated/"); + in + lib.removePrefix baseStr fullStr; + + # Build the attrset entry for each file + toFileEntry = file: { + name = toRelative file; + value = { + text = builtins.readFile file; + executable = true; + force = true; + }; + }; in { home-manager.users = { ${username} = { - home.file = { - ".config/scripts/update.sh" = { - text = builtins.readFile (flakeRoot + "/generated/.config/scripts/update.sh"); - executable = true; - force = true; - }; - }; + home.file = builtins.listToAttrs (map toFileEntry scriptFiles); }; }; } @@ -2535,6 +2549,59 @@ workspace = 9 workspace = 10 #+END_SRC +** =generated/.config/scripts/power.sh= +A file containing color variables +#+BEGIN_SRC sh :tangle generated/.config/scripts/power.sh :noweb yes :mkdirp yes :eval never +#!/usr/bin/env bash +# +# Launch a power menu +# +# Requires fzf and systemd (loginctl, systemctl) +# +# Author: Jesse Mirabel +# Date: August 19, 2025 +# License: MIT + +main() { + local list=( + "Lock" + "Shutdown" + "Reboot" + "Logout" + "Hibernate" + "Suspend" + ) + + local options=( + "--border=sharp" + "--border-label= Power Menu " + "--cycle" + "--ghost=Search" + "--height=~100%" + "--highlight-line" + "--info=inline-right" + "--pointer=" + "--reverse" + ) + + local selected + selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}") + + case $selected in + Lock) loginctl lock-session ;; + Shutdown) systemctl poweroff ;; + Reboot) systemctl reboot ;; + Logout) loginctl terminate-session "$XDG_SESSION_ID" ;; + Hibernate) systemctl hibernate ;; + Suspend) systemctl suspend ;; + *) return 1 ;; + esac +} + +main + +#+END_SRC + ** =generated/.config/scripts/update.sh= A file containing color variables #+BEGIN_SRC sh :tangle generated/.config/scripts/update.sh :noweb yes :mkdirp yes :eval never @@ -3151,7 +3218,7 @@ These are config files for waybar // "max-length": // "align": // "justify": - "on-click": "kitty -e ~/.config/waybar/scripts/power", + "on-click": "kitty -e ~/.config/scripts/power", // "on-click-middle": // "on-click-right": // "on-update": diff --git a/Droidnix/generated/.config/scripts/power.sh b/Droidnix/generated/.config/scripts/power.sh new file mode 100644 index 000000000..e10a39ecb --- /dev/null +++ b/Droidnix/generated/.config/scripts/power.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# +# Launch a power menu +# +# Requires fzf and systemd (loginctl, systemctl) +# +# Author: Jesse Mirabel +# Date: August 19, 2025 +# License: MIT + +main() { + local list=( + "Lock" + "Shutdown" + "Reboot" + "Logout" + "Hibernate" + "Suspend" + ) + + local options=( + "--border=sharp" + "--border-label= Power Menu " + "--cycle" + "--ghost=Search" + "--height=~100%" + "--highlight-line" + "--info=inline-right" + "--pointer=" + "--reverse" + ) + + local selected + selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}") + + case $selected in + Lock) loginctl lock-session ;; + Shutdown) systemctl poweroff ;; + Reboot) systemctl reboot ;; + Logout) loginctl terminate-session "$XDG_SESSION_ID" ;; + Hibernate) systemctl hibernate ;; + Suspend) systemctl suspend ;; + *) return 1 ;; + esac +} + +main diff --git a/Droidnix/generated/.config/waybar/config b/Droidnix/generated/.config/waybar/config index 47e3c8d17..3eced3779 100644 --- a/Droidnix/generated/.config/waybar/config +++ b/Droidnix/generated/.config/waybar/config @@ -142,7 +142,7 @@ // "max-length": // "align": // "justify": - "on-click": "kitty -e ~/.config/waybar/scripts/power", + "on-click": "kitty -e ~/.config/scripts/power", // "on-click-middle": // "on-click-right": // "on-update": diff --git a/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix b/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix index 21b2cef6a..5986525aa 100644 --- a/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix +++ b/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix @@ -1,19 +1,33 @@ { lib, config, pkgs, flakeRoot, ... }: - let username = config.defaultUser or "henrov"; scriptsPath = flakeRoot + "/generated/.config/scripts"; + + # Get all files in the scripts directory recursively + scriptFiles = lib.filesystem.listFilesRecursive scriptsPath; + + # Convert a file path to a relative string like ".config/scripts/foo.sh" + toRelative = file: + let + fullStr = toString file; + baseStr = toString (flakeRoot + "/generated/"); + in + lib.removePrefix baseStr fullStr; + + # Build the attrset entry for each file + toFileEntry = file: { + name = toRelative file; + value = { + text = builtins.readFile file; + executable = true; + force = true; + }; + }; in { home-manager.users = { ${username} = { - home.file = { - ".config/scripts/update.sh" = { - text = builtins.readFile (flakeRoot + "/generated/.config/scripts/update.sh"); - executable = true; - force = true; - }; - }; + home.file = builtins.listToAttrs (map toFileEntry scriptFiles); }; }; }