Skip to content

Latest commit

 

History

793 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dhupee's Unified Dotfiles

Important

I USE NIXOS, BTW

Overview

This repo is my unified, long-term dotfiles and system configuration. I use it across NixOS, WSL, Android via Nix-on-Droid, Windows, and maybe servers and macOS, if I ever have the hardware for it.

It represents everything I've learned over the years in embedded systems, programming, and everything else I've done or experienced. It keeps everything I need in one place and makes it portable enough to use from a USB drive.

It combines two layers:

  • Chezmoi manages dotfiles, templates, and encrypted secrets across almost any machine, including systems where Nix is unavailable or unwanted.
  • NixOS + Home Manager provide reproducible Linux, WSL, and Android environments.

On Nix-capable systems, Home Manager handles most of the user configuration. On non-Nix systems, Chezmoi applies the portable parts: shell configs, scripts, aliases, and application configs. This lets me keep one repository without forcing Nix onto every machine.

Design goals

  • Reproducible NixOS, WSL, and Nix-on-Droid setups.
  • Portable dotfiles for Windows and ordinary Linux/macOS machines.
  • Encrypted secrets through Chezmoi.
  • One place for aliases, scripts, themes, wallpapers, and tool configs.
  • Nix where it makes sense; Chezmoi everywhere else.

Screenshots

Laptop's Desktop Rice


File Structure

This is how I structure my nix-configs currently, it might will have few more diretories in the future.

the naming scheme is auto generated by Chezmoi, so don't be surprised.

on the front you will have:

Directory Description
AppData Windows equivalent of .config/ or .local I think
dot_config Config files, for now it only have powershell
dot_boxkit Collection for Distrobox manifests and Containerfiles, Helping me making disposable work environment with Container
dot_scripts my scripts, it has bash and powershell, some of them are carry over from my old dotfiles
dot_torrents we are a pirate!!
dot_node-red node-red stuff for IoT
mutable-configs configs that is mutable, not worth it to be carried to home directory since it will changed a lot, will be symlinked by the home-manager or other methods depend on what I need
dot_nix-configs my actual NixOS configs
private_dot_secrets well...encrypted files, configs, secrets
private_dot_ssh obviously...my ssh key
Templates templates of files...maybe not a lot that I added atm
Wallpapers Waifu and car picture for Wallpapers

then when it comes to my actual .nix-configs, the directories looks like this.

Directory Description
aliases my aliases...also carried from my old dotfiles
configs mostly my configuration files of packages, tried not to use nix for this so I can use it on non Nix systems
droids configurations for Nix On Droid, NixOS but for Android (a Termux-based app)
home my home-manager configs, tried to seperate from systems as much as possible
image config for images for deploying NixOS to somewhere
linux my systems configs for NixOS
machines hardware-configuration.nix backup and also hardware tweak for any machines I use
modules modules of nix configs, seperated by systems and home-manager ofc
theming modules for my ricing, has Gnome, KDE Plasma 6, maybe Hyprland if I want a neckbeard
users modules for users, if there's more than me, or if I need a user for specific machines
wsl NixOS config on Windows Subsystem for Linux

This thing obviously can change overtime as this dotfiles grow, and I can forgot the directories.


Installation

Linux / NixOS

  1. Install Nix - To use this Dotfiles, you need Nix to install Chezmoi. You can install it using the Nix installer.

    Then grab my configs:

    nix-shell -p chezmoi git --run "chezmoi init dhupee"
  2. Drop your Age key - put the Age key where Chezmoi can read it and run chezmoi apply. That unlocks all the encrypted bits and installs my dotfiles.

    Finally, from the .nix-configs directory, fire off:

    sudo nixos-rebuild switch --flake .#nitro   # if you're on NixOS
    home-manager switch --flake .#dhupee        # always

    Swap the flake names if you're not nitro/dhupee – look inside flake.nix for alternatives. If you're on a non‑NixOS distro, skip the nixos-rebuild and just use Home‑Manager.


Windows

Installing

Windows support is lighter than Linux/WSL, but Chezmoi makes it work. Setup takes four steps:

  1. Install Scoop - This Dotfiles for Windows uses Scoop to install it's program, to install Scoop, run:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

    After this, you should be able to run scoop install chezmoi to install chezmoi from there

  2. Place your Age key – Copy your age.key file into your home directory (%USERPROFILE%). Chezmoi needs it to decrypt your encrypted files.

  3. Bootstrap Chezmoi – Open a terminal and initialise the repo:

    chezmoi init dhupee

    Apply the dotfiles – Run:

    chezmoi apply

    Install your applications – The dotfiles only handle configs; you supply the actual software. I recommend Scoop for most CLI tools and Winget for apps that need system integration.

Note

This setup is intentionally kept minimal compared to my NixOS machines, but it gives you consistent scripts, aliases, and shell customisation on Windows.

Uninstalling Scoop as cleanly as possible

By design, Scoop isolates almost all instalation in Scoop folder in %USERPROFILE%, However if you want it to be deleted as clean as possible, do this few steps

  1. Uninstall Scoop and all its apps

    scoop uninstall scoop
  2. Delete leftover directories (if they still exist)

    Remove-Item -Recurse -Force "$env:USERPROFILE\scoop" -ErrorAction SilentlyContinue
    Remove-Item -Recurse -Force "$env:USERPROFILE\.config\scoop" -ErrorAction SilentlyContinue
  3. Clean your PATH and Scoop‑related environment variables Open System Properties → Environment Variables and remove:

    • Any user/system Path entries containing scoop (e.g., %USERPROFILE%\scoop\shims).
    • Any user/system variables named SCOOP or SCOOP_GLOBAL.
  4. Restart your terminal for changes to take effect.

Boxkit

Important

This section is intended to have a GitHub Action, since it's meant to be heavily cloud-native, mimicking how Fedora Atomic works.

Boxkit is a collection of Distrobox manifests and Containerfiles, inspired by universal-blue's boxkit. It gives me disposable, mutable container environments for the times when Nix is the wrong tool for the job.

There are a few cases where this approach beats the Nix ecosystem:

  • Cloud-native workloads that will always be deployed inside a container.
  • Proprietary tools like Vivado that expect a normal FHS layout.
  • Software with messy build systems that aren't worth writing a derivation for, or that only exists on something like AUR(Arch User Repository).
  • Things you just want to install normally, break, and throw away without touching your host system or home directory.

On an immutable or Nix-managed system, Distrobox is the escape hatch. Containers can share your home directory and integrate with your desktop, so apps inside behave almost like native ones, but you get a full mutable filesystem and a normal package manager. Build once, enter whenever, delete when done.

dot_boxkit/
├── arch-lazerexport/     # Containerfile + manifest
├── dev-arch-nvim/        # with init_hooks.sh
└── vivado-box/           # FPGA toolchain

Each subdirectory is a self-contained container: a Containerfile for the image, a manifest.ini for Distrobox, and optionally an init_hooks.sh for setup on entry. Swap in whatever distro or toolchain the job needs.

Removing Dotfiles

Because Dotfiles is managed using Chezmoi, in order to remove dotfiles from BOTH Sources and Destination, run:

chezmoi destroy

Then you can let it rip, remove Scoop or Nix, depending on the systems

Tools I use in this dotfiles

Core

  • Chezmoi — dotfile manager across all machines, Nix or not.
  • Age — encryption for secrets and private files, used through Chezmoi.

Nix Related

Container Related

  • Distrobox — mutable containers integrated with the host, my escape hatch from Nix when needed.
  • Boxkit — inspiration for my container manifest layout.

Windows Related

  • Scoop Package Manager — Windows package manager, keeps installs isolated in %USERPROFILE%.
  • ReviOS — debloated Windows, less telemetry and overhead.

References for me

To-Do List

  • Add Github Actions for Boxkit, to fully enable cloud-native boxkit
  • NixOS profile specifically for Klipper Servers, for my 3D printer
  • Live USB profile, packages as an custom ISO

About

One repo to rule them all — NixOS, WSL, Android, and Windows, with Chezmoi for everything in between.

Topics

Resources

Stars

14 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages