Skip to content

Commit

Permalink
refactor: various simplifications (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
gametaro authored Jan 5, 2024
1 parent cbc8bc2 commit a5caad7
Show file tree
Hide file tree
Showing 22 changed files with 190 additions and 219 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ trim_trailing_whitespace = true

[*.zsh]
ignore = true

[*.fish]
indent_size = 4

[Dockerfile]
indent_size = 4
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
41 changes: 41 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Publish Container

on:
push:
branches:
- main

jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Buildah Action
id: build
uses: redhat-actions/buildah-build@v2
with:
image: dotfiles
tags: latest ${{ github.sha }}
containerfiles: |
./Dockerfile
- name: Log in to the GitHub Container registry
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push to GitHub Container Repository
id: push
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}

- name: Echo outputs
run: |
echo "${{ toJSON(steps.push.outputs) }}"
1 change: 0 additions & 1 deletion .shellcheckrc

This file was deleted.

47 changes: 32 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
FROM ubuntu:rolling
# Use a specific version of archlinux base image with development tools
# FROM archlinux:base-devel-20231112.0.191179
FROM archlinux:base-devel-20231105.0.189722

# Set environment variables
ENV SHELL=/usr/bin/fish \
EDITOR=nvim \
VISUAL=nvim \
SUDO_EDITOR=nvim \
MANPAGER="nvim +Man!"

# Update system and install necessary packages
RUN pacman -Syu --noconfirm \
chezmoi \
fd \
fish \
git \
nodejs \
npm \
ripgrep && \
pacman -Scc --noconfirm

WORKDIR /root
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
sudo \
ca-certificates \
software-properties-common \
gpg-agent \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

RUN sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply gametaro
COPY install-neovim.sh .

RUN /root/install-neovim.sh nightly /usr/local/bin

RUN printf '#!/bin/bash\nexec /bin/bash -l -c "$*"' > /entrypoint.sh && \
chmod +x /entrypoint.sh
# Copy configuration and run headless installation of plugins
RUN chezmoi init --apply gametaro --branch simplify
RUN nvim --headless "+Lazy! restore" +qa

ENTRYPOINT [ "/entrypoint.sh", "nvim" ]
CMD [ "--headless", "--listen", "0.0.0.0:12345" ]
# Expose port for the service and set entrypoint and default command
EXPOSE 12345
ENTRYPOINT ["nvim"]
CMD ["--headless", "--listen", "0.0.0.0:12345"]
4 changes: 0 additions & 4 deletions home/.chezmoiexternal.yaml.tmpl

This file was deleted.

9 changes: 0 additions & 9 deletions home/.chezmoiignore.tmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{{ if ne .chezmoi.os "darwin" }}
.chezmoiscripts/darwin/**
{{ end }}

{{ if ne .chezmoi.os "linux" }}
.chezmoiscripts/linux/**
{{ end }}

{{ if ne .chezmoi.os "windows" }}
.chezmoiscripts/windows/**
AppData
Documents
{{ end }}
Expand Down
33 changes: 0 additions & 33 deletions home/.chezmoiscripts/darwin/run_onchange_before_get-pkgs.sh.tmpl

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions home/.chezmoiscripts/linux/run_onchange_after_conf-20-rtx.sh

This file was deleted.

4 changes: 0 additions & 4 deletions home/.chezmoiscripts/linux/run_onchange_after_conf-30-nvim.sh

This file was deleted.

39 changes: 0 additions & 39 deletions home/.chezmoiscripts/linux/run_onchange_before_get-pkgs.sh.tmpl

This file was deleted.

4 changes: 0 additions & 4 deletions home/.chezmoiscripts/linux/run_onchange_before_get-rtx.sh

This file was deleted.

7 changes: 0 additions & 7 deletions home/.chezmoiscripts/linux/run_onchange_before_get-sheldon.sh

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions home/.chezmoiscripts/windows/run_onchange_before_get-pkgs.ps1.tmpl

This file was deleted.

5 changes: 0 additions & 5 deletions home/dot_config/npm/dot_npmrc

This file was deleted.

1 change: 0 additions & 1 deletion home/dot_config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ local function lazy()
require('lint').linters_by_ft = {
gitcommit = { 'gitlint' },
markdown = { 'markdownlint' },
sh = { 'shellcheck' },
yaml = { 'actionlint' },
zsh = { 'zsh' },
}
Expand Down
41 changes: 41 additions & 0 deletions home/dot_config/private_fish/config.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -gx fish_greeting ''

abbr v nvim

abbr ch chezmoi
abbr cha chezmoi apply
abbr chu chezmoi update

abbr g git
abbr ga git add
abbr gaa git add --all
abbr gau git add --update
abbr gb git branch
abbr gc git commit
abbr gca git commit --amend
abbr gcam git commit --amend --message
abbr gcane git commit --amend --no-edit
abbr gco git checkout
abbr gd git diff
abbr gdc git diff --cached
abbr gf git fetch
abbr gfa git fetch --all
abbr gg git grep
abbr ggg git grep-group
abbr ggn git grep -n
abbr gl git log
abbr glg git log --graph
abbr gll git log-list
abbr glll git log-list-long
abbr glo git log --oneline
abbr glp git log --patch
abbr gls git ls-files
abbr gm git merge
abbr gma git merge --abort
abbr gmc git merge --continue
abbr gp git pull
abbr gpf git pull --ff-only
abbr gpr git pull --rebase
abbr grb git rebase
abbr gs git status
abbr gss git status --short
32 changes: 0 additions & 32 deletions home/dot_config/rtx/config.toml

This file was deleted.

24 changes: 0 additions & 24 deletions home/dot_rtx.toml

This file was deleted.

Loading

0 comments on commit a5caad7

Please sign in to comment.