Skip to content

Declarative dotfiles with Nix flakes. Supports NixOS full system and home-manager standalone for non-NixOs systems.

Notifications You must be signed in to change notification settings

Castrozan/.dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,644 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zanoni's Desktop Configs

CI Coverage Stargazers

Welcome to my dotfiles! This repository contains my desktop environment setup for both NixOS and Ubuntu. It's built with Nix Flakes and Home Manager.

screensaver

Desktop Showcase

Kitty ᓚᘏᗢ + Tmux

🪟 Panes

panes

🪴 Screensaver

screensaver

🔱 Sessions

sessions

Neovim

:wq Editor

editor

🎯 Focused Editor

editor


Getting Started

The Declarative Way

Got NixOS from the installer? Perfect. Here's how to deploy this flake:

Quick Start for: ❄️ NixOS Users

1. Clone the Repository

cd ~
git clone https://github.com/castrozan/.dotfiles.git
cd .dotfiles

2. Generate Hardware Configuration

Replace your_host with your machine's identifier (e.g., dellg15):

sudo nixos-generate-config --dir hosts/your_host/configs

3. Customize Your Configuration

  • Copy and modify a user directory from users/ (use zanoni as template)
  • Update flake.nix to add your configuration in nixosConfigurations

4. Deploy the Flake

sudo nixos-rebuild switch --flake .#your_user

5. Post-Deployment

  • Restart your system (recommended)
  • Enjoy your new setup! 🎉

Home Manager Standalone

Don't wanna go full NixOS for now? No worries! You can still use the flake with Home Manager to manage your dotfiles:

Quick Start for: 🐧 Ubuntu/Non-NixOS systems

1. Clone the Repository

cd ~
git clone https://github.com/castrozan/.dotfiles.git
cd .dotfiles

2. Install Nix (if not already installed)

curl -L https://nixos.org/nix/install | sh -s -- --daemon

3. Deploy with Home Manager

# For the lucas.zanoni configuration (adjust username as needed)
nix run home-manager/release-25.11 -- --flake .#lucas.zanoni@x86_64-linux switch -b "backup-$(date +%Y-%m-%d-%H-%M-%S)"

🏗️ Architecture Overview

📦 mermaid

Here's how everything fits together:

graph TD
    subgraph "flake.nix"
        Flake["Entry Point<br/>defines configs"]
    end

    subgraph "NixOS Configuration"
        NixOS["nixosConfigurations.zanoni"]
        Host["hosts/dellg15<br/>hardware config"]
        UserNixOS["users/zanoni/nixos.nix"]
    end

    subgraph "Home Manager Configuration"
        HomeStandalone["homeConfigurations<br/>lucas.zanoni@x86_64-linux"]
        UserHome["users/*/home.nix"]
        Modules["home/modules/*<br/>app configs"]
    end

    subgraph "External Inputs"
        Nixpkgs["nixpkgs-25.11"]
        Unstable["nixpkgs-unstable"]
        HM["home-manager"]
    end

    Flake --> NixOS
    Flake --> HomeStandalone
    
    NixOS --> Host
    NixOS --> UserNixOS
    NixOS --> HM
    
    HomeStandalone --> UserHome
    UserHome --> Modules
    
    Flake --> Nixpkgs
    Flake --> Unstable

    style Flake fill:#f38ba8,color:#1e1e2e
    style NixOS fill:#a6e3a1,color:#1e1e2e
    style HomeStandalone fill:#89b4fa,color:#1e1e2e
    style Nixpkgs fill:#f9e2af,color:#1e1e2e
    style HM fill:#cba6f7,color:#1e1e2e
Loading

📂 Repository Structure - Relevant things

📂 Structure
.dotfiles/
├── .bashrc              # Main shell configuration (i'm using fish with bass)
├── .config/             # Application configs (hypr, kitty, tmux, nvim, etc.)
├── .shell_env_vars      # Local environment variables (git-ignored)
├── bin/                 # Custom shell scripts & utilities
├── home/                # Home Manager shared modules
├── hosts/               # NixOS hosts configuration
├── nixos/               # NixOS shared system modules
├── shell/               # Shell configurations (bash, fish)
├── users/               # User-specific configurations
│   ├── lucas.zanoni/    # Home Manager standalone config (Ubuntu/non-NixOS)
│   └── zanoni/          # Full NixOS system config
├── flake.nix            # Nix Flakes entry point
├── Makefile             # Helper commands
└── README.md            # This file!

How to Explore Nix Options

Explore options for configurations directly from the repl so it is up to date with the rebuild command.

nix repl

Then in the REPL:

:lf .#homeConfigurations.lucas.zanoni@x86_64-linux
builtins.attrNames config.options.xdg.desktopEntries.type.getSubOptions

Or to see option descriptions:

config.options.xdg.desktopEntries.description

🤖 AI Context Documentation

Pre-generated, AI-consumable codebase documentation lives in docs/ai-context/. These docs are designed for AI agents to quickly understand the repository without reading all source files.

# Full regeneration (all doc types)
~/openclaw/monster/projects/codewiki/generate.sh ~/.dotfiles

# Partial — only specific areas
~/openclaw/monster/projects/codewiki/generate.sh --focus architecture,modules ~/.dotfiles

# Auto-detect from git diff
~/openclaw/monster/projects/codewiki/generate.sh --diff ~/.dotfiles

Regenerate after large refactors, new modules, or directory reorganization. Minor changes don't need regeneration.


🔗 Inspiration & Credits

This setup is inspired by and borrows from:

  • ryan4yin/nix-config - Excellent complex Nix configurations
  • OfflineBot/nixos - Clean NixOS setup
  • The amazing NixOS and Home Manager communities
  • And countless other dotfiles repos I've stumbled upon at 3 AM 🌙

📚 Resources


Enjoy ricing and happy hacking! If you like this setup, consider giving it a ⭐

About

Declarative dotfiles with Nix flakes. Supports NixOS full system and home-manager standalone for non-NixOs systems.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •