Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pragmaticivan committed Jul 5, 2024
1 parent 3853263 commit c3e8b3b
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 91 deletions.
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,11 @@ ARG USERNAME=pragmaticivan
ARG USER_UID=1000
ARG USER_GID=${USER_UID}

<<<<<<< Updated upstream
ENV TZ=America/Chicago
=======
<<<<<<< Updated upstream
ENV TZ=Asia/Tokyo
>>>>>>> Stashed changes
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
=======
RUN groupadd --gid ${USER_GID} ${USERNAME} \
&& useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} -G sudo -s /bin/bash \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& echo 'Defaults verifypw = any' >> /etc/sudoers
USER ${USERNAME}
>>>>>>> Stashed changes

WORKDIR /home/${USERNAME}

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DOCKER_IMAGE_NAME=dotfiles
DOCKER_PLATFORM=linux/amd64
DOCKER_PLATFORM=linux/arm64
#
# Docker
#
Expand All @@ -24,8 +24,8 @@ docker-build-dev:
--platform $(DOCKER_PLATFORM) . \
--build-arg USERNAME="$$(whoami)"

.PHONY: docker-run-dev
docker-run-dev: docker-build-dev
.PHONY: docker-dev
docker-dev: docker-build-dev
docker run --rm -it \
-v "$$(pwd):/home/$$(whoami)/.local/share/chezmoi" \
--platform $(DOCKER_PLATFORM) $(DOCKER_IMAGE_NAME) \
Expand Down
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,33 @@ The following is a minimal setup command to install chezmoi and my dotfiles from

> sh -c "$(curl -fsLS get.chezmoi.io)" -- init pragmaticivan --apply
## 🛠️ Update & Test 🧪

Updating and testing the dotfiles follows [chezmoi's daily operations](https://www.chezmoi.io/user-guide/daily-operations/).
To verify that the updated scripts work correctly, run the scripts on the actual local machine and on the docker container.

### 🐳 Test on Docker Container

Test the executation of the setup scripts on Ubuntu in its initial state.
The following command will launch the test environment using Docker 🐳.

```shell
make docker-dev

# docker run -it -v "$(pwd):/home/$(whoami)/.local/share/chezmoi" dotfiles /bin/bash --login
# pragmaticivan@6f97d279cb51:~$
```

Run the [`chezmoi init --apply`](https://www.chezmoi.io/user-guide/setup/#use-a-hosted-repo-to-manage-your-dotfiles-across-multiple-machines) command to verify that the system is set up correctly.

```shell
pragmaticivan@5f93d270cb51:~$ chezmoi init --apply
```

### 🦇 Unit Test with [Bats](https://github.com/bats-core/bats-core) [![Unit test](https://github.com/pragmaticivan/dotfiles/actions/workflows/macos.yaml/badge.svg)](https://github.com/pragmaticivan/dotfiles/actions/workflows/macos.yaml)

Test the shellscript for setup with [Bash Automated Testing System (bats)](https://github.com/bats-core/bats-core).
The scripts for the unit test can be found under [`./tests`](https://github.com/pragmaticivan/dotfiles/tree/main/tests) directory.

## 👏 Acknowledgements

Expand All @@ -42,4 +69,4 @@ Inspiration and code was taken from many sources, including:

## 📝 License

The code is available under the [MIT license](https://github.com/pragmaticivan/dotfiles/blob/master/LICENSE).
The code is available under the [MIT license](https://github.com/pragmaticivan/dotfiles/blob/main/LICENSE).
16 changes: 12 additions & 4 deletions home/.chezmoi.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{- $gitemail := "[email protected]" -}}
{{- $name := "Ivan Santos" -}}
{{- $editor := "Ivan Santos" -}}
{{- $visual_editor := "Ivan Santos" -}}

{{- $system := "" -}}
{{- if hasKey . "system" -}}
{{- $system = .system -}}
Expand All @@ -8,9 +13,12 @@
{{- $system = promptString "System (client or server)" -}}
{{- end -}}

sourceDir: {{ .chezmoi.sourceDir }}

---
data:
name: "Ivan Santos"
gitemail: "[email protected]"
system: {{ $system | quote }}
editor: "nvim"
visualeditor: "code"
name: {{ $name | quote }}
gitemail: {{ $gitemail | quote }}
editor: {{ $editor | quote }}
visualeditor: {{ $visual_editor | quote }}
4 changes: 4 additions & 0 deletions home/.chezmoidata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: "Ivan Santos"
gitemail: "[email protected]"
editor: "nvim"
visualeditor: "code"
122 changes: 49 additions & 73 deletions home/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,103 +6,79 @@
#
# See https://github.com/Homebrew/homebrew-bundle

# Taps #
tap "homebrew/bundle"
# tap "saulpw/vd"

# CASKS #

# Development Tools
cask "homebrew/cask/docker" # Docker
cask "visual-studio-code" # Vscode
cask "1password"
cask "alacritty"

# Communication Tools
cask "blackhole-2ch"
cask "clocker"
cask "discord"
cask "firefox"
cask "flameshot"
cask "font-fira-code-nerd-font"
cask "font-fira-mono-nerd-font"
cask "font-jetbrains-mono"
cask "font-meslo-for-powerline"
cask "google-chrome"
cask "hammerspoon"
cask "homebrew/cask/docker"
cask "iina"
cask "imageoptim"
cask "keka"
cask "little-snitch"
cask "netnewswire"
cask "notion"
cask "raycast"
cask "sensei"
cask "slack"
cask "spotify"
cask "telegram"
cask "transmission"
cask "visual-studio-code"
cask "whatsapp"
cask "whisky"
cask "zoom"

# Utility Tools
cask "blackhole-2ch"
cask "imageoptim"
cask "sensei"
cask "keka"
cask "flameshot"
cask "hammerspoon"
cask "little-snitch"
cask "1password"
cask "netnewswire"
# cask "monodraw" - To evaluate
# cask "bartender" - To evaluate

# MAS #
# mas "Affinity Photo 2: Image Editor", id: 1616822987
# mas "Affinity Designer 2", id: 1616831348
# mas "Amphetamine", id: 937984704
# mas "Deliveries: a package tracker", id: 290986013

# Entertainment Tools
cask "iina"
cask "whisky"

# Productivity Tools
cask "raycast"

# Browsers
cask "google-chrome"
cask "firefox"

# Fonts
cask "font-fira-code-nerd-font"
cask "font-fira-mono-nerd-font"
cask "font-meslo-for-powerline"
cask "font-jetbrains-mono"

# BREW #

# General packages for development and system management
brew "aspell" # Spell checker

# Encryption and security tools


# Media-related packages


# Text and terminal utilities
brew "jq"
brew "zellij"
brew "starship"
brew "nvim"
brew "zsh"
brew "1password-cli"
brew "antidote"
brew "aspell"
brew "atuin"
brew "zoxide"
brew "mise"
brew "fzf"
brew "tealdeer"
brew "lazygit"
brew "lsd"
brew "ripgrep"
brew "fd"
brew "yazi"
brew "ffmpegthumbnailer"
brew "unar"
brew "poppler"
brew "golangci-lint"
brew "bash-completion"
brew "bat"
brew "btop"
brew "gh"
brew "fd"
brew "bats-core"
brew "btop"
brew "chezmoi"
# brew "visidata" - To evaluate

# Cross-shell prompt

# Cloud Tools
brew "fd"
brew "ffmpegthumbnailer"
brew "fzf"
brew "gh"
brew "golangci-lint"
brew "jq"
brew "kubecolor"
brew "kubectx"
brew "minikube"
brew "lazydocker"
brew "lazygit"
brew "lsd"
brew "minikube"
brew "mise"
brew "nvim"
brew "poppler"
brew "ripgrep"
brew "starship"
brew "tealdeer"
brew "unar"
brew "yazi"
brew "zellij"
brew "zoxide"
brew "zsh"
2 changes: 1 addition & 1 deletion home/dot_bashrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export PATH="$PATH:$HOME/.local/bin"
export PATH=$HOME/.bin:$PATH

0 comments on commit c3e8b3b

Please sign in to comment.