Declarative NixOS, nix-darwin, and Nix-on-Droid configurations with Home Manager, structured with Denix.
| Host | Machine | System | Type | Usage | Status |
|---|---|---|---|---|---|
| dirtmouth | ASUS Zenbook 14 (UX3405MA) | x86_64-linux | laptop | personal | active |
| crossroads | GMKtec NucBox G3 Plus | x86_64-linux | server | personal | active |
| greenpath | MacBook Pro (M2 Pro) | aarch64-darwin | laptop | work | active |
| fogcanyon | Nothing Phone (3) | aarch64-linux | mobile | personal | active |
nh os switch ~/dotfilesnh darwin switch ~/dotfilesnix-on-droid switch --flake ~/dotfiles#<host>denix/denix extensions (host submodules, features)rices/appearance presets selected per hosthosts/host definitionsnixos/NixOS hostsdarwin/nix-darwin hostsdroid/Nix-on-Droid hosts
modules/configuration modulescore/base system (nix, boot, users, ...)desktop/desktop environmentslinux/(niri, fcitx5, gtk, ...)macos/(azookey)
programs/applications (ghostty, neovim, git, ...)services/system services (pipewire, openssh, ...)
secrets/age-encrypted secrets
Boot the NixOS installer on the target machine and clone this repository.
nix-shell -p git
git clone https://github.com/mst-mkt/dotfiles ~/dotfilesDefine the host in hosts/nixos/<host>/ (default.nix, disko.nix, hardware.nix), following the existing hosts, and stage it.
nixos-generate-config --no-filesystems --show-hardware-config > ~/dotfiles/hosts/nixos/<host>/hardware.nix
git -C ~/dotfiles add hosts/nixos/<host>Partition the disk with disko and install.
sudo nix run --extra-experimental-features "nix-command flakes" github:nix-community/disko/latest -- --mode destroy,format,mount --flake ~/dotfiles#<host>sudo nixos-install --flake ~/dotfiles#<host>Copy the repository into the new system.
cp -r ~/dotfiles /mnt/home/mst-mkt/dotfiles
sudo nixos-enter --root /mnt -- chown -R mst-mkt:users /home/mst-mkt/dotfilesInstall Nix with the official installer and clone this repository.
curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | shnix-shell -p git
git clone https://github.com/mst-mkt/dotfiles ~/dotfilesDefine the host in hosts/darwin/<host>/ (default.nix), following the existing hosts, and stage it.
git -C ~/dotfiles add hosts/darwin/<host>Activate the system with nix-darwin.
sudo nix run --extra-experimental-features "nix-command flakes" nix-darwin/master#darwin-rebuild -- switch --flake ~/dotfiles#<host>Install the Nix-on-Droid app, complete the initial bootstrap with flakes, and clone this repository.
nix run nixpkgs#git -- clone https://github.com/mst-mkt/dotfiles ~/dotfilesDefine the host in hosts/droid/<host>/ (default.nix), following the existing hosts, and stage it.
git -C ~/dotfiles add hosts/droid/<host>Activate the environment with nix-on-droid.
nix-on-droid switch --flake ~/dotfiles#<host>