My declarative dotfiles and system configuration using Nix Home Manager.
-
Nix package manager with flakes enabled
sh <(curl -L https://nixos.org/nix/install) --daemon -
Home Manager installed
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager nix-channel --update nix-shell '<home-manager>' -A install
-
Clone this repository
git clone https://github.com/r3morce/home-manager ~/.config/home-manager cd ~/.config/home-manager
-
Create your private configuration
cp private.nix.example private.nix
-
Apply configuration
home-manager switch
Edit home.nix:
home.packages = with pkgs; [ # Add your package here neofetch ];Add to home.nix:
programs.git = { enable = true; userName = "Your Name"; };home.file = { ".config/myapp".source = ./myapp; };home-manager switch. ├── home.nix # Main entry point ├── private.nix # Private config (git-ignored) ├── private.nix.example # Template for private config ├── modules/ # Modular configuration └── config/ # Actual dotfiles If something breaks:
home-manager generations home-manager switch --rollback- Issue: Alacritty from nixpkgs (v0.16.1) has Wayland display handle compatibility issues
- Workaround: Currently disabled in home-manager. Use system package manager (pacman) instead
- Status: Configuration file (
~/.config/alacritty/alacritty.toml) is still managed by home-manager - Future: Will re-enable when a fixed version is available in nixpkgs
private.nixcontains sensitive info (not tracked)- Use
private.nix.exampleas template - Never commit SSH keys or tokens