system in a logical and consistent way.
Droidnix: A Dendritic NixOS + Home Manager Configuration
- Table of Contents
- Introduction
- The Assets Folder
- The Actual Code
flake.nixgenerated/common/nixos/hardware/default.nixgenerated/common/nixos/hardware/placeholder.nixgenerated/common/nixos/packages/default.nixgenerated/common/nixos/packages/placeholder.nixgenerated/common/nixos/packages/default.nixgenerated/common/nixos/packages/placeholder.nixgenerated/common/nixos/security/default.nixgenerated/common/nixos/security/placeholder.nixgenerated/common/nixos/services/default.nixgenerated/common/nixos/services/placeholder.nixgenerated/common/nixos/users/default.nixgenerated/common/nixos/users/placeholder.nixgenerated/common/home-manager/programs/default.nixgenerated/common/home-manager/programs/placeholder.nixgenerated/common/home-manager/shell/default.nixgenerated/common/home-manager/shell/placeholder.nixgenerated/common/home-manager/starship/default.nixgenerated/common/home-manager/starship/placeholder.nixgenerated/common/templates/default.nixgenerated/common/templates/placeholder.nixgenerated/common/themes/fonts/default.nixgenerated/common/themes/fonts/placeholder.nixgenerated/common/themes/gtk/default.nixgenerated/common/themes/gtk/placeholder.nixgenerated/common/themes/icons/default.nixgenerated/common/themes/icons/placeholder.nixgenerated/common/themes/shells/default.nixgenerated/common/themes/shells/placeholder.nixgenerated/hyprland/nixos/window-manager/default.nixgenerated/hyprland/nixos/window-manager/placeholder.nixgenerated/hyprland/nixos/plugins/default.nixgenerated/hyprland/nixos/plugins/placeholder.nixgenerated/hyprland/home-manager/programs/default.nixgenerated/hyprland/home-manager/programs/placeholder.nixgenerated/hyprland/home-manager/scripts/default.nixgenerated/hyprland/home-manager/scripts/placeholder.nixgenerated/hyprland/themes/hypr/default.nixgenerated/hyprland/themes/hypr/placeholder.nixgenerated/hyprland/themes/rofi/default.nixgenerated/hyprland/themes/rofi/placeholder.nixgenerated/hyprland/themes/waybar/default.nixgenerated/hyprland/themes/waybar/placeholder.nixgenerated/hyprland/overrides/default.nixgenerated/hyprland/overrides/placeholder.nixgenerated/mangowc/nixos/window-manager/default.nixgenerated/mangowc/nixos/window-manager/placeholder.nixgenerated/mangowc/nixos/plugins/default.nixgenerated/mangowc/nixos/plugins/placeholder.nixgenerated/mangowc/home-manager/programs/default.nixgenerated/mangowc/home-manager/programs/placeholder.nixgenerated/mangowc/home-manager/scripts/default.nixgenerated/mangowc/home-manager/scripts/placeholder.nixgenerated/mangowc/themes/waybar/default.nixgenerated/mangowc/themes/waybar/placeholder.nixgenerated/mangowc/themes/wofi/default.nixgenerated/mangowc/themes/wofi/placeholder.nixgenerated/mangowc/overrides/default.nixgenerated/mangowc/overrides/placeholder.nix
Table of Contents
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
Mangowv
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:
.assets/: Static, non-generated files (e.g., configs, scripts, themes).- Generated folders (
common,hyprland,mangowc): NixOS and Home Manager configurations, generated from Org files.
Root Level
-
flake.nixis the entry point and imports:generated/common/nixos/default.nixgenerated/hyprland/nixos/default.nixgenerated/mangowc/nixos/default.nix- Machine-specific configurations from
assets/machines/
Common Configuration (generated/common/)
-
nixos/default.nixaggregates all NixOS modules:hardware/hardware.nixpackages/packages.nixsecurity/security.nixservices/services.nixusers/users.nix
-
home-manager/default.nixaggregates Home Manager modules:programs/programs.nixshell/shell.nixstarship/starship.nix
-
themes/default.nixaggregates theme modules:fonts/fonts.nixgtk/gtk.nixicons/icons.nixshells/shells.nix
Hyprland Configuration (generated/hyprland/)
-
nixos/default.niximports:plugins/plugins.nixwindow-manager/window-manager.nix
-
home-manager/default.niximports:programs/programs.nixscripts/scripts.nix
-
themes/default.niximports:hypr/hypr.nixrofi/rofi.nixwaybar/waybar.nix
-
overrides/default.niximports:overrides/overrides.nix
MangoWC Configuration (generated/mangowc/)
-
nixos/default.niximports:plugins/plugins.nixwindow-manager/window-manager.nix
-
home-manager/default.niximports:programs/programs.nixscripts/scripts.nix
-
themes/default.niximports:mangowc/mangowc.nixwaybar/waybar.nixwofi/wofi.nix
-
overrides/default.niximports:overrides/overrides.nix
File Structure and Imports
- Every
default.nixfile imports all.nixfiles 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.
tree --noreport -P "*.nix" -I "*.nix~" --dirsfirst
. ├── 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 ├── flake.nix ├── generated/ │ ├── common/ # Shared modules (e.g., firewall, starship, themes) │ │ ├── firewall/ # Dendritic module: NixOS + Home Manager for firewall │ │ │ ├── default.nix │ │ │ └── README.md │ │ ├── starship/ # Dendritic module: Starship prompt │ │ │ ├── default.nix │ │ │ └── README.md │ │ ├── themes/ # Shared themes (fonts, icons, etc.) │ │ │ ├── fonts/ │ │ │ │ └── default.nix │ │ │ ├── gtk/ │ │ │ │ └── default.nix │ │ │ └── icons/ │ │ │ └── default.nix │ │ └── ... # Other shared modules │ ├── hyprland/ # Hyprland-specific modules │ │ ├── hyprland/ # Dendritic module: Hyprland WM + plugins │ │ │ ├── default.nix │ │ │ └── README.md │ │ ├── waybar/ # Dendritic module: Waybar config │ │ │ ├── default.nix │ │ │ └── README.md │ │ ├── rofi/ │ │ │ ├── default.nix │ │ │ └── README.md │ │ └── ... # Other Hyprland-related modules │ └── mangowc/ # Mangowc-specific modules │ ├── mangowc/ # Dendritic module: Mangowc WM + plugins │ │ ├── default.nix │ │ └── README.md │ └── waybar/ │ ├── default.nix │ └── README.md ├── README.org # Literate documentation for all modules └── flake.nix # Main flake: imports modules from common/hyprland/mangowc
First Setup
- Clone this repository.
- Run the setup script:
./setup_droidnix.sh. - Edit
.assets/common/conf/base.confto choose your window manager (wm = "hyprland"orwm = "mangowc"). - Tangle this Org file to generate Nix configurations:
C-c C-v tin 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 - 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
};
}
generated/common/nixos/hardware/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/nixos/hardware/placeholder.nix
This is a placeholder for the description of generated/common/nixos/hardware/placeholder.nix.
{ pkgs, user, ... }:
{
# Your hardware configurations here
}
generated/common/nixos/packages/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/nixos/packages/placeholder.nix
This is a placeholder for the description of generated/common/nixos/packages/placeholder.nix.
{ pkgs, user, ... }:
{
# Your package configurations here
}
generated/common/nixos/packages/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/nixos/packages/placeholder.nix
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/nixos/security/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/nixos/security/placeholder.nix
This is a placeholder for the description of generated/common/nixos/security/placeholder.nix.
{ pkgs, user, ... }:
{
# Your security configurations here
}
generated/common/nixos/services/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/nixos/services/placeholder.nix
This is a placeholder for the description of generated/common/nixos/services/placeholder.nix.
{ pkgs, user, ... }:
{
# Your service configurations here
}
generated/common/nixos/users/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/nixos/users/placeholder.nix
This is a placeholder for the description of generated/common/nixos/users/placeholder.nix.
{ pkgs, user, ... }:
{
# Your user configurations here
}
generated/common/home-manager/programs/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/home-manager/programs/placeholder.nix
This is a placeholder for the description of generated/common/home-manager/programs/placeholder.nix.
{ pkgs, user, ... }:
{
# Your program configurations here
}
generated/common/home-manager/shell/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/home-manager/shell/placeholder.nix
This is a placeholder for the description of generated/common/home-manager/shell/placeholder.nix.
{ pkgs, user, ... }:
{
# Your shell configurations here
}
generated/common/home-manager/starship/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/home-manager/starship/placeholder.nix
This is a placeholder for the description of generated/common/home-manager/starship/placeholder.nix.
{ pkgs, user, ... }:
{
# Your starship configurations here
}
generated/common/templates/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/templates/placeholder.nix
This is a placeholder for the description of generated/common/templates/placeholder.nix.
{ pkgs, user, ... }:
{
# Your template configurations here
}
generated/common/themes/fonts/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/themes/fonts/placeholder.nix
This is a placeholder for the description of generated/common/themes/fonts/placeholder.nix.
{ pkgs, user, ... }:
{
# Your font configurations here
}
generated/common/themes/gtk/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/themes/gtk/placeholder.nix
This is a placeholder for the description of generated/common/themes/gtk/placeholder.nix.
{ pkgs, user, ... }:
{
# Your GTK theme configurations here
}
generated/common/themes/icons/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/themes/icons/placeholder.nix
This is a placeholder for the description of generated/common/themes/icons/placeholder.nix.
{ pkgs, user, ... }:
{
# Your icon configurations here
}
generated/common/themes/shells/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/common/themes/shells/placeholder.nix
This is a placeholder for the description of generated/common/themes/shells/placeholder.nix.
{ pkgs, user, ... }:
{
# Your shell theme configurations here
}
generated/hyprland/nixos/window-manager/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/nixos/window-manager/placeholder.nix
This is a placeholder for the description of generated/hyprland/nixos/window-manager/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Hyprland window manager configurations here
}
generated/hyprland/nixos/plugins/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/nixos/plugins/placeholder.nix
This is a placeholder for the description of generated/hyprland/nixos/plugins/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Hyprland plugin configurations here
}
generated/hyprland/home-manager/programs/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/home-manager/programs/placeholder.nix
This is a placeholder for the description of generated/hyprland/home-manager/programs/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Hyprland program configurations here
}
generated/hyprland/home-manager/scripts/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/home-manager/scripts/placeholder.nix
This is a placeholder for the description of generated/hyprland/home-manager/scripts/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Hyprland script configurations here
}
generated/hyprland/themes/hypr/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/themes/hypr/placeholder.nix
This is a placeholder for the description of generated/hyprland/themes/hypr/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Hyprland theme configurations here
}
generated/hyprland/themes/rofi/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/themes/rofi/placeholder.nix
This is a placeholder for the description of generated/hyprland/themes/rofi/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Rofi theme configurations here
}
generated/hyprland/themes/waybar/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/themes/waybar/placeholder.nix
This is a placeholder for the description of generated/hyprland/themes/waybar/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Waybar theme configurations here
}
generated/hyprland/overrides/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/hyprland/overrides/placeholder.nix
This is a placeholder for the description of generated/hyprland/overrides/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Hyprland overrides here
}
generated/mangowc/nixos/window-manager/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/mangowc/nixos/window-manager/placeholder.nix
This is a placeholder for the description of generated/mangowc/nixos/window-manager/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Mangowc window manager configurations here
}
generated/mangowc/nixos/plugins/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/mangowc/nixos/plugins/placeholder.nix
This is a placeholder for the description of generated/mangowc/nixos/plugins/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Mangowc plugin configurations here
}
generated/mangowc/home-manager/programs/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/mangowc/home-manager/programs/placeholder.nix
This is a placeholder for the description of generated/mangowc/home-manager/programs/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Mangowc program configurations here
}
generated/mangowc/home-manager/scripts/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/mangowc/home-manager/scripts/placeholder.nix
This is a placeholder for the description of generated/mangowc/home-manager/scripts/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Mangowc script configurations here
}
generated/mangowc/themes/waybar/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/mangowc/themes/waybar/placeholder.nix
This is a placeholder for the description of generated/mangowc/themes/waybar/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Waybar theme configurations here
}
generated/mangowc/themes/wofi/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/mangowc/themes/wofi/placeholder.nix
This is a placeholder for the description of generated/mangowc/themes/wofi/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Wofi theme configurations here
}
generated/mangowc/overrides/default.nix
Imports Nix files from the folders below this one
{ lib, config, pkgs, ... }:
{
imports = [ ./placeholder.nix ];
}
generated/mangowc/overrides/placeholder.nix
This is a placeholder for the description of generated/mangowc/overrides/placeholder.nix.
{ pkgs, user, ... }:
{
# Your Mangowc overrides here
}