Skip to content

Repository files navigation

NixOS Dotfiles Logo

NixOS Dotfiles

NixOS Home Manager SOPS Neovim Tmux Alacritty Hyprland Zsh

NixOS + Home Manager configs for my machines, composed with den

Setup

git clone https://github.com/eldios/dotfiles ~/dotfiles
cd ~/dotfiles
sudo nixos-rebuild switch --flake .#$(hostname)

Once the config is active, the nixu alias does the same through nh os switch (built as the regular user, activated with sudo).

Structure

dotfiles/
├── flake.nix                # Inputs; every file under modules/ is a den module
├── modules/
│   ├── den.nix              # den wiring shared by every host and user
│   ├── hosts.nix            # The hosts that exist, with their users
│   ├── flake-outputs.nix    # formatter and dev shell
│   ├── aspects/             # One aspect per feature (base, sops, hyprland, ...)
│   ├── hosts/<host>.nix     # Which aspects each host includes
│   ├── users/<user>.nix     # Users are aspects too
│   └── _assets/             # Files read by modules (ssh keys)
├── docs/                    # Guides
├── scripts/                 # Version bumps for the pinned overlays
└── Justfile                 # Routine commands

Any path starting with _ is skipped by the module loader and holds plain NixOS or Home Manager modules, imported by the aspect or host next to it.

The model

A host is a list of aspects. An aspect bundles the NixOS and Home Manager halves of one feature: den.aspects.neovim carries the system editor in its nixos class and the LazyVim setup in its homeManager class, and a host that includes it gets both. Users are aspects as well: modules/users/eldios.nix includes den's define-user, primary-user and user-shell batteries for the account itself, and host-aspects, which hands the user the Home Manager half of every aspect the host includes. Configuration that belongs to one user on one host goes through provides.<user>.homeManager in the host's aspect.

Secrets come from a private repo through the secrets flake input, consumed by sops-nix; there is no secrets/ directory here.

Hosts

Host Role
lele8845ace Desktop workstation
lele9iyoga Laptop
sox1x Laptop, shared with a second account
mininixos Headless server: storage and services

Docs

About

nixOS / nixPkgs dotfiles

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages