Skip to content

Commit

Permalink
chezmoi initial
Browse files Browse the repository at this point in the history
  • Loading branch information
senz committed Apr 20, 2024
0 parents commit 06b3533
Show file tree
Hide file tree
Showing 28 changed files with 4,207 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .chezmoi.toml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- $email := promptStringOnce . "email" "Email address" -}}
{{- $recipient := promptStringOnce . "recipient" "GPG recipient" -}}
{{- $fullname := promptStringOnce . "fullname" "Full name" -}}
[data]
email = {{ $email | quote }}
recipient = {{ $recipient | quote }}
fullname = {{ $fullname | quote }}

encryption = "gpg"
[gpg]
recipient = {{ $recipient | quote }}
[git]
autoCommit = true
# autoPush = true
5 changes: 5 additions & 0 deletions .chezmoiignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defaults.yaml
Brewfile*
LICENSE
README.md
install.sh
11 changes: 11 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/prulloac/devcontainer-features/chezmoi:1": {},
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
}
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2

Check warning on line 7 in .github/dependabot.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

7:1 [document-start] missing document start "---"
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly

Check failure on line 12 in .github/dependabot.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

12:6 [indentation] wrong indentation: expected 4 but found 5
160 changes: 160 additions & 0 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
---
name: MegaLinter

# Trigger mega-linter at every push. Action will also be visible from Pull
# Requests to main
on:

Check warning on line 8 in .github/workflows/mega-linter.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

8:1 [truthy] truthy value should be one of [false, true]
# Comment this line to trigger action only on pull-requests
# (not recommended if you don't pay for GH Actions)
push:

pull_request:
branches:
- main

permissions: read-all

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest

# Give the default GITHUB_TOKEN write permission to commit and push, comment
# issues & post new PR; remove the ones you do not need
permissions:
contents: write
issues: write
pull-requests: write

steps:

# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}

# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
# improve performance
fetch-depth: 0

# MegaLinter
- name: MegaLinter

# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
uses: oxsecurity/megalinter@v7

id: ml

# All available variables are described in documentation
# https://megalinter.io/configuration/
env:

# Validates all source when push on main, else just the git diff with
# main. Override with true if you always want to lint all sources
#
# To validate the entire codebase, set to:
# VALIDATE_ALL_CODEBASE: true
#
# To validate only diff with main, set to:
# VALIDATE_ALL_CODEBASE: >-
# ${{
# github.event_name == 'push' &&
# contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
# }}
VALIDATE_ALL_CODEBASE: >-
${{
github.event_name == 'push' &&
contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE
# .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY

# Uncomment to disable copy-paste and spell checks
# DISABLE: COPYPASTE,SPELL

# Upload MegaLinter artifacts
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
# Set APPLY_FIXES_IF var for use in future steps
- name: Set APPLY_FIXES_IF var
run: |
printf 'APPLY_FIXES_IF=%s\n' "${{
steps.ml.outputs.has_updated_sources == 1 &&
(
env.APPLY_FIXES_EVENT == 'all' ||
env.APPLY_FIXES_EVENT == github.event_name
) &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}}" >> "${GITHUB_ENV}"
# Set APPLY_FIXES_IF_* vars for use in future steps
- name: Set APPLY_FIXES_IF_* vars
run: |
printf 'APPLY_FIXES_IF_PR=%s\n' "${{
env.APPLY_FIXES_IF == 'true' &&
env.APPLY_FIXES_MODE == 'pull_request'
}}" >> "${GITHUB_ENV}"
printf 'APPLY_FIXES_IF_COMMIT=%s\n' "${{
env.APPLY_FIXES_IF == 'true' &&
env.APPLY_FIXES_MODE == 'commit' &&
(!contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref))
}}" >> "${GITHUB_ENV}"
# Create pull request if applicable
# (for now works only on PR from same repository, not from forks)
- name: Create Pull Request with applied fixes
uses: peter-evans/create-pull-request@v6
id: cpr
if: env.APPLY_FIXES_IF_PR == 'true'
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
labels: bot

- name: Create PR output
if: env.APPLY_FIXES_IF_PR == 'true'
run: |
echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}"
# Push new commit if applicable
# (for now works only on PR from same repository, not from forks)
- name: Prepare commit
if: env.APPLY_FIXES_IF_COMMIT == 'true'
run: sudo chown -Rc $UID .git/

- name: Commit and push applied linter fixes
uses: stefanzweifel/git-auto-commit-action@v4
if: env.APPLY_FIXES_IF_COMMIT == 'true'
with:
branch: >-
${{
github.event.pull_request.head.ref ||
github.head_ref ||
github.ref
}}
commit_message: "[MegaLinter] Apply linters fixes"
commit_user_name: megalinter-bot
commit_user_email: [email protected]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
symlinks/wireshark/recent
symlinks/wireshark/recent_common
Brewfile.lock.json
30 changes: 30 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Configuration file for MegaLinter
# See all available variables at https://megalinter.io/configuration/ and in linters documentation

# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling formats will be disabled by default
# ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default
DISABLE:

Check warning on line 6 in .mega-linter.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

6:1 [document-start] missing document start "---"
- CLOUDFORMATION
- COPYPASTE # Uncomment to disable checks of excessive copy-pastes
- CSS
- EDITORCONFIG
# - SPELL # Uncomment to disable checks of spelling mistakes
- JAVASCRIPT
- TEKTON
DISABLE_LINTERS:
- JSON_PRETTIER
- MARKDOWN_MARKDOWN_LINK_CHECK
- REPOSITORY_KICS
- SPELL_PROSELINT
- SPELL_MISSPELL
- SPELL_VALE
- SPELL_LYCHEE
DISABLE_ERRORS_LINTERS:
- PYTHON_BANDIT
- PYTHON_PYRIGHT
- REPOSITORY_DEVSKIM
- REPOSITORY_GRYPE
- REPOSITORY_SEMGREP
- REPOSITORY_TRUFFLEHOG
- SPELL_CSPELL
PRINT_ALL_FILES: false
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:

Check warning on line 3 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

3:1 [document-start] missing document start "---"
- repo: https://github.com/pre-commit/pre-commit-hooks

Check failure on line 4 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

4:4 [hyphens] too many spaces after hyphen

Check failure on line 4 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

4:1 [indentation] wrong indentation: expected at least 1
rev: v3.2.0
hooks:
- id: trailing-whitespace

Check failure on line 7 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

7:8 [hyphens] too many spaces after hyphen

Check failure on line 7 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

7:5 [indentation] wrong indentation: expected at least 5
- id: end-of-file-fixer

Check failure on line 8 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

8:8 [hyphens] too many spaces after hyphen
- id: check-yaml

Check failure on line 9 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

9:8 [hyphens] too many spaces after hyphen
- id: check-added-large-files

Check failure on line 10 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

10:8 [hyphens] too many spaces after hyphen
- repo: https://github.com/zricethezav/gitleaks

Check failure on line 11 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

11:4 [hyphens] too many spaces after hyphen
rev: v8.18.2
hooks:
- id: gitleaks

Check failure on line 14 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / MegaLinter

14:8 [hyphens] too many spaces after hyphen
args: [--verbose]
stages: [commit]
121 changes: 121 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
tap "homebrew/bundle"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/services"

# Clone of cat(1) with syntax highlighting and Git integration
brew "bat"
# Bash scripts that integrate bat with various command-line tools
brew "bat-extras"
# Manage your dotfiles across multiple diverse machines, securely
brew "chezmoi"
# Tool for exploring each layer in a docker image
brew "dive"
# Lightweight DNS forwarder and DHCP server
brew "dnsmasq", restart_service: true
# Simple, fast and user-friendly alternative to find
brew "fd"
# Command-line fuzzy finder written in Go
brew "fzf"
# Distributed revision control system
brew "git"
# Git extension for versioning large files
brew "git-lfs"
# Lightweight and flexible command-line JSON processor
brew "jq"
brew "yq"
brew "pre-commit"
# Kubernetes CLI To Manage Your Clusters In Style!
brew "k9s"
# Tool that can switch between kubectl contexts easily and create aliases
brew "kubectx"
# Mac App Store command-line interface
brew "mas"
# OpenBSD freely-licensed SSH connectivity tools
brew "openssh"
# 7-Zip (high compression file archiver) implementation
brew "p7zip"
# Execute binaries from Python packages in isolated environments
brew "pipx"
# Python package management tool
brew "poetry"
# Python version management
brew "pyenv"
# Unofficial Bitwarden CLI client
brew "rbw"
# Search tool like grep and The Silver Searcher
brew "ripgrep"
# Wrapper around ripgrep that adds multiple rich file types
brew "ripgrep-all"
# Upgrade all the things
brew "topgrade"
# Command-line unarchiving tools supporting multiple formats
brew "unar"
# Internet file retriever
brew "wget"
# GPU-accelerated terminal emulator
cask "alacritty"
# Automatic tiling window manager similar to xmonad
cask "amethyst"
# Tool to flash OS images to SD cards & USB drives
cask "balenaetcher"
# Web browser focusing on privacy
cask "brave-browser"
# E-books management software
cask "calibre"
# Free and open-source web browser
cask "chromium"
# Photography workflow application and raw developer
cask "darktable"
# App to build and share containerised applications and microservices
cask "docker"
# Elgato FACECAM configuration tool
cask "elgato-camera-hub"
# Assign keys, and then decorate and label them
cask "elgato-stream-deck"
# Free monospaced font with programming ligatures
cask "font-fira-code"
cask "font-noto-emoji"
# Finder replacement and FTP, SFTP, WebDAV and Amazon s3 client
cask "forklift"
# Cross-platform Git credential storage for multiple hosting providers
cask "git-credential-manager"
# Tools to protect your emails and files
cask "gpg-suite"
# Graphically shows disk usage within a file system
cask "grandperspective"
# Preview and audit Kindle eBooks
cask "kindle-previewer"
# Free and open-source painting and sketching program
cask "krita"
# Tool to control external monitor brightness & volume
cask "monitorcontrol"
# Toggle mute, video, record, share, and leave a meeting in a call app
cask "mutedeck"
# Open-source software for live streaming and screen recording
cask "obs"
# Android file transfer
cask "openmtp"
# System monitor for the menu bar
cask "stats"
# Media player based on MPlayer and mplayer2
cask "stolendata-mpv"
# Real time file synchronisation software
cask "syncthing"
# Unpacks archive files
cask "the-unarchiver"
# Open-source BitTorrent client
cask "transmission"
# Virtual machines UI using QEMU
cask "utm"
# OpenVPN client with AppleScript support
cask "viscosity"
# Open-source code editor
cask "visual-studio-code"
# Multimedia player
cask "vlc"
# Resources for Wacom tablets
cask "wacom-tablet"
# Compatibility layer to run Windows applications
cask "wine-devel"
mas "Brother P-touch Editor", id: 1453365242
Loading

0 comments on commit 06b3533

Please sign in to comment.