Skip to content

Latest commit

 

History

237 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marmos91 dotfiles

Cross-platform dotfiles for macOS and Linux (Ubuntu/GNOME), powered by Nix, Home Manager, and Stow.

result

Highlights

  • Cross-platform: Works on macOS (Apple Silicon & Intel) and Linux (x86_64 & aarch64)
  • Declarative configuration: Managed with Nix Darwin (macOS) and Home Manager (Linux)
  • Consistent theming: Catppuccin Mocha across all tools via catppuccin/nix
  • Terminal emulators: Ghostty
  • Shell: Zsh with Starship prompt
  • Editor: Neovim with custom Lua configuration
  • Terminal multiplexer: Tmux with catppuccin theme

Installation

Clone the repository:

git clone https://github.com/marmos91/dotfiles.git ~/.dotfiles
cd ~/.dotfiles

Run the install script:

chmod +x install.sh && ./install.sh

Options

Flag Description
--shell <shell> Set default shell (zsh or bash). Default: zsh
--shell-only Only change the default shell, skip full installation
--hostname <name> Set hostname (macOS only). Default: amaterasu
--no-stow Skip stowing dotfiles
--skip-nix Skip Nix installation (use existing Nix)
--no-1password Skip 1Password installation (Linux only)
--help Show help message

Examples:

./install.sh                          # Full install with defaults
./install.sh --shell bash             # Install with bash as default shell
./install.sh --hostname myhost        # Install with custom hostname (macOS)
./install.sh --shell-only             # Only set zsh as default (skip install)
./install.sh --no-stow --skip-nix     # Only apply Nix configuration
./install.sh --no-1password           # Skip 1Password installation on Linux

What it does

  1. Install Stow (via Homebrew on macOS, apt/dnf/pacman on Linux)
  2. Install Nix using the Determinate Systems installer
  3. Install 1Password via official apt repository (Linux only, for SSH agent)
  4. Symlink dotfiles to your home directory via Stow
  5. Apply the appropriate Nix configuration:
    • macOS: nix-darwin + home-manager
    • Linux: standalone home-manager
  6. Set the default shell (Linux only)

SSH keys and commit signing

1Password stores the keys; how they're used differs per platform.

macOS — keys live on disk and 1Password is only the backup, so nothing prompts for a fingerprint on every commit or ssh. On a new machine:

  1. Open 1Password, sign in, and enable Settings → Developer → "Integrate with 1Password CLI" (the SSH agent itself is not needed here)

  2. Restore the keys into ~/.ssh:

    op-ssh-restore --dry-run   # preview
    op-ssh-restore             # write; skips keys already present

    Pass --force to replace existing files (the old one is kept as .bak), and bare key names to limit the run: op-ssh-restore --force id_ed25519. Set OP_SSH_VAULT if the keys aren't in Private.

Git signs with ssh-keygen reading ~/.ssh/id_ed25519 directly — no agent is involved. user.signingkey must therefore be a path; a literal public key makes git use ssh-keygen -Y sign -U, which requires an agent and fails with Couldn't find key in agent?.

Keys come out of 1Password without a passphrase, so anyone who can read ~/.ssh can use them. That is the trade for never being prompted.

Linux — the 1Password SSH agent is used directly: SSH_AUTH_SOCK points at ~/.1password/agent.sock (see home/env.nix), so enable Settings → Developer → "Use the SSH agent" there.

To verify:

git commit --allow-empty -m "Test signed commit"
git log --show-signature -1

Note: On macOS, install 1Password from the Mac App Store or official download.

Post-install

Restart your terminal or log out/in for all changes to take effect.

Uninstallation

To completely remove the dotfiles and Nix:

chmod +x uninstall.sh && ./uninstall.sh

Options

Flag Description
--dotfiles-only Only unstow dotfiles, keep Nix and packages
--keep-nix Keep Nix installed, remove dotfiles and config
--keep-stow Keep stow installed
--keep-1password Keep 1Password installed (Linux only)
-y, --yes Skip confirmation prompt
--help Show help message

Examples:

./uninstall.sh                    # Full uninstall (interactive)
./uninstall.sh -y                 # Full uninstall (no confirmation)
./uninstall.sh --dotfiles-only    # Only remove dotfile symlinks
./uninstall.sh --keep-nix         # Remove dotfiles but keep Nix
./uninstall.sh --keep-1password   # Keep 1Password installed on Linux

What it removes

  1. Dotfile symlinks (unstow)
  2. Stow (unless --keep-stow)
  3. 1Password app and CLI (Linux, unless --keep-1password)
  4. Home-manager/nix-darwin configuration
  5. Nix and all packages (unless --keep-nix)
  6. Nix cache files

Warning: Full uninstall is destructive and will remove all Nix-installed packages.

Usage

After installation, use the rebuild command to apply configuration changes:

rebuild

This automatically detects your platform and runs the appropriate command:

  • macOS: darwin-rebuild switch --flake ~/.config/nix-darwin
  • Linux: home-manager switch --flake ~/.config/nix-darwin

Structure

~/.dotfiles/
├── .config/
│   ├── nix-darwin/          # Nix configuration
│   │   ├── flake.nix        # Main flake (inputs & outputs)
│   │   ├── system/          # macOS system config (nix-darwin)
│   │   └── home/            # User config (home-manager)
│   │       ├── catppuccin.nix      # Global theme config
│   │       ├── programs/
│   │       │   ├── desktop/        # GNOME settings (Linux)
│   │       │   ├── terminal/       # ghostty, tmux, starship
│   │       │   ├── shell/          # zsh, fish
│   │       │   ├── git/            # git, lazygit, delta
│   │       │   └── utilities/      # bat, fzf, btop, k9s, etc.
│   │       └── development/        # Language toolchains
│   └── nvim/                # Neovim configuration
├── install.sh               # Installation script
├── uninstall.sh             # Uninstallation script
└── README.md

Platform-specific features

macOS

  • Homebrew casks for GUI applications
  • System preferences (Dock, Finder, keyboard)
  • AeroSpace window manager

Linux (Ubuntu/GNOME)

  • GNOME settings via dconf (keyboard repeat, trackpad, dark mode)
  • Dash-to-Dock extension with auto-hide
  • GNOME Terminal with Catppuccin theme
  • Window buttons on left (macOS-style)

Customization

Key files to customize:

Purpose File
Theme (flavor/accent) home/catppuccin.nix
Shell aliases home/programs/shell/zsh.nix
Git config home/programs/git/config.nix
Neovim plugins .config/nvim/lua/plugins/
Terminal settings home/programs/terminal/
GNOME settings home/programs/desktop/gnome.nix
Secrets management home/secrets/ (README)

License

MIT LICENSE

About

marmos91 personal dotfiles repository

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages