NixOS and Dotfiles Installation Guide

Step 0: Base NixOS Installation

To begin, install a minimal NixOS setup by following the official guide below: 📚 NixOS Installation Guide

Once you're done and have rebooted into your system, proceed with the steps below.


Step 1: Clone the Repository

Clone to your home directory (the flake expects to live in ~/dotfiles for certain absolute path references):

git clone https://codeberg.org/Gurjaka/Dotfiles.git ~/dotfiles
cd ~/dotfiles

Step 2: Defining a Host

To modify or add a system host, navigate to hosts/<hostname>/.

  1. Hardware: Generate or copy your hardware-configuration.nix into the host folder.
  2. Configuration: Edit hosts/<hostname>/configuration.nix to import the desired features from ../../feats/. Check big-hat example.
  3. Flake Registration: In the root flake.nix, add the host to the nixosConfigurations attrset using the mkHost helper:
    big-hat = mkHost rec {
      hostname = "big-hat";
      specialArgs = sysAttrs.propagatedArgs;
      modules = [ ./hosts/${hostname}/wrappers.nix ];
    };

Step 3: Defining a User

User configurations are handled via Home Manager in the homeConfigurations section of flake.nix.

  1. User Module: Edit hosts/<hostname>/home.nix to toggle user-specific feats.
  2. Flake Registration: Ensure the userInfo let-block in flake.nix matches your details:
    gurami = let
      userInfo = {
        userEmail = "your@email.com";
        userGit = "Username";
      };
    in mkHome { ... };

Step 4: Apply Configuration

Note: Nix Flakes only see files tracked by Git. If you added a new directory under feats/ or hosts, run git add . first.

# Apply System (NixOS)
sudo nixos-rebuild switch --flake .#big-hat

# Apply User (Home Manager)
nix run home-manager -- switch --flake .#gurami

Step 5: Vivaldi Note (If Used)

If your preferred browser is Vivaldi, make sure to launch it once manually to generate its configuration directories.

Then, re-run the home-manager switch:

nix run home-manager -- switch --flake ~/Dotfiles#YOUR_USERNAME

This will allow Vivaldi's preconfigured settings to be applied cleanly.


Step 5: Secrets with agenix

If you are using secrets (like API tokens, SSH keys, etc.), your dotfiles may include a secrets/ directory managed via agenix.


Step 6: Confirm Everything Works

After setup, verify the following:

  • Theme applied (defaulting to Nord, managed by Juna)
  • Qtile working with custom bar + widgets
  • Terminal (Foot) themed and functional
  • Fish or Zsh shell initialized properly
  • Notification daemon (SwayNC) running on Wayland
  • Neovim opens with correct LSPs and theme
  • Scripts and aliases available in terminal (showalias to see them)

If any issues arise, attempt to rebuild the configuration. For missing permissions, verify user settings in secrets or flake.nix.