Files
nixos_stuff/Droidnix

Droidnix: A Dendritic NixOS + Home Manager Configuration NixOS Configuration Structure

Introduction   intro

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:

Core
Hyprland
Mangowc

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:

  1. .assets/: Static, non-generated files (e.g., configs, scripts, themes).
  2. Generated folders (common, hyprland, mangowc): NixOS and Home Manager configurations, generated from Org files.

Root Level

  • flake.nix is the entry point and imports:

    • generated/system/
    • generated/hyprland/
    • generated/mangowc/
    • Machine-specific configurations from assets/machines/

Generated Structure

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

System (generated/system/)

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

Applications (applications/)

  • file_management/: Configurations for file managers and storage solutions.
  • gaming/: Settings for gaming-related software.
  • office_productivity/: Configurations for office software.
  • media_playback_editing/: Settings for media playback and editing software.
  • terminal_shell/: Configurations for terminal emulators and shells.

Development (development/)

  • databases/: Settings for local databases.
  • devops_ci_cd/: Configurations for DevOps tools.
  • programming_languages/: Settings for programming languages and their runtimes.
  • virtualization/: Configurations for virtualization and containerization tools.
  • web_development/: Settings for web development.

System Management (system_management/)

  • backups/: Settings for backup software.
  • bluetooth/: Configurations for Bluetooth devices and services.
  • power_management/: Settings for power management.
  • audio/: Configurations for audio.
  • hardware_sensors/: Settings for hardware monitoring.
  • logging_monitoring/: Configurations for system logging and monitoring.
  • login_manager/: Settings for the login manager.
  • monitor_setup/: Configurations for display settings.
  • networking/: Settings for networking.
  • printers_scanners/: Configurations for printers and scanners.
  • disk_management/: Settings for disk management.
  • security/: Security-related configurations.
  • system_updates/: Settings for system updates and package management.

Hyprland (generated/hyprland/)

This directory contains configurations specific to Hyprland.

  • animations_effects/: Settings for window animations and visual effects.
  • decorations/: Configurations for window decorations.
  • keyboard_binds/: Keyboard shortcuts for Hyprland.
  • notifications/: Settings for notifications.
  • statusbar_tray/: Configurations for the status bar and system tray.
  • task_launcher/: Settings for task launchers.
  • task_window_workspace_switcher/: Configurations for switching between windows and workspaces.
  • window_rules/: Rules for window behavior.

MangoWC (generated/mangowc/)

This directory contains configurations specific to MangoWC.

  • animations_effects/: Settings for animations and effects in MangoWC.
  • decorations/: Configurations for window decorations.
  • keyboard_binds/: Keyboard shortcuts for MangoWC.
  • notifications/: Settings for notifications.
  • statusbar_tray/: Configurations for the status bar and system tray.
  • task_launcher/: Settings for task launchers.
  • task_window_workspace_switcher/: Configurations for switching between windows and workspaces.
  • window_rules/: Rules for window behavior.

File Structure and Imports

  • Every default.nix file imports all .nix files in its directory.
  • Machine-specific configurations are stored in assets/machines/.
  • Themes and overrides are modular and reusable across setups.

Design Principles

  • Modularity: Each component is self-contained and reusable.
  • Consistency: Every directory follows the same import pattern.
  • Scalability: Easy to add new machines or configurations.
.
├── assets
│   ├── common
│   │   ├── conf
│   │   │   └── base.conf
│   │   ├── cursors
│   │   │   └── Bibata_Cursor-main
│   │   ├── emacs
│   │   │   └── setup_emacs.sh
│   │   ├── icons
│   │   │   └── papirus-icon-theme-master
│   │   ├── neovim
│   │   │   └── setup_nvim_literate_nixos.sh
│   │   ├── nixos_conf
│   │   │   └── wallpaperstuff
│   │   │       ├── pictures
│   │   │       └── videos
│   │   ├── scripts
│   │   │   ├── copy_stuff.sh
│   │   │   └── end_script.sh
│   │   └── themes
│   │       └── Catppuccin-Mocha-Standard-Blue-Dark
│   ├── copy_stuff
│   │   ├── Droidnix
│   │   │   ├── hypr
│   │   │   │   ├── conf.d
│   │   │   │   └── scripts
│   │   │   └── wallpaperstuff
│   │   │       ├── pictures
│   │   │       └── videos
│   │   └── kitty
│   │       ├── kitty.conf
│   │       └── themes
│   │           └── Catppuccin-Mocha.conf
│   ├── hyprland
│   │   ├── conf
│   │   ├── scripts
│   │   └── themes
│   ├── machines
│   │   ├── maindroid
│   │   └── traveldroid
│   │       ├── configuration.nix
│   │       ├── hardware-configuration.nix
│   │       └── home.nix
│   └── mangowc
│       ├── conf
│       ├── scripts
│       └── themes
├── generated
│   ├── hyprland
│   │   ├── animations_effects
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── decorations
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── keyboard_binds
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── notifications
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── statusbar_tray
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── task_launcher
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── task_window_workspace_switcher
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   └── window_rules
│   │       ├── default.nix
│   │       └── placeholder.nix
│   ├── mangowc
│   │   ├── animations_effects
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── decorations
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── keyboard_binds
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── notifications
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── statusbar_tray
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── task_launcher
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   ├── task_window_workspace_switcher
│   │   │   ├── default.nix
│   │   │   └── placeholder.nix
│   │   └── window_rules
│   │       ├── default.nix
│   │       └── placeholder.nix
│   └── system
│       ├── applications
│       │   ├── file_management
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   ├── gaming
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   ├── office_productivity
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   ├── media_playback_editing
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   ├── terminal_shell
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   └── accessibility
│       │       ├── default.nix
│       │       └── placeholder.nix
│       ├── development
│       │   ├── databases
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   ├── devops_ci_cd
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   ├── programming_languages
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   ├── virtualization
│       │   │   ├── default.nix
│       │   │   └── placeholder.nix
│       │   └── web_development
│       │       ├── default.nix
│       │       └── placeholder.nix
│       └── system_management
│           ├── backups
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── bluetooth
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── power_management
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── audio
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── hardware_sensors
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── logging_monitoring
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── login_manager
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── monitor_setup
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── networking
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── printers_scanners
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── disk_management
│           │   ├── default.nix
│           │   └── placeholder.nix
│           ├── security
│           │   ├── default.nix
│           │   └── placeholder.nix
│           └── system_updates
│               ├── default.nix
│               └── placeholder.nix
├── flake.nix
├── README.html
└── README.org

First Setup

  1. Clone this repository.
  2. Run the setup script: ./setup_droidnix.sh.
  3. Edit .assets/common/conf/base.conf to choose your window manager (wm = "hyprland" or wm = "mangowc").
  4. Tangle this Org file to generate Nix configurations: C-c C-v t in Emacs or use this: emacs README.org --batch -f org-babel-tangle && emacs --batch --eval "(setq org-html-htmlize-output-type nil)" README.org -f org-html-export-to-html
  5. Build and switch: sudo nixos-rebuild switch --flake .#<hostname>.

—

The Assets Folder   assets

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/

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

  • conf/base.conf: Defines the window manager choice and other global settings.
  • scripts/: System-wide scripts (e.g., utilities, helpers).

.assets/hyprland/

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

  • conf/: Hyprland configuration files (e.g., hyprland.conf).
  • themes/: Hyprland-specific theme scripts.
  • scripts/: Hyprland-specific scripts.

.assets/mangowc/

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

  • conf/: Mangowc configuration files.
  • themes/: Mangowc-specific theme scripts.
  • scripts/: Mangowc-specific scripts.

.assets/machines/

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

—

The Actual Code   code

This section contains the Org blocks for tangling Nix code into the generated folders.

flake.nix

The Nix flake definition for Droidnix.

{
  description = "Droidnix: A dendritic NixOS + Home Manager configuration";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    home-manager.url = "github:nix-community/home-manager";
  };

  outputs = { self, nixpkgs, home-manager, ... }@inputs: {
    # Your flake outputs here
  };
}

Hyprland

generated/hyprland/animations_effects/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/animations_effects/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/hyprland/decorations/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/decorations/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/hyprland/keyboard_binds/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/keyboard_binds/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/hyprland/notifications/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/notifications/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/hyprland/statusbar_tray/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/statusbar_tray/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/hyprland/task_launcher/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/task_launcher/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/hyprland/task_window_workspace_switcher/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/task_window_workspace_switcher/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/hyprland/window_rules/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/hyprland/window_rules/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

Mangowc

generated/mangowc/animations_effects/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/animations_effects/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/mangowc/decorations/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/decorations/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/mangowc/keyboard_binds/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/keyboard_binds/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/mangowc/notifications/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/notifications/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/mangowc/statusbar_tray/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/statusbar_tray/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/mangowc/task_launcher/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/task_launcher/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/mangowc/task_window_workspace_switcher/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/task_window_workspace_switcher/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/mangowc/window_rules/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/mangowc/window_rules/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

System

generated/system/applications/file_management/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/applications/file_management/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/applications/gaming/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/applications/gaming/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/applications/office_productivity/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/applications/office_productivity/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/applications/media_playback_editing/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/applications/media_playback_editing/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/applications/terminal_shell/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/applications/terminal_shell/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/applications/accessibility/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/applications/accessibility/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/development/databases/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/development/databases/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/development/devops_ci_cd/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/development/devops_ci_cd/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/development/programming_languages/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/development/programming_languages/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/development/virtualization/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/development/virtualization/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/development/web_development/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/development/web_development/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/backups/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/backups/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/bluetooth/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/bluetooth/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/power_management/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/power_management/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/audio/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/audio/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/hardware_sensors/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/hardware_sensors/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/logging_monitoring/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/logging_monitoring/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/login_manager/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/login_manager/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/monitor_setup/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/monitor_setup/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/networking/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/networking/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/printers_scanners/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/printers_scanners/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/disk_management/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/disk_management/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/security/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/security/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}

generated/system/system_management/system_updates/default.nix

{ lib, config, pkgs, ... }:
{
  imports = [ ./placeholder.nix ];
}

generated/system/system_management/system_updates/placeholder.nix

{ pkgs, user, ... }:
{
  # Your configurations here
}