Droidnix: A Dendritic NixOS + Home Manager Configuration
-Table of Contents
--
-
- Table of Contents -
- Introduction intro - - -
- The Assets Folder assets - - -
- The Actual Code code
-
-
-
flake.nix
-generated/common/nixos/hardware/default.nix
-generated/common/nixos/hardware/placeholder.nix
-generated/common/nixos/packages/default.nix
-generated/common/nixos/packages/placeholder.nix
-generated/common/nixos/packages/default.nix
-generated/common/nixos/packages/placeholder.nix
-generated/common/nixos/security/default.nix
-generated/common/nixos/security/placeholder.nix
-generated/common/nixos/services/default.nix
-generated/common/nixos/services/placeholder.nix
-generated/common/nixos/users/default.nix
-generated/common/nixos/users/placeholder.nix
-generated/common/home-manager/programs/default.nix
-generated/common/home-manager/programs/placeholder.nix
-generated/common/home-manager/shell/default.nix
-generated/common/home-manager/shell/placeholder.nix
-generated/common/home-manager/starship/default.nix
-generated/common/home-manager/starship/placeholder.nix
-generated/common/templates/default.nix
-generated/common/templates/placeholder.nix
-generated/common/themes/fonts/default.nix
-generated/common/themes/fonts/placeholder.nix
-generated/common/themes/gtk/default.nix
-generated/common/themes/gtk/placeholder.nix
-generated/common/themes/icons/default.nix
-generated/common/themes/icons/placeholder.nix
-generated/common/themes/shells/default.nix
-generated/common/themes/shells/placeholder.nix
-generated/hyprland/nixos/window-manager/default.nix
-generated/hyprland/nixos/window-manager/placeholder.nix
-generated/hyprland/nixos/plugins/default.nix
-generated/hyprland/nixos/plugins/placeholder.nix
-generated/hyprland/home-manager/programs/default.nix
-generated/hyprland/home-manager/programs/placeholder.nix
-generated/hyprland/home-manager/scripts/default.nix
-generated/hyprland/home-manager/scripts/placeholder.nix
-generated/hyprland/themes/hypr/default.nix
-generated/hyprland/themes/hypr/placeholder.nix
-generated/hyprland/themes/rofi/default.nix
-generated/hyprland/themes/rofi/placeholder.nix
-generated/hyprland/themes/waybar/default.nix
-generated/hyprland/themes/waybar/placeholder.nix
-generated/hyprland/overrides/default.nix
-generated/hyprland/overrides/placeholder.nix
-generated/mangowc/nixos/window-manager/default.nix
-generated/mangowc/nixos/window-manager/placeholder.nix
-generated/mangowc/nixos/plugins/default.nix
-generated/mangowc/nixos/plugins/placeholder.nix
-generated/mangowc/home-manager/programs/default.nix
-generated/mangowc/home-manager/programs/placeholder.nix
-generated/mangowc/home-manager/scripts/default.nix
-generated/mangowc/home-manager/scripts/placeholder.nix
-generated/mangowc/themes/waybar/default.nix
-generated/mangowc/themes/waybar/placeholder.nix
-generated/mangowc/themes/wofi/default.nix
-generated/mangowc/themes/wofi/placeholder.nix
-generated/mangowc/overrides/default.nix
-generated/mangowc/overrides/placeholder.nix
-
-
Table of Contents
--Introduction -The Assets Folder -The Actual Code -
- --— -
-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.
-
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.nix
-generated/hyprland/nixos/default.nix
-generated/mangowc/nixos/default.nix
-- Machine-specific configurations from
assets/machines/
-
-
-Common Configuration (generated/common/)
-
-
-
nixos/default.nixaggregates all NixOS modules: --
-
hardware/hardware.nix
-packages/packages.nix
-security/security.nix
-services/services.nix
-users/users.nix
-
-home-manager/default.nixaggregates Home Manager modules: --
-
programs/programs.nix
-shell/shell.nix
-starship/starship.nix
-
-themes/default.nixaggregates theme modules: --
-
fonts/fonts.nix
-gtk/gtk.nix
-icons/icons.nix
-shells/shells.nix
-
-
-Hyprland Configuration (generated/hyprland/)
-
-
-
nixos/default.niximports: --
-
plugins/plugins.nix
-window-manager/window-manager.nix
-
-home-manager/default.niximports: --
-
programs/programs.nix
-scripts/scripts.nix
-
-themes/default.niximports: --
-
hypr/hypr.nix
-rofi/rofi.nix
-waybar/waybar.nix
-
-overrides/default.niximports: --
-
overrides/overrides.nix
-
-
-MangoWC Configuration (generated/mangowc/)
-
-
-
nixos/default.niximports: --
-
plugins/plugins.nix
-window-manager/window-manager.nix
-
-home-manager/default.niximports: --
-
programs/programs.nix
-scripts/scripts.nix
-
-themes/default.niximports: --
-
mangowc/mangowc.nix
-waybar/waybar.nix
-wofi/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
-}
-
-