Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
**Target Runtimes**: Fish 3.6+, PowerShell 5.1+/7+, Bash, Chezmoi 2.69+

**Key Features**:

- Fish shell configuration (Linux/macOS/WSL)
- PowerShell profiles (Windows)
- Vim, Tmux, Git configurations
Expand Down Expand Up @@ -293,10 +294,10 @@ PowerShell on Windows may load scripts without UTF-8 BOM encoding, causing multi
| --------- | ----------- |
| ✅ | `[OK]` |
| ❌ | `[FAIL]` |
| ⚠️ | `[WARN]` |
| 🔍 🚀 📊 | `>>` |
| ⚠️ | `[WARN]` |
| 🔍 🚀 📊 | `>>` |
| ━━━━━━ | `========` |
| ⏱️ | `[SKIP]` |
| ⏱️ | `[SKIP]` |

**Emoji is fine in**: `.fish`, `.sh`, `.md`, and other UTF-8 native files. Only `.ps1` files are affected.

Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
name: CI

# PR-only (plus dispatch). Branch protection makes the merge commit
# identical to the last PR head, so re-running on push to main is
# duplicate work. See DevSecNinja/.github docs/workflow-trigger-conventions.md.
on:
pull_request:
branches: [main]
branches:
- main
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -113,7 +115,7 @@ jobs:

- name: Set lowercase repository owner
id: lowercase
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"

- name: Log in to GitHub Container Registry
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
Expand Down Expand Up @@ -284,7 +286,10 @@ jobs:
test-light-server:
name: Test Light Server Installation
runs-on: ubuntu-latest
needs: [validate, test-install, test-coder-install]
needs:
- validate
- test-install
- test-coder-install
timeout-minutes: 20
permissions:
contents: read
Expand Down Expand Up @@ -313,7 +318,10 @@ jobs:
test-dev-server:
name: Test Dev Server Installation
runs-on: ubuntu-latest
needs: [validate, test-install, test-coder-install]
needs:
- validate
- test-install
- test-coder-install
timeout-minutes: 30
permissions:
contents: read
Expand Down Expand Up @@ -580,4 +588,4 @@ jobs:
with:
files: test-results.xml
check_name: 'Pester Test Results'
comment_mode: off
comment_mode: 'off'
11 changes: 7 additions & 4 deletions .github/workflows/devcontainer-prebuild.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
name: Prebuild Devcontainer

on:
push:
branches: [main]
branches:
- main
# Tag pushes (v*) build a release-pinned multi-arch manifest list tagged
# as :vX.Y.Z, plus a build-provenance attestation for the manifest digest.
# Source must be the tagged commit so the
Expand All @@ -17,7 +19,8 @@ on:
- 'script/devcontainer-image-size.sh'
- '.github/workflows/devcontainer-prebuild.yaml'
pull_request:
branches: [main]
branches:
- main
paths:
- '.devcontainer/**'
- 'home/**'
Expand Down Expand Up @@ -62,7 +65,7 @@ jobs:

- name: Set lowercase repository owner
id: lowercase
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"

- name: Log in to GitHub Container Registry
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
Expand Down Expand Up @@ -199,7 +202,7 @@ jobs:

- name: Set lowercase repository owner
id: lowercase
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"

- name: Determine release context
id: release
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
name: Docs

on:
push:
branches: [main]
branches:
- main
paths:
- docs/**
- mkdocs.yml
- .github/workflows/docs.yml
pull_request:
branches: [main]
branches:
- main
paths:
- docs/**
- mkdocs.yml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mirror-base-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ on:
workflow_dispatch:
# Re-mirror immediately whenever Renovate bumps the pinned upstream digest.
push:
branches: [main]
branches:
- main
paths:
- '.github/workflows/mirror-base-image.yaml'

Expand Down Expand Up @@ -87,7 +88,7 @@ jobs:
SOURCE: ${{ matrix.source }}
MIRROR_REPO: ${{ matrix.mirror-repo }}
TAG: ${{ matrix.tag }}
run: |
run: |-
set -euo pipefail

mirror="ghcr.io/${OWNER}/${MIRROR_REPO}"
Expand Down Expand Up @@ -131,4 +132,3 @@ jobs:
echo "- Source: \`${SOURCE}\`"
echo "- Mirror: \`${mirror}:${TAG}@${ghcr_digest}\`"
} >> "$GITHUB_STEP_SUMMARY"

3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ jobs:
# CHANGELOG slice as plain markdown.
gh release view "${TAG}" --repo "${REPO}" --json body --jq '.body' >/tmp/release-notes.md
# Append the log.sh consumption + provenance verification block.
# The single-quoted printf lines print a shell snippet whose $tmp and
# $HOME must stay literal, so SC2016 doesn't apply.
# shellcheck disable=SC2016
{
printf '\n\n---\n\n'
printf '## log.sh distribution\n\n'
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/sign-powershell.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Sign PowerShell Scripts

on:
Expand All @@ -6,7 +7,7 @@ on:
- main
paths:
- '**.ps1'
- '!**.ps1.tmpl' # Exclude templates - they change after chezmoi processing
- '!**.ps1.tmpl' # Exclude templates - they change after chezmoi processing
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -85,18 +86,6 @@ jobs:
Merging this PR replaces the direct push the workflow used to
perform, which is blocked by branch protection on `main`.

- name: Comment on PR
if: steps.check_changes.outputs.changes == 'true' && github.event_name == 'pull_request'
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✅ PowerShell scripts have been signed. Please pull the latest changes after merge.'
})

# --- Page on main-branch script-signing failure (homelab IRM pager) ---
notify-irm:
name: Notify Grafana IRM
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ jobs:

- name: Report failure
if: failure()
run: |
run: |-
echo "❌ Failed to sync develop branch"
echo "May require manual intervention if there are merge conflicts"
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ vim dot_config/fish/functions/mynewfunction.fish
### Testing Changes

The CI pipeline runs automatically on push and will:

- 🎯 Run lefthook hooks (formatting, linting)
- ✅ Validate all shell script syntax
- ✅ Check Fish configuration files
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ Modern dotfiles repository managed with [Chezmoi](https://chezmoi.io/), featurin
The dotfiles repository provides several variables that can be used in templates and scripts:

### User Information

- `firstname` / `lastname` / `name` - Your name (prompted on first run)
- `username` - System username (prompted on first run)
- `email` - Your email address (prompted on first run)
- `githubUsername` - Your GitHub username (auto-detected from email or git remote)

### Environment Detection

- `codespaces` - Running in GitHub Codespaces (`true`/`false`)
- `devcontainer` - Running in a dev container (`true`/`false`)
- `wsl` - Running in Windows Subsystem for Linux (`true`/`false`)
- `ci` - Running in CI environment (`true`/`false`)
- `installType` - Installation mode (`light` or `full`)

### Windows Enterprise (Windows and WSL)

- `isEntraIDJoined` - Device is Entra ID (Azure AD) joined (`true`/`false`)
- `isIntuneJoined` - Device is Intune (MDM) enrolled (`true`/`false`)
- `isEntraRegistered` - Device is Entra ID registered/workplace joined (`true`/`false`)
Expand All @@ -46,6 +49,7 @@ The dotfiles repository provides several variables that can be used in templates
- `isWork` - Device is joined to a `*Microsoft` tenant (`true`/`false`)

These variables are automatically exposed as environment variables in your shell:

- **PowerShell**: `$env:CHEZMOI_*` (e.g., `$env:CHEZMOI_IS_ENTRA_ID_JOINED`, `$env:CHEZMOI_ENTRA_ID_TENANT_NAME`)
- **Bash/Zsh**: `$CHEZMOI_*` (e.g., `$CHEZMOI_IS_ENTRA_ID_JOINED`, `$CHEZMOI_ENTRA_ID_TENANT_NAME`)
- **Fish**: `$CHEZMOI_*` (e.g., `$CHEZMOI_IS_ENTRA_ID_JOINED`, `$CHEZMOI_ENTRA_ID_TENANT_NAME`)
Expand Down Expand Up @@ -187,19 +191,22 @@ For more information, see the [Coder Dotfiles Documentation](https://coder.com/d
This repository includes a complete [DevContainer](https://containers.dev/) configuration for Visual Studio Code and GitHub Codespaces. The devcontainer provides a fully configured development environment with:

**Pre-installed Features:**

- 🍺 Homebrew package manager
- 📦 Git LFS (Large File Storage)
- 💻 PowerShell with Pester testing framework
- 🐍 Python (latest version)
- 🐙 GitHub CLI

**Automatic Setup:**

- ✅ Dotfiles automatically installed via `postCreateCommand`
- ✅ Fish shell configured as default terminal
- ✅ All configurations applied and verified
- ✅ VSCode extensions pre-installed (GitHub Copilot, Pester)

**Prebuilt Images:**

- 🚀 Prebuilt devcontainer images are automatically built and published to GitHub Container Registry
- 🏗️ Images are rebuilt weekly and on every devcontainer configuration change
- ⚡ CI workflows use prebuilt images for faster test execution
Expand Down Expand Up @@ -253,10 +260,12 @@ The CI pipeline automatically tests the complete devcontainer deployment, includ
### Personal Information

On first run, Chezmoi will prompt for:

- **Name**: Used in Git commits
- **Email**: Used in Git commits

To re-enter this information:

```bash
chezmoi init --data=false
```
Expand Down Expand Up @@ -302,6 +311,7 @@ lefthook run pre-commit --all-files
```

Hooks will automatically run on `git commit`. The checks include:

- 🐚 Shell script linting (shellcheck)
- 🎨 Shell script formatting (shfmt)
- 🔧 Executable bit enforcement on shell scripts
Expand Down Expand Up @@ -378,11 +388,13 @@ On Windows, Microsoft Surface Laptop models always have the hardware power
button set to **Do nothing** for both AC and battery power.

The mode is auto-detected based on:

- Hostname patterns (SVLDEV* = full, SVL* = light)
- Environment (codespaces, devcontainer, CI = light)
- Default = full mode

To change modes:

```bash
chezmoi init --data=false
```
Expand Down
Loading
Loading