From 4291649cf28eaa4f56b38ec5aa622dd09ce3a707 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Sat, 7 Mar 2026 23:35:04 +0100 Subject: [PATCH] Working on shell stuff --- Droidnix/README.html | 721 ++++++++++-------- Droidnix/README.org | 77 +- Droidnix/flake.lock | 614 --------------- .../applications/terminal_shell/starship.nix | 33 +- .../generated/system/core/login-lightdm.nix | 136 ---- 5 files changed, 465 insertions(+), 1116 deletions(-) delete mode 100644 Droidnix/flake.lock delete mode 100644 Droidnix/generated/system/core/login-lightdm.nix diff --git a/Droidnix/README.html b/Droidnix/README.html index 74d3a68a4..2146d4bb0 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,118 +204,118 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

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

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -377,23 +377,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.
  • @@ -403,9 +403,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.
  • @@ -415,9 +415,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.
  • @@ -436,9 +436,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.

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

MangoWC (generated/mangowc/)

-
+
+

MangoWC (generated/mangowc/)

+

This directory contains configurations specific to MangoWC.

@@ -491,7 +491,7 @@ This directory contains configurations specific to MangoWC.
  • Scalability: Easy to add new machines or configurations.
  • -
    +
     .
     ├── assets
     │   ├── common
    @@ -673,9 +673,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. @@ -697,9 +697,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/common/

    -
    +
    +

    .assets/common/

    +

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

    @@ -710,9 +710,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.

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

    .assets/mangowc/

    -
    +
    +

    .assets/mangowc/

    +

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

    @@ -738,9 +738,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).

    @@ -758,9 +758,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.

    @@ -843,13 +843,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

    @@ -865,9 +865,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.

    @@ -883,9 +883,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.

    @@ -927,9 +927,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.

    @@ -964,13 +964,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.

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

    @@ -1012,9 +1012,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.

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

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

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

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

    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

    @@ -1147,9 +1147,9 @@ 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/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

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

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

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

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

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

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

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

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

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

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

    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

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

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

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

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

    @@ -1498,9 +1498,9 @@ in
    -
    -

    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

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

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

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

    generated/mangowc/task_launcher/wofi.nix

    -
    +
    +

    generated/mangowc/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

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

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

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

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

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

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

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

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

    @@ -1740,9 +1740,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 is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

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

    generated/system/applications/terminal_shell/starship.nix

    -
    +
    +

    generated/system/applications/terminal_shell/starship.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

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

    generated/system/applications/terminal_shell/zsh.nix

    -
    +
    +

    generated/system/applications/terminal_shell/zsh.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

    @@ -1811,40 +1811,97 @@ This is top file of this level which contains just an import statement for all r user, ... }: +let + zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh"; +in { home-manager.users.${user.username} = { + # Install and enable Zsh programs.zsh = { enable = true; enableCompletion = true; - dotDir = "${config.xdg.configHome}/zsh"; # Now correct: inside Home Manager scope + dotDir = zshConfigDir; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; oh-my-zsh = { enable = true; - theme = ""; + theme = "agnoster"; # Popular minimal theme plugins = [ "git" "sudo" - "extract" - "colored-man-pages" - "command-not-found" - "history" "docker" "kubectl" + "zsh-autosuggestions" + "zsh-syntax-highlighting" + "history" + "command-not-found" + "extract" + "colored-man-pages" ]; }; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - zshoptions = [ "AUTO_CD" ]; + # Shell options (setopt) + shellAliases = { + ls = "exa --icons -a --group-directories-first"; + ll = "exa --icons -la --group-directories-first"; + grep = "grep --color=auto"; + }; }; + + # Consolidated .zshrc with best practices + xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [ + "# Enable Powerlevel10k (if installed)" + "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme" + "# Oh-My-Zsh" + "export ZSH=\"${zshConfigDir}\"" + "source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\"" + "source \"${zshConfigDir}/oh-my-zsh.sh\"" + "" + "# Zsh options" + "setopt AUTO_CD" + "setopt CORRECT" + "setopt INTERACTIVE_COMMENTS" + "setopt APPEND_HISTORY" + "setopt INC_APPEND_HISTORY" + "setopt HIST_IGNORE_ALL_DUPS" + "setopt HIST_REDUCE_BLANKS" + "setopt HIST_SAVE_NO_DUPS" + "setopt HIST_VERIFY" + "setopt SHARE_HISTORY" + "" + "# Starship prompt (if enabled)" + "eval \"$(starship init zsh)\"" + "" + "# fzf key bindings and completion" + "source \"${pkgs.fzf}/shell/key-bindings.zsh\"" + "source \"${pkgs.fzf}/shell/completion.zsh\"" + "" + "# Load direnv" + "eval \"$(direnv hook zsh)\"" + "" + "# Load nix-direnv (if using direnv with Nix)" + "if [ -f \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\" ]; then" + " source \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\"" + "fi" + "" + "# User-specific customizations" + "source \"${zshConfigDir}/custom.zsh\" 2>/dev/null" + ]; + + # Optional: User customizations (managed separately) + xdg.configFile."zsh/custom.zsh".text = '' + # Add your custom aliases, functions, and exports here + export EDITOR="nvim" + export PATH="$HOME/.local/bin:$PATH" + ''; }; } -
    -
    -

    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

    @@ -1860,9 +1917,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

    @@ -1878,9 +1935,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

    @@ -1896,9 +1953,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

    @@ -1914,9 +1971,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

    @@ -1932,9 +1989,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

    @@ -1950,9 +2007,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

    @@ -1968,9 +2025,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

    @@ -1986,9 +2043,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

    @@ -2004,9 +2061,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

    @@ -2022,9 +2079,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

    @@ -2040,9 +2097,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

    @@ -2058,9 +2115,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

    @@ -2076,9 +2133,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

    @@ -2094,9 +2151,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

    @@ -2112,9 +2169,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

    @@ -2130,9 +2187,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

    @@ -2148,9 +2205,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

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

    Author: Henro Veijer

    -

    Created: 2026-03-07 za 23:18

    +

    Created: 2026-03-07 za 23:33

    Validate

    diff --git a/Droidnix/README.org b/Droidnix/README.org index a10c61f41..7c829dfdf 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -1134,33 +1134,90 @@ This is top file of this level which contains just an import statement for all r user, ... }: +let + zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh"; +in { home-manager.users.${user.username} = { + # Install and enable Zsh programs.zsh = { enable = true; enableCompletion = true; - dotDir = "${config.xdg.configHome}/zsh"; # Now correct: inside Home Manager scope + dotDir = zshConfigDir; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; oh-my-zsh = { enable = true; - theme = ""; + theme = "agnoster"; # Popular minimal theme plugins = [ "git" "sudo" - "extract" - "colored-man-pages" - "command-not-found" - "history" "docker" "kubectl" + "zsh-autosuggestions" + "zsh-syntax-highlighting" + "history" + "command-not-found" + "extract" + "colored-man-pages" ]; }; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - zshoptions = [ "AUTO_CD" ]; + # Shell options (setopt) + shellAliases = { + ls = "exa --icons -a --group-directories-first"; + ll = "exa --icons -la --group-directories-first"; + grep = "grep --color=auto"; + }; }; + + # Consolidated .zshrc with best practices + xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [ + "# Enable Powerlevel10k (if installed)" + "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme" + "# Oh-My-Zsh" + "export ZSH=\"${zshConfigDir}\"" + "source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\"" + "source \"${zshConfigDir}/oh-my-zsh.sh\"" + "" + "# Zsh options" + "setopt AUTO_CD" + "setopt CORRECT" + "setopt INTERACTIVE_COMMENTS" + "setopt APPEND_HISTORY" + "setopt INC_APPEND_HISTORY" + "setopt HIST_IGNORE_ALL_DUPS" + "setopt HIST_REDUCE_BLANKS" + "setopt HIST_SAVE_NO_DUPS" + "setopt HIST_VERIFY" + "setopt SHARE_HISTORY" + "" + "# Starship prompt (if enabled)" + "eval \"$(starship init zsh)\"" + "" + "# fzf key bindings and completion" + "source \"${pkgs.fzf}/shell/key-bindings.zsh\"" + "source \"${pkgs.fzf}/shell/completion.zsh\"" + "" + "# Load direnv" + "eval \"$(direnv hook zsh)\"" + "" + "# Load nix-direnv (if using direnv with Nix)" + "if [ -f \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\" ]; then" + " source \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\"" + "fi" + "" + "# User-specific customizations" + "source \"${zshConfigDir}/custom.zsh\" 2>/dev/null" + ]; + + # Optional: User customizations (managed separately) + xdg.configFile."zsh/custom.zsh".text = '' + # Add your custom aliases, functions, and exports here + export EDITOR="nvim" + export PATH="$HOME/.local/bin:$PATH" + ''; }; } - #+END_SRC ** =generated/system/development/databases/top.nix= diff --git a/Droidnix/flake.lock b/Droidnix/flake.lock deleted file mode 100644 index ea5d7ddc7..000000000 --- a/Droidnix/flake.lock +++ /dev/null @@ -1,614 +0,0 @@ -{ - "nodes": { - "aquamarine": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1772292445, - "narHash": "sha256-4F1Q7U313TKUDDovCC96m/Za4wZcJ3yqtu4eSrj8lk8=", - "owner": "hyprwm", - "repo": "aquamarine", - "rev": "1dbbba659c1cef0b0202ce92cadfe13bae550e8f", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "aquamarine", - "type": "github" - } - }, - "catppuccin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772757591, - "narHash": "sha256-+DyPJcUBXOVu1YiM0mYkEtqYIB9RR0k22NoCaJJ7K2g=", - "owner": "catppuccin", - "repo": "nix", - "rev": "4910a6461a3c4d7ffa56feb4aa4945f3e953f8ec", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "nix", - "type": "github" - } - }, - "emacs-overlay": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1772818138, - "narHash": "sha256-Q/zaIhzvvjCN6/oPcOsyljP0LO0RUvB90BSuDNVYNF8=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "594ce4b67cd089110785a9c23731f61767d233d3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "emacs-overlay", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "hyprland", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772807318, - "narHash": "sha256-Qjw6ILt8cb2HQQpCmWNLMZZ63wEo1KjTQt+1BcQBr7k=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "daa2c221320809f5514edde74d0ad0193ad54ed8", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1753964049, - "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprgraphics": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1770511807, - "narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "7c75487edd43a71b61adb01cae8326d277aab683", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprgraphics", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "aquamarine": "aquamarine", - "hyprcursor": "hyprcursor", - "hyprgraphics": "hyprgraphics", - "hyprland-guiutils": "hyprland-guiutils", - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner", - "hyprwire": "hyprwire", - "nixpkgs": "nixpkgs", - "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1772833450, - "narHash": "sha256-XuuvhTD/72mH8MBncTeOyN0JzLCtwav7lkwBQlIofd4=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "4152ac76d0813d9d0f67d2f04653a13fa6e17433", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-guiutils": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprtoolkit": "hyprtoolkit", - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1767023960, - "narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=", - "owner": "hyprwm", - "repo": "hyprland-guiutils", - "rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-guiutils", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1765214753, - "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1771866172, - "narHash": "sha256-fYFoXhQLrm1rD8vSFKQBOEX4OGCuJdLt1amKfHd5GAw=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "0b219224910e7642eb0ed49f0db5ec3d008e3e41", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprtoolkit": { - "inputs": { - "aquamarine": [ - "hyprland", - "hyprland-guiutils", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprland-guiutils", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprland-guiutils", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprland-guiutils", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprland-guiutils", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "hyprland-guiutils", - "nixpkgs" - ], - "systems": [ - "hyprland", - "hyprland-guiutils", - "systems" - ] - }, - "locked": { - "lastModified": 1764592794, - "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=", - "owner": "hyprwm", - "repo": "hyprtoolkit", - "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprtoolkit", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1771271487, - "narHash": "sha256-41gEiUS0Pyw3L/ge1l8MXn61cK14VAhgWB/JV8s/oNI=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "340a792e3b3d482c4ae5f66d27a9096bdee6d76d", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1770501770, - "narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, - "hyprwire": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1771606233, - "narHash": "sha256-F3PLUqQ/TwgR70U+UeOqJnihJZ2EuunzojYC4g5xHr0=", - "owner": "hyprwm", - "repo": "hyprwire", - "rev": "06c7f1f8c4194786c8400653c4efc49dc14c0f3a", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwire", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1772198003, - "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1767313136, - "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1772624091, - "narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "80bdc1e5ce51f56b19791b52b2901187931f5353", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772024342, - "narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "root": { - "inputs": { - "catppuccin": "catppuccin", - "emacs-overlay": "emacs-overlay", - "home-manager": "home-manager", - "hyprland": "hyprland", - "nixpkgs": "nixpkgs_2", - "zen-browser": "zen-browser" - } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1761431178, - "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - }, - "zen-browser": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772685307, - "narHash": "sha256-5xthZHeqwBeXNhnRIlxnCuaZLky0SZ6vQsxtd+eqhTU=", - "owner": "youwen5", - "repo": "zen-browser-flake", - "rev": "dc92d88524ee83308795bc90f6a9f1d965265aaa", - "type": "github" - }, - "original": { - "owner": "youwen5", - "repo": "zen-browser-flake", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/Droidnix/generated/system/applications/terminal_shell/starship.nix b/Droidnix/generated/system/applications/terminal_shell/starship.nix index e0748206f..bef16c02b 100644 --- a/Droidnix/generated/system/applications/terminal_shell/starship.nix +++ b/Droidnix/generated/system/applications/terminal_shell/starship.nix @@ -7,32 +7,17 @@ }: { home-manager.users.${user.username} = { - programs.zsh = { + programs.starship = { enable = true; - enableCompletion = true; - oh-my-zsh = { - enable = true; - theme = ""; - plugins = [ - "git" - "sudo" - "extract" - "colored-man-pages" - "command-not-found" - "history" - "docker" - "kubectl" - ]; + # Starship settings (e.g., theme, modules) + settings = { + addNewline = false; + # Other settings... }; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; + # Enable Starship for specific shells + bash.enable = true; + zsh.enable = true; + fish.enable = true; }; - - # Set Zsh options (e.g., AUTO_CD) in .zshrc - xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [ - "setopt AUTO_CD" - "setopt CORRECT" - "setopt INTERACTIVE_COMMENTS" - ]; }; } diff --git a/Droidnix/generated/system/core/login-lightdm.nix b/Droidnix/generated/system/core/login-lightdm.nix deleted file mode 100644 index 8db32db88..000000000 --- a/Droidnix/generated/system/core/login-lightdm.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - lightdmConf = builtins.readFile ../../assets/conf/core/lightdm.conf; - lockPng = ../../assets/lockscreen.png; - - greeterConfPath = ../../assets/conf/core/lightdm-gtk-greeter.conf; - greeterRaw = builtins.readFile greeterConfPath; - - # Extract "key = value" from the greeter conf. - # Returns null if not found. - getIniValue = key: - let - lines = lib.splitString "\n" greeterRaw; - - # Captures the value part (group 0) from a single line. - # We match line-by-line because Nix regex does NOT support PCRE flags like (?s). - m = - let - ms = builtins.filter (x: x != null) (map (line: - builtins.match - ("^[[:space:]]*" + key + "[[:space:]]*=[[:space:]]*([^#;]+).*$") - line - ) lines); - in - if ms == [] then null else builtins.elemAt ms 0; - in - if m == null then null else lib.strings.trim (builtins.elemAt m 0); - # In your greeter.conf these are *package keys*, not theme names. - themePkgKey = getIniValue "theme-name"; - iconPkgKey = getIniValue "icon-theme-name"; - cursorPkgKey = getIniValue "cursor-theme-name"; - cursorSizeStr = getIniValue "cursor-theme-size"; - cursorSize = - if cursorSizeStr == null then null - else lib.toInt (lib.strings.trim cursorSizeStr); - # Map package-keys (from greeter.conf) -> { package, name } - # - # IMPORTANT: - # - "name" must be the real theme/icon/cursor NAME as seen under share/themes or share/icons. - # - "package" is the Nixpkgs derivation providing it. - pkgMap = { - catppuccinThemePkg = { - package = pkgs.catppuccin-gtk.override { - accents = [ "blue" ]; - variant = "mocha"; - size = "standard"; - tweaks = [ ]; - }; - name = "Catppuccin-Mocha-Standard-Blue-Dark"; - }; - - papirus-icon-theme = { - package = pkgs.papirus-icon-theme; - name = "Papirus-Dark"; - }; - - bibata-cursors = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - }; - }; - - pick = key: - if key == null then - throw "lightdm: missing required key in ${toString greeterConfPath}" - else if !(pkgMap ? "${key}") then - throw "lightdm: unknown package key '${key}' in ${toString greeterConfPath}. Known keys: ${lib.concatStringsSep ", " (builtins.attrNames pkgMap)}" - else - pkgMap."${key}"; - - themeSel = pick themePkgKey; - iconSel = pick iconPkgKey; - cursorSel = pick cursorPkgKey; - - # Rewrite greeter.conf so LightDM sees REAL names, not package keys. - # Also force background to lockPng. - greeterFixed = - '' - [greeter] - theme-name = ${themeSel.name} - icon-theme-name = ${iconSel.name} - cursor-theme-name = ${cursorSel.name} - ${lib.optionalString (cursorSize != null) "cursor-theme-size = ${toString cursorSize}"} - '' - + "\n" - + greeterRaw; -in -{ - services.greetd.enable = false; - - services.xserver = { - enable = true; - desktopManager.xterm.enable = false; - - displayManager.lightdm = { - enable = true; - background = lockPng; - - greeters.gtk = { - enable = true; - - theme = { - name = themeSel.name; - package = themeSel.package; - }; - - iconTheme = { - name = iconSel.name; - package = iconSel.package; - }; - - cursorTheme = { - name = cursorSel.name; - package = cursorSel.package; - } // lib.optionalAttrs (cursorSize != null) { - size = cursorSize; - }; - - # This includes your (rewritten) greeter config. - extraConfig = greeterFixed; - }; - - extraConfig = lightdmConf; - }; - }; - - programs.hyprland.enable = true; - - # Optional: make them available system-wide as well - environment.systemPackages = [ - themeSel.package - iconSel.package - cursorSel.package - ]; -}