Agent SkillsAgent Skills
greenheadHQ

managing-macos

@greenheadHQ/managing-macos
greenheadHQ
1
0 forks
Updated 4/1/2026
View on GitHub

Configure macOS/nix-darwin: Dock, Finder, Homebrew Cask, Folder Actions. Trigger: 'darwin-rebuild', 'shottr 설정', 'Folder Actions', 'compress-video', 'upload-immich'.

Installation

$npx agent-skills-cli install @greenheadHQ/managing-macos
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Path.claude/skills/managing-macos/SKILL.md
Branchmain
Scoped Name@greenheadHQ/managing-macos

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: managing-macos description: | Configure macOS/nix-darwin: Dock, Finder, Homebrew Cask, Folder Actions. Trigger: 'darwin-rebuild', 'shottr 설정', 'Folder Actions', 'compress-video', 'upload-immich'.

macOS 관리 (nix-darwin)

nix-darwin 및 macOS 시스템 설정 가이드입니다.

빠른 참조

macOS 전용 nrs 옵션

nrs --force               # activation scripts 강제 재실행 (NO_CHANGES 스킵 우회)

nrs/nrp 소스: modules/shared/scripts/rebuild-common.sh, modules/darwin/scripts/{nrs,nrp}.sh

주요 설정 파일

파일용도
modules/darwin/configuration.nixmacOS 시스템 설정
modules/darwin/home.nixHome Manager (macOS)
modules/darwin/programs/macOS 전용 프로그램

Nix CLI 패키지 (darwin-only)

libraries/packages.nixdarwinOnly 리스트에서 관리:

# 패키지 추가
darwinOnly = [ ... pkgs.패키지명 ];

자세한 내용: references/features.md

macOS 시스템 설정

설정파일설명
Dockconfiguration.nix자동 숨김, 크기, 최근 앱
Finderconfiguration.nix숨김 파일, 확장자, 네트워크 .DS_Store 방지
키보드configuration.nix키 반복 속도
트랙패드configuration.nix탭 클릭, 자연스러운 스크롤

Homebrew 관리

modules/darwin/programs/homebrew.nix에서 선언적으로 관리됩니다 (personal 호스트만 적용).

# cleanup = "none" — 선언되지 않은 앱을 삭제하지 않음 (수동 설치 cask 보호)
# upgrade = true + greedyCasks = true — 자체 업데이터 앱의 버전 드리프트 방지
homebrew.casks = [
  "codex" "ghostty" "raycast" "rectangle"
  "hammerspoon" "homerow" "docker-desktop"
  "fork" "monitorcontrol"
];
homebrew.brews = [ "laishulu/homebrew/macism" "sox" ]; # Neovim 한영 전환, 오디오 처리
# shottr → Nix 패키지로 관리 (libraries/packages.nix darwinOnly)
# figma → Homebrew에서 제거 (자체 업데이터가 버전을 변경하여 adopt 시 버전 충돌)
# slack → Homebrew에서 제거 (수동 설치 선호, 자체 업데이터에 위임)

새 Mac 세팅 시: 직접 설치된 앱은 brew install --cask --adopt <앱>으로 Homebrew 관리로 전환 필요.

자세한 내용: references/features.md

Shottr 선언 관리 (Nix + agenix)

Shottr 설정과 라이센스를 선언적으로 관리합니다.

파일용도
modules/darwin/programs/shottr/default.nixShottr 앱 고유 설정 + 라이센스 pre-fill
modules/darwin/configuration.nixsymbolic hotkeys (스크린샷 단축키) + activateSettings + Shottr 재시작
libraries/constants.nixShottr 기본 저장경로 상대 경로 상수
secrets/shottr-license.ageagenix 암호화 라이센스 키 (KC_LICENSE + KC_VAULT)
modules/shared/programs/secrets/default.nix~/.config/shottr/license 배포

아키텍처 노트: symbolic hotkeys와 Shottr 재시작은 configuration.nix의 postActivation에서 처리합니다. HM activation의 activateSettings -ulaunchctl asuser + sudo 컨텍스트에서 WindowServer와 통신하지 못하기 때문입니다.

운영 순서:

# 설정 적용 (라이센스 pre-fill 포함)
nrs
# 새 맥북: Shottr 실행 후 Activate 버튼 1회 클릭

크레덴셜 이중 저장 구조(Keychain + defaults), HM activation 주의사항, defaults 테스트 절차 상세: references/shottr-credentials.md

Folder Actions (launchd WatchPaths)

modules/darwin/programs/folder-actions/default.nix에서 launchd WatchPaths 기반 폴더 감시 자동화를 관리합니다.

액션감시 폴더용도
compress-rar~/FolderActions/compress-rarRAR 압축
compress-video~/FolderActions/compress-videoFFmpeg 비디오 압축
rename-asset~/FolderActions/rename-asset파일 이름 변경
convert-video-to-gif~/FolderActions/convert-video-to-gifFFmpeg 비디오→GIF 변환
upload-immichShottr 스크린샷 폴더Immich 자동 업로드 (personal 전용)

로그: ~/Library/Logs/folder-actions/

자주 발생하는 문제

  1. sudo 권한 필요: darwin-rebuild는 시스템 파일 수정에 sudo 필요
  2. /etc/bashrc 충돌: 기존 설정 파일과 nix-darwin 충돌
  3. 스크롤 방향 롤백: cfprefsd 재시작 시 설정 초기화

레퍼런스