Skip to content

Marfien/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

527 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

Nix flake-based system and home configuration for macOS (nix-darwin) and NixOS (WSL).

Configurations

Name Type System User Description
mac nix-darwin aarch64-darwin marvin macOS workstation
wsl-soptim NixOS/WSL x86_64-linux maha WSL environment for work

Repository Structure

.
├── flake.nix              # Flake entrypoint with all system definitions
├── modules/
│   ├── hm-system.nix      # Shared home-manager integration module
│   └── windows/           # Windows/WSL-specific modules
├── darwin/
│   ├── default.nix        # Shared darwin configuration
│   └── mac/               # mac-specific: Homebrew, Dock, fonts
├── nixos/
│   ├── default.nix        # Shared NixOS configuration
│   └── wsl-soptim/        # WSL config: networking, docker, certs
└── home/
    ├── default/           # Shared home-manager config (all hosts)
    │   ├── shell.nix      # Zsh, fzf, starship
    │   ├── cli.nix        # CLI tools (jq, bat, fd, ripgrep, ...)
    │   ├── git/           # Git configuration
    │   ├── tmux.nix       # Tmux
    │   ├── neovim/        # Neovim configuration
    │   ├── sdk.nix        # JDK, .NET, Maven, Gradle, Go
    │   └── devops.nix     # kubectl, fluxcd, opentofu, docker-client
    ├── mac/               # macOS-specific: WezTerm, browser, shell extras
    └── wsl-soptim/        # WSL-specific: SSH, Go, Claude Code, shell extras

Flake Inputs

  • nixpkgs (nixos-unstable)
  • home-manager (master)
  • nix-darwin
  • nix-homebrew
  • nixos-wsl
  • zen-browser

The Nix implementation used is Lix.

Initial Install

Prerequisites

Install Nix with flakes support. The Determinate Systems installer is recommended as it enables flakes by default.

nix-darwin (macOS)

git clone https://github.com/Marfien/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
nix run nix-darwin -- switch --flake .#mac

After the initial build, use darwin-rebuild directly:

darwin-rebuild switch --flake ~/.dotfiles#mac

NixOS (WSL)

  1. Install NixOS-WSL following their instructions.
  2. Clone and apply the configuration:
git clone https://github.com/Marfien/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
sudo nixos-rebuild switch --flake .#wsl-soptim

Home-Manager (standalone)

If you only want the home-manager configuration without a full system rebuild:

git clone https://github.com/Marfien/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
nix run home-manager -- switch --flake .#<username>

Note: Standalone home-manager configurations are not currently exported by this flake. Use the full system commands above.

How to Upgrade

Update all flake inputs to their latest versions and rebuild:

cd ~/.dotfiles
nix flake update

Then apply the updated configuration:

# macOS
darwin-rebuild switch --flake ~/.dotfiles#mac

# NixOS / WSL
sudo nixos-rebuild switch --flake ~/.dotfiles#wsl-soptim

To update a single input:

nix flake update home-manager

About

A collections of files and scripts to quickly setup new workstations and theire environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors