Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
30bcd84
chore: init repo
himkt Jan 17, 2026
cbe5a07
feat: add flake files
himkt Jan 17, 2026
d0561bb
feat: add home-manager config
himkt Jan 17, 2026
34480e3
feat: add etc/nixos
himkt Jan 17, 2026
9f98fb4
chore: add README and Makefile
himkt Jan 17, 2026
07176b4
feat: update flake.nix for nixos-config
himkt Jan 17, 2026
cd1355a
fix: several warnings in nixos-rebuild
himkt Jan 17, 2026
0e98ff2
chore: ignore result files
himkt Jan 17, 2026
5bf9859
feat: add make and uv
himkt Jan 17, 2026
69722bf
chore: remove unnecessary comments
himkt Jan 17, 2026
c532aaf
chore: use nixos-25.11 channel
himkt Jan 17, 2026
6d180b5
feat: add zsh module
himkt Jan 17, 2026
f4e3d7e
feat: add sheldon module
himkt Jan 17, 2026
7279467
feat: add modules for ghostty, git, nvim, tmux, and uv
himkt Jan 17, 2026
505a8dc
fix: git config
himkt Jan 17, 2026
d7e0026
chore: set XDG variables
himkt Jan 17, 2026
367f20f
chore: use pkgs.vimPlugins to manage vim packages
himkt Jan 17, 2026
2dbbd71
chore: import modules
himkt Jan 17, 2026
cf3e9b7
chore: make update
himkt Jan 17, 2026
47498a5
chore: additional packages
himkt Jan 17, 2026
e23e14b
chore: allow uv to use downloaded python executable
himkt Jan 17, 2026
45c6189
chore: enable git-lfs
himkt Jan 17, 2026
dafa274
feat: add gcc
himkt Jan 17, 2026
3d482a7
chore: additional packages
himkt Jan 17, 2026
8f8aace
feat: docker (without automated launch)
himkt Jan 17, 2026
4100405
chore: gpg, python3, cert, and libpq
himkt Jan 17, 2026
50910e2
chore: enable scroll gesture for history navigation
himkt Jan 17, 2026
f647ad7
feat: Japanese IME
himkt Jan 17, 2026
750112b
fix: specify fcitx in apps
himkt Jan 17, 2026
cd2be12
chore: clear GTK_IM_MODULE for ghostty as workaround
himkt Jan 17, 2026
74c29cb
feat: introduce fprintd (fingerprint authentication) and enable keyring
himkt Jan 17, 2026
139a51a
chore: adjust ghostty font size
himkt Jan 17, 2026
d7f669a
chore: update README
himkt Jan 17, 2026
f8614a1
chore: super+t to create tab on Ghostty
himkt Jan 18, 2026
9c25b9d
chore: add rustup
himkt Jan 18, 2026
d63c193
fix: vscode (and other electron-based apps) poor rendering
himkt Jan 18, 2026
a1876db
chore: change hostname to neptune
himkt Jan 18, 2026
af4bf0f
feat: introduce inkscape and insomnia
himkt Jan 19, 2026
3a3b33a
chore: use unstable versions of claude-code, vscode, and 1password
himkt Jan 19, 2026
a47ddb4
feat: enable Emacs style key theme
himkt Jan 19, 2026
7e23906
fix: hide duplicate chrome app on launcher
himkt Jan 19, 2026
5201c65
chore: update flake.lock
himkt Jan 22, 2026
1b97b2d
chore: trust docker related gateways
himkt Jan 25, 2026
4362783
chore: make update
himkt Jan 25, 2026
62b7a8f
feat: add gcloud
himkt Jan 25, 2026
4ca170f
chore: stop using Emacs key theme
himkt Jan 25, 2026
449f0be
feat: enable systemd-resolved and change DNS setting using sops-nix
himkt Jan 26, 2026
ebee940
chore: use compiled binary in mise
himkt Jan 27, 2026
3e22ef8
feat: enable gnome-keyring daemon
himkt Jan 27, 2026
925296e
chore: open to launch xdg-open
himkt Jan 27, 2026
dd3dbb7
chore: make update
himkt Jan 27, 2026
dc481b3
chore: make update
himkt Jan 30, 2026
8c5ee2b
chore: move modules to home
himkt Jan 30, 2026
0beae2a
feat: add keyd configuration
himkt Jan 30, 2026
23a6b59
chore: modify keyd conf to imitate macOS
himkt Jan 31, 2026
790ae39
chore: install file and tree
himkt Feb 1, 2026
3f5b5f7
feat: super+{arrow key}
himkt Feb 1, 2026
21953c1
fix: give up using fprintd with fixme comment
himkt Feb 1, 2026
6b0fc12
chore: additional shortcuts
himkt Feb 4, 2026
e87c79d
feat: introduce pathfinder
himkt Feb 7, 2026
8550f6b
chore: make update
himkt Feb 7, 2026
0f19d44
fix: pathfinder needs libgcc_s.so.1
himkt Feb 7, 2026
5076ff7
chore: super+/ to ctrl+/
himkt Feb 7, 2026
641dd91
feat: use programs.mise
himkt Feb 7, 2026
3274018
refactor: set all_compile entry in mise module
himkt Feb 10, 2026
0d4b936
feat: create or attach tmux session on zsh launch
himkt Feb 10, 2026
75618a1
chore: disable tap-to-click
himkt Feb 10, 2026
0a1aba1
feat: java21
himkt Feb 11, 2026
c777852
chore: disable tmux on vscode
himkt Feb 11, 2026
1e85147
chore: stop using super as ctrl
himkt Feb 11, 2026
20265db
Merge pull request #1 from himkt/keyd-cleanup
himkt Feb 11, 2026
62c50f1
fix: pbcopy is not needed for Linux
himkt Feb 15, 2026
6fb33ed
feat: add status bar on top of tmux pane
himkt Feb 15, 2026
471f31e
chore: add node
himkt Feb 17, 2026
a6f19db
Add 'nixos/' from commit '471f31ecbbfe4ee806e4529c5a4f14bcf401f90b'
himkt Feb 17, 2026
2572546
feat: move NixOS files to unified structure (Step 3)
himkt Feb 17, 2026
570d9de
feat: create shared Home Manager modules (Step 4)
himkt Feb 17, 2026
fa91688
feat: create platform-specific modules (Step 5)
himkt Feb 17, 2026
de7027d
feat: create entry point files - flake.nix, nixos.nix, macos.nix, dar…
himkt Feb 17, 2026
da6ce13
feat: create root Makefile, .gitignore, CI workflow, README (Step 7)
himkt Feb 17, 2026
a96087e
feat: remove old files and directories (Step 8)
himkt Feb 17, 2026
bb2147a
feat: add NixOS build check CI workflow
himkt Feb 17, 2026
6a02e54
feat: validate flake and NixOS build (Step 9)
himkt Feb 17, 2026
0254504
chore: add design-docs to global gitignore
himkt Feb 17, 2026
dcdd1ca
fix: declare user in darwin-configuration to fix CI evaluation
himkt Feb 17, 2026
884e0f9
feat: add make build targets and use them in CI
himkt Feb 17, 2026
6705f9a
fix: add system.primaryUser required by nix-darwin
himkt Feb 17, 2026
37dba46
fix: make ghostty package Linux-only (not available on darwin)
himkt Feb 17, 2026
e7de057
fix: remove duplicate [user] from git config, add macos-brew-install …
himkt Feb 17, 2026
e67a73a
chore: simplify README and add macOS update/clean/gc targets
himkt Feb 17, 2026
3ccaa86
chore: update README with platform logos and detailed structure
himkt Feb 17, 2026
116ebd3
chore: fix NixOS badge logo color
himkt Feb 17, 2026
bcba647
docs: use official Nix installer link in README
himkt Feb 17, 2026
83c9f75
chore: migrate duplicate Homebrew packages to Nix and fix macOS sudo …
himkt Feb 17, 2026
2a5797c
chore: use java managed by nix
himkt Feb 18, 2026
ea95167
chore: update README
himkt Feb 18, 2026
242ea0f
refactor: install fonts using nix on macOS
himkt Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
name: macOS test
name: macOS nix-darwin build check
on:
push:
branches:
- main
pull_request:
jobs:
main:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: uninstall builtin homebrew on macOS
run: |
sudo rm -rf /opt/homebrew
- name: setup dotfiles
run: |
cp -r $GITHUB_WORKSPACE $HOME/dotfiles
cd $HOME/dotfiles
make
make brew
- name: install packages
run: |
source $HOME/.zshrc
make brew-base
shell: zsh {0}
- name: brew doctor on macOS
run: |
# NOTE(himkt); skip this on Ubuntu since brew doctor won't succeed
# due to the installation path.
brew doctor
- uses: actions/checkout@v6
- uses: DeterminateSystems/nix-installer-action@main
- name: Build nix-darwin configuration
run: make macos-build
14 changes: 14 additions & 0 deletions .github/workflows/nixos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: NixOS build check
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: DeterminateSystems/nix-installer-action@main
- name: Build NixOS configuration
run: make nixos-build
27 changes: 0 additions & 27 deletions .github/workflows/ubuntu.yml

This file was deleted.

21 changes: 2 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
.*
!.gitignore
!.gitmodules
!.amethyst
!.bashrc
!.zshrc
!.vimrc
!.tmux.conf
!.osx.tmux.conf
!.octaverc
!.vim
!.zsh
!.keep

*private*
*secret*

# https://github.com/himkt/omoide
/bin/omoide
# https://github.com/himkt/auto-release
/bin/auto-release
!.github/
result
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2025 himkt
Copyright (c) 2017-2026 himkt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
125 changes: 30 additions & 95 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,113 +1,48 @@
# Makefile for dotfile configs
RED := $(shell tput setaf 1)
NOCOLOR := $(shell tput sgr0)
.PHONY: macos-build macos-switch macos-brew-install macos-brew macos-brew-gui macos-brew-optional macos-brew-himkt macos-update macos-clean macos-gc nixos-build nixos-switch nixos-update nixos-clean nixos-gc

.PHONY: \
all docs brew \
base cli darwin gui \
git ghostty nvim sheldon tmux uv zsh
# macOS targets
macos-build:
nix build .#darwinConfigurations.macos.system

all: git tmux zsh docs
optional: all darwin ghostty git mise nvim sheldon uv
macos-switch:
sudo darwin-rebuild switch --flake .#macos
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command sudo darwin-rebuild switch requires root privileges, which is unusual for nix-darwin. The standard command is darwin-rebuild switch (without sudo). Using sudo may cause permission issues with user-specific files and should be avoided unless absolutely necessary.

Suggested change
sudo darwin-rebuild switch --flake .#macos
darwin-rebuild switch --flake .#macos

Copilot uses AI. Check for mistakes.

# =========================

brew:
macos-brew-install:
$(PWD)/brew/bin/setup.sh

brew-base:
macos-brew:
brew bundle --verbose --file=$(PWD)/brew/config.d/base/Brewfile

brew-optional:
brew bundle --verbose --file=$(PWD)/brew/config.d/optional/Brewfile

brew-gui:
macos-brew-gui:
brew bundle --verbose --file=$(PWD)/brew/config.d/gui/Brewfile

brew-himkt:
brew bundle --verbose --file=$(PWD)/brew/config.d/himkt/Brewfile

krew-base:
kubectl krew install open-svc ns images ctx stern neat

# =========================

darwin:
$(PWD)/darwin/bin/setup.sh

ghostty: ghostty_clean
$(PWD)/ghostty/bin/setup.sh

git: git_clean
$(PWD)/git/bin/setup.sh

mise: mise_clean
$(PWD)/mise/bin/setup.sh

nvim: nvim_clean
$(PWD)/nvim/bin/setup.sh

sheldon: sheldon_clean
$(PWD)/sheldon/bin/setup.sh

tmux: tmux_clean
$(PWD)/tmux/bin/setup.sh

uv: uv_clean
$(PWD)/uv/bin/setup.sh

zsh: zsh_clean
$(PWD)/zsh/bin/setup.sh

# =========================

ghostty_clean:
rm -rf $(HOME)/.config/ghostty
macos-brew-optional:
brew bundle --verbose --file=$(PWD)/brew/config.d/optional/Brewfile

git_clean:
rm -rf $(HOME)/.config/git/config
rm -rf $(HOME)/.config/git/ignore
macos-brew-himkt:
brew bundle --verbose --file=$(PWD)/brew/config.d/himkt/Brewfile

mise_clean:
rm -rf $(HOME)/.config/mise
macos-update:
nix flake update

nvim_clean:
rm -rf $(HOME)/.vimrc
rm -rf $(HOME)/.vim
rm -rf $(HOME)/.config/nvim
macos-clean:
sudo nix-env --delete-generations +7 --profile /nix/var/nix/profiles/system-profiles/darwin

sheldon_clean:
rm -rf $(HOME)/.config/sheldon
macos-gc:
sudo nix-collect-garbage -d

tmux_clean:
rm -rf $(HOME)/.tmux.conf
# NixOS targets
nixos-build:
nix build .#nixosConfigurations.nixos.config.system.build.toplevel

uv_clean:
rm -rf $(HOME)/.local/bin/uv $(HOME)/.local/bin/uvx
rm -rf $(HOME)/.config/uv
nixos-switch:
sudo nixos-rebuild switch --flake .#nixos

zsh_clean:
rm -rf $(HOME)/.zshrc
nixos-update:
nix flake update

# =========================
nixos-clean:
sudo nix-env --delete-generations +7 --profile /nix/var/nix/profiles/system

docs:
@echo ""
@echo "### Finish installing dotfiles!"
@echo "Please run $(RED)source $$HOME/.zshrc$(NOCOLOR) on zsh to enable configures."
@echo "- If you want to use nvim with extensions, please run $(RED)make nvim$(NOCOLOR) (which needs pyenv)."
@echo "- If you want to install pyenv using brew, please read the Python section below."
@echo ""
@echo "---"
@echo ""
@echo "### Packages"
@echo "- If you want to use linuxbrew/homebrew, please run $(RED)make brew-cui$(NOCOLOR)."
@echo "- Please run $(RED)make brew$(NOCOLOR) before if you have not installed brew yet"
@echo "- Additionally, $(RED)make brew-optional$(NOCOLOR) installs optional packages"
@echo ""
@echo "---"
@echo ""
@echo "### Python"
@echo "- After $(RED)make brew, make brew-cui, source $$HOME/.zshrc$(NOCOLOR),"
@echo " you can run $(RED)make nvim$(NOCOLOR) to install Python and the nvim library"
@echo ""
nixos-gc:
sudo nix-collect-garbage -d
68 changes: 59 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,67 @@
## dotfiles
# dotfiles

[![macOS test](https://github.com/himkt/dotfiles/actions/workflows/macos.yml/badge.svg)](https://github.com/himkt/dotfiles/actions/workflows/macos.yml)
[![macOS](https://img.shields.io/github/actions/workflow/status/himkt/dotfiles/macos.yml?label=macOS&logo=apple)](https://github.com/himkt/dotfiles/actions/workflows/macos.yml)
[![NixOS](https://img.shields.io/github/actions/workflow/status/himkt/dotfiles/nixos.yml?label=NixOS&logo=nixos&logoColor=white)](https://github.com/himkt/dotfiles/actions/workflows/nixos.yml)

## Installation
Unified Nix-based configuration for macOS (nix-darwin) and NixOS.

## Structure

```
git clone git@github.com:himkt/dotfiles $HOME/dotfiles
cd $HOME/dotfiles && make
dotfiles/
├── flake.nix # Unified flake (NixOS + nix-darwin)
├── Makefile # Build and setup targets
├── hosts/
│ ├── nixos/ # NixOS system configuration
│ └── macos/ # nix-darwin system configuration
├── home/
│ ├── nixos.nix # NixOS Home Manager entry point
│ ├── macos.nix # macOS Home Manager entry point
│ └── modules/ # Shared and platform-specific modules
├── brew/ # Homebrew Brewfiles (macOS)
└── secrets/ # sops-nix encrypted secrets
```

### Homebrew/Linuxbrew
## Setup

### macOS

1. Install [Nix](https://nixos.org/download/)
2. Clone this repository to `~/dotfiles`
3. Apply the nix-darwin configuration:
```
make macos-switch
```
4. Install Homebrew packages:
```
make macos-brew
make macos-brew-gui
```

### NixOS

1. Clone this repository to `~/dotfiles`
2. Apply the NixOS configuration:
```
make nixos-switch
```

If you don't have `brew`, you have to run `make brew` in advance.
## Makefile Targets

- `make brew-base`: install essential tools
- `make brew-gui`: install GUI apps for macOS
| Target | Description |
|--------|-------------|
| `macos-build` | Build nix-darwin configuration (dry run) |
| `macos-switch` | Apply nix-darwin + Home Manager configuration |
| `macos-brew-install` | Install Homebrew |
| `macos-brew` | Install base Homebrew packages |
| `macos-brew-gui` | Install GUI Homebrew packages |
| `macos-brew-optional` | Install optional Homebrew packages |
| `macos-brew-himkt` | Install personal Homebrew packages |
| `macos-update` | Update flake inputs |
| `macos-clean` | Delete old macOS generations (keep last 7) |
| `macos-gc` | Run Nix garbage collection |
| `nixos-build` | Build NixOS configuration (dry run) |
| `nixos-switch` | Apply NixOS + Home Manager configuration |
| `nixos-update` | Update flake inputs |
| `nixos-clean` | Delete old NixOS generations (keep last 7) |
Comment on lines +61 to +66
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Makefile uses nix-env --delete-generations +7, which deletes generations older than 7 days, not “keep last 7 generations”. Please update this table entry to match the actual behavior (or adjust the Makefile commands if you really want to keep the last 7 generations).

Suggested change
| `macos-clean` | Delete old macOS generations (keep last 7) |
| `macos-gc` | Run Nix garbage collection |
| `nixos-build` | Build NixOS configuration (dry run) |
| `nixos-switch` | Apply NixOS + Home Manager configuration |
| `nixos-update` | Update flake inputs |
| `nixos-clean` | Delete old NixOS generations (keep last 7) |
| `macos-clean` | Delete macOS generations older than 7 days |
| `macos-gc` | Run Nix garbage collection |
| `nixos-build` | Build NixOS configuration (dry run) |
| `nixos-switch` | Apply NixOS + Home Manager configuration |
| `nixos-update` | Update flake inputs |
| `nixos-clean` | Delete NixOS generations older than 7 days |

Copilot uses AI. Check for mistakes.
| `nixos-gc` | Run Nix garbage collection |
7 changes: 0 additions & 7 deletions brew/config.d/base/Brewfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
brew 'coreutils'
brew 'fzf'
brew 'gh'
brew 'git-lfs'
brew 'jq'
brew 'sheldon'
brew 'tree'
brew 'zoxide'

cask 'corretto@17'
1 change: 0 additions & 1 deletion brew/config.d/gui/Brewfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
cask 'claude-code'
cask 'codex'
cask 'font-jetbrains-mono'
cask 'ghostty'
cask 'google-chrome'
cask 'netron'
Expand Down
1 change: 0 additions & 1 deletion brew/config.d/himkt/Brewfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
tap 'himkt/tap'
brew 'himkt/tap/pathfinder'
brew 'himkt/tap/tips-cli'
cask 'himkt/tap/voicevox'
4 changes: 0 additions & 4 deletions brew/config.d/optional/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ brew 'btop'
brew 'krew'
brew 'kubernetes-cli'
brew 'libpq'
brew 'mise'
brew 'tmux'
brew 'uv'

tap 'derailed/k9s'
brew 'derailed/k9s/k9s'
Loading