Skip to content

Commit d5a83f6

Browse files
committed
Drop support for Linux and Devconainers
1 parent f2ef2da commit d5a83f6

16 files changed

Lines changed: 81 additions & 364 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,6 @@ on:
55
- "*"
66

77
jobs:
8-
test-linux:
9-
runs-on: ${{ matrix.os }}
10-
strategy:
11-
matrix:
12-
os: [ubuntu-latest, ubuntu-24.04]
13-
steps:
14-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15-
with:
16-
submodules: recursive
17-
- name: "Workaround: Prepare ~/.local/share/chezmoi"
18-
run: |
19-
mkdir -p "$HOME/.local/share"
20-
ln -s "$(pwd)" "$HOME/.local/share/chezmoi"
21-
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
22-
- name: Install dependencies
23-
run: |
24-
sudo apt install -y zsh
25-
- name: Install goss
26-
run: |
27-
sudo curl -L https://github.com/goss-org/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss
28-
sudo chmod +rx /usr/local/bin/goss
29-
- name: Run test
30-
run: |
31-
./install.sh
32-
# Run script twice to test idempotency
33-
./install.sh
34-
goss validate --format documentation
35-
368
test-macos:
379
runs-on: macos-latest
3810
steps:
@@ -63,7 +35,7 @@ jobs:
6335
- name: Install dependencies
6436
run: sudo apt install -y zsh
6537
- name: Run test
66-
run: deno run -A ./test/static.ts
38+
run: ./test/static.sh
6739

6840
actionlint:
6941
runs-on: ubuntu-latest

CLAUDE.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Repository Overview
66

7-
This is a dotfiles repository managed by chezmoi for setting up a development environment across Linux (Ubuntu) and macOS. The main focus is on Zsh configuration, terminal tools, and development environment setup.
7+
This is a dotfiles repository managed by chezmoi for setting up a macOS development environment. The main focus is on Zsh configuration, terminal tools, and development environment setup.
88

99
## Architecture
1010

@@ -13,7 +13,7 @@ This is a dotfiles repository managed by chezmoi for setting up a development en
1313
- `.tmpl` suffix for template files that use chezmoi's templating
1414
- `symlink_` prefix for symlinks
1515
- `private_` prefix for private files
16-
- **Installation**: Driven by Deno TypeScript script (`install.ts`) that handles OS-specific setup
16+
- **Installation**: Driven by shell script (`install.sh`) that handles package installation and chezmoi setup
1717
- **Configuration layers**:
1818
- Base shell configuration in `src/dot_zshenv` and `src/dot_zprofile`
1919
- Zsh config in `src/dot_config/zsh/` with modular loading
@@ -23,11 +23,8 @@ This is a dotfiles repository managed by chezmoi for setting up a development en
2323

2424
### Development and Testing
2525

26-
- `deno run -A install.ts` - Run the installation script
27-
- `deno run -A test/static.ts` - Run static analysis tests (shellcheck, zsh syntax)
28-
- `deno task watch` - Watch for changes and apply with chezmoi
29-
- `deno fmt` - Format Deno code
30-
- `deno lint` - Lint Deno code
26+
- `./install.sh` - Run the installation script
27+
- `./test/static.sh` - Run static analysis tests (shellcheck, zsh syntax)
3128

3229
### chezmoi Operations
3330

@@ -40,15 +37,14 @@ This is a dotfiles repository managed by chezmoi for setting up a development en
4037

4138
- `./install.sh` - Test installation process
4239
- `goss validate --format documentation` - Run goss tests
43-
- CI runs tests on Ubuntu and macOS with idempotency checks
40+
- CI runs tests on macOS with idempotency checks
4441

4542
## Key Files and Directories
4643

4744
### Core Installation
4845

49-
- `install.sh` - Shell script that bootstraps Deno and runs `install.ts`
50-
- `install.ts` - Main installation logic with OS detection and tool setup
51-
- `deno.jsonc` - Deno configuration with dependencies and tasks
46+
- `install.sh` - Main installation script that handles package installation and chezmoi setup
47+
- `deno.jsonc` - Deno configuration with dependencies and tasks (legacy)
5248

5349
### Configuration Management
5450

@@ -59,7 +55,7 @@ This is a dotfiles repository managed by chezmoi for setting up a development en
5955

6056
### Testing
6157

62-
- `test/static.ts` - Static analysis for shell scripts and Zsh files
58+
- `test/static.sh` - Static analysis for shell scripts and Zsh files
6359
- `test/goss/test-dotfiles.yaml` - System state validation tests
6460
- `goss.yaml` - Goss configuration
6561

@@ -80,7 +76,7 @@ Uses chezmoi templating for platform-specific configuration:
8076

8177
### Runtime Dependencies
8278

83-
- Deno for installation scripts
79+
- Shell script for installation
8480
- chezmoi for dotfiles management
8581
- Homebrew (installed automatically)
8682
- zsh shell
@@ -96,4 +92,4 @@ Uses chezmoi templating for platform-specific configuration:
9692
1. **Static Analysis**: Validate shell scripts and Zsh syntax
9793
2. **Integration Tests**: Run full installation and verify system state
9894
3. **Idempotency**: Ensure scripts can run multiple times safely
99-
4. **CI/CD**: Automated testing on Ubuntu and macOS
95+
4. **CI/CD**: Automated testing on macOS

README.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,9 @@
44

55
## Setup
66

7-
### Darwin / Ubuntu
8-
97
```sh
10-
# Ubuntu
11-
sudo apt-get update
12-
sudo apt-get upgrade
13-
sudo apt-get install -y unzip
14-
15-
# Common
168
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mono0x/dotfiles/main/install.sh)"
179

18-
# Ubuntu
19-
chsh -s /usr/bin/zsh
20-
21-
# Darwin
22-
sudo vi /etc/shells
23-
# Append /opt/homebrew/bin/zsh
10+
sudo vi /etc/shells # Append /opt/homebrew/bin/zsh
2411
chsh -s /opt/homebrew/bin/zsh
2512
```
26-
27-
### Devcontainers
28-
29-
Add the following settings to the `settings.json`.
30-
31-
```json
32-
{
33-
"dotfiles.repository": "mono0x/dotfiles",
34-
"dotfiles.targetPath": "~/.local/share/chezmoi",
35-
"dotfiles.installCommand": "~/.local/share/chezmoi/install.sh"
36-
}
37-
```

deno.jsonc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,5 @@
22
"fmt": {
33
"exclude": ["sync", "third_party"],
44
"proseWrap": "preserve"
5-
},
6-
"imports": {
7-
"@david/dax": "jsr:@david/dax@^0.43.1",
8-
"@std/fs": "jsr:@std/fs@^1.0.0",
9-
"@std/path": "jsr:@std/path@^1.0.0"
10-
},
11-
"tasks": {
12-
"watch": "sh -c 'fswatch -r -o -l 3 \"$(chezmoi source-path)\" | xargs -n1 -I{} chezmoi apply --verbose'"
135
}
146
}

deno.lock

Lines changed: 0 additions & 65 deletions
This file was deleted.

install.sh

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -eu
33

4-
deno=""
5-
if command -v deno > /dev/null 2>&1
6-
then
7-
deno="deno"
8-
else
9-
DENO_INSTALL="$HOME/.local"
10-
DENO_INSTALL="$DENO_INSTALL" sh -c "$(curl -fsSL https://deno.land/x/install/install.sh)"
11-
deno="$DENO_INSTALL/bin/deno"
4+
account="mono0x"
5+
6+
if [ "$(uname)" != "Darwin" ]; then
7+
echo "Error: Unsupported OS: $(uname)" >&2
8+
exit 1
9+
fi
10+
11+
if [ -z "${HOME:-}" ]; then
12+
echo "Error: HOME environment variable not set" >&2
13+
exit 1
1214
fi
1315

14-
prefix="$(dirname "$0")"
15-
if [ ! -f "$prefix/install.ts" ]
16-
then
17-
prefix="https://raw.githubusercontent.com/mono0x/dotfiles/main/"
16+
homebrew_dir="/opt/homebrew"
17+
brew="$homebrew_dir/bin/brew"
18+
19+
echo "Installing Homebrew"
20+
21+
if [ ! -f "$brew" ]; then
22+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
1823
fi
1924

20-
exec "$deno" run -A "$prefix/install.ts"
25+
echo "Installing and initializing chezmoi"
26+
27+
env -i HOME="$HOME" GITHUB_ACTIONS="${GITHUB_ACTIONS:-}" /bin/bash --noprofile --norc << EOF
28+
eval \$("$brew" shellenv)
29+
HOMEBREW_NO_AUTO_UPDATE=1 "$brew" install chezmoi
30+
chezmoi init --verbose --apply $account
31+
EOF

0 commit comments

Comments
 (0)