Skip to content

Commit

Permalink
Fixes for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
erichlf committed Apr 27, 2024
1 parent 3cbafd0 commit 931aace
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 84 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/install-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ on:
push:
branches:
- main
- devcontainer
jobs:
install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: install
run: ./install.sh 1
run: ./install.sh
env:
CI: true
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# dotfiles

This repo contains all my config files.

## Contents

The main things in this are a highly modified lunarvim, a basic setup of zsh
using oh-my-zsh. All dotfiles are installed via stow. `$DOTFILES/my-home`
contains all the dotfiles that go directly in `$HOME`, while `$DOTFILES/config`
contains all the dotfiles that go in `$HOME/config`. Additionally zsh plugins
exist in `$DOTFILES/zsh`, which go in
`$DOTFILES/my-home/dot-oh-my-zsh/custom/plugins`. And we don't talk about
`$DOTFILES/private`.
using zgen and oh-my-zsh. All dotfiles are installed via stow.
`$DOTFILES/my-home` contains all the dotfiles that go directly in `$HOME`,
while `$DOTFILES/config` contains all the dotfiles that go in `$HOME/config`.
And we don't talk about `$DOTFILES/private`.

Honestly the most useful thing in hear for those that are looking would be
the configuration of lunarvim, which can be found in `$DOTFILES/config/lvim`.
Expand All @@ -19,7 +19,8 @@ that it is an example of how to highly modify lunarvim. The most important
files are in `$DOTFILES/config/lvim/lua/user`. The naming should be mostly
self-explanatory.

## Install
## Install

To install everythings, which is quite a bit and almost certainly
not what you really want to do, just run `./install.sh`. This will bring up a
UI that allows you to select the features you want to install. There is a menu
Expand Down
11 changes: 0 additions & 11 deletions config/lvim/lua/user/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,6 @@ table.insert(lvim.builtin.alpha.dashboard.section.buttons.entries,
)

-- LSP
lvim.lsp.installer.setup.ensure_installed = {
"clangd",
"cmake",
"docker_compose_language_service",
"dockerls",
"lemminx",
"lua_ls",
"pyright",
"taplo",
"yamlls",
}
require("lvim.lsp.null-ls.formatters").setup {
{ name = "black" },
{ name = "clang-format" },
Expand Down
11 changes: 6 additions & 5 deletions config/lvim/lua/user/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ lvim.plugins = {
},

{
-- "erichlf/nvim-devcontainer-cli",
dir = "/home/elfoster/workspace/nvim-devcontainer-cli",
dev = true,
branch = "DevContainerExec",
"erichlf/devcontainer-cli.nvim",
-- dir = "/home/elfoster/workspace/devcontainer-cli.nvim",
-- dev = true,
-- branch = "AddShell",
opts = {
interactive = true,
interactive = false,
dotfiles_repository = "https://github.com/erichlf/dotfiles.git",
dotfiles_branch = "devcontainer",
dotfiles_targetPath = "~/dotfiles",
dotfiles_installCommand = "install.sh",
shell = "zsh",
},
keys = {
-- stylua: ignore
Expand Down
1 change: 0 additions & 1 deletion config/lvim/lua/user/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ mappings["g"]["b"] = {} -- git new branch
mappings["g"]["l"] = {} -- git blame
mappings["bf"] = {} -- buffer find
mappings["c"] = {} -- close buffer
mappings["h"] = {} -- no highlight
mappings["s"] = {} -- search
mappings["w"] = {} -- save
vmappings["/"] = {} -- comment
Expand Down
123 changes: 65 additions & 58 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ codename=`lsb_release -a 2>/dev/null | grep Codename | awk -F ' ' '{print $2}'`
release=`lsb_release -a 2>/dev/null | grep Release | awk -F ' ' '{print $2}'`

DOTFILES_DIR=$(pwd)
echo "$DOTFILES_DIR"

############################# grab dotfiles ####################################
# dotfiles already exist since I am running this script!
# git clone git@github.com:erichlf/dotfiles.git
(cd $DOTFILES_DIR && git submodule update --init --recursive)
git submodule update --init --recursive

cmd=( \
dialog \
Expand All @@ -35,7 +36,7 @@ options=(1 "Fresh system setup"
8 "Update system"
9 "sudo rules")

if [ CI ]; then
if [ $CI ]; then
choices=1
else
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
Expand All @@ -62,6 +63,7 @@ function no_ppa_exists(){

function add_ppa(){
sudo add-apt-repository ppa:$1 -y
apt_update

return 0
}
Expand Down Expand Up @@ -101,30 +103,46 @@ function sym_links(){
stow -v --adopt --dir $DOTFILES_DIR/private/ --target $HOME/.ssh --restow .ssh
stow -v --adopt --dir $DOTFILES_DIR --target $HOME/.config/ --restow config
# if the adopt made a local change then undo that
git checkout HEAD -- config my-home private

return 0
}

############################# my base system ###################################
#bikeshed contains utilities such as purge-old-kernels
function base_sys(){
cd $HOME
sudo add-apt-repository -y universe

echo "Setting up shell..."
if no_ppa_exists linuxuprising
then
add_ppa linuxuprising/guake
fi

apt_install \
btop \
cifs-utils \
curl \
dconf-cli \
dconf-editor \
fzf \
gnome-tweaks \
guake \
iftop \
nfs-common \
tmux \
wget \
zsh

guake --restore-preferences $DOTFILES_DIR/guake.conf

sudo chsh -s $(which zsh) $(whoami)

# memory for cd
curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash

chsh -s /usr/bin/zsh
# zsh plugin manager
[ ! -d $HOME/.zgen ] && git clone https://github.com/tarjoilija/zgen.git ${HOME}/.zgen

# tool to figure out why my last command didn't work
snap_install thefuck --beta --classic
Expand All @@ -142,35 +160,39 @@ function base_sys(){
./starship.sh --bin-dir $HOME/.local/bin/ -y
rm -f starship.sh

echo "Setting up networking..."
apt_install \
network-manager-openvpn \
network-manager-openvpn-gnome \
network-manager-vpnc
# sudo /etc/init.d/networking restart

cd $DOTFILES_DIR
network-manager-vpnc \
openssh-server

echo "Installing developer tools..."
if [ ! -d "$HOME/workspace" ]; then
mkdir "$HOME/workspace"
fi

apt_install \
build-essential \
clang \
clang \
clang-format \
clang-tools \
cmake \
g++ \
gcc \
git-completion \
global \
libtool-bin \
meld \
python3-dev \
python3-ipython \
python3-matplotlib \
python3-numpy \
python3-pip
python3-scipy \
python3-setuptools \
python3-pip \
python3-scipy \
python3-setuptools

# need dnspython and unrar are needed by calibre
echo "Installing python linters..."
pip3_install \
autoflake \
black \
Expand All @@ -181,29 +203,25 @@ function base_sys(){
wheel \
yapf

if no_ppa_exists linuxuprising
then
add_ppa linuxuprising/guake
fi

if no_ppa_exists ppa-verse
then
add_ppa ppa-verse/neovim
fi

echo "Installing VIM..."
apt_install \
freeglut3-dev \
git-completion
global \
guake \
libtool-bin \
meld \
git-lfs \
golang-go \
neovim \
openssh-server \
nodejs \
python3-git \
python3-venv \
python3-yaml \
xclip

# install zgen
[ ! -d $HOME/.zgen ] && git clone https://github.com/tarjoilija/zgen.git ${HOME}/.zgen

# treesitter for vim
npm install -g neovim tree-sitter
snap_install --edge chafa # needed by telescope-media-files

# install lunarvim
curl -sSL https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh | LV_BRANCH='release-1.3/neovim-0.9' bash -s -- -y
Expand All @@ -216,39 +234,28 @@ function base_sys(){
install lazygit $HOME/.local/bin
cd -

# restore guake config
guake --restore-preferences guake.conf

sudo update-alternatives --config editor

apt_install \
gnupg \
ca-certificates
echo "Setting up docker..."
apt_install \
ca-certificates \
containerd \
gnupg

apt_update
apt_install \
docker-compose \
docker.io \
git-lfs \
golang-go \ # used by gitlab nvim plugin
nodejs \
python3-git \
python3-venv \
python3-yaml

snap_install --edge chafa # needed by telescope-media-files
sudo usermod -a -G docker $USER
sudo systemctl daemon-reload
sudo systemctl restart docker

newgrp docker
# devcontainer cli

echo "Installing vscode..."
npm install -g @devcontainers/cli
# treesitter for vim
npm install -g neovim tree-sitter

# install vscode
apt_install \
apt-transport-https \
software-properties-common
Expand All @@ -264,13 +271,14 @@ function base_sys(){
echo "net.core.rmem_max=26214400" | sudo tee /etc/sysctl.d/10-udp-buffer-sizes.conf
echo "net.core.rmem_default=26214400" | sudo tee -a /etc/sysctl.d/10-udp-buffer-sizes.conf

cd /tmp

echo "Installing extras..."
apt_update
apt_install chrome-gnome-shell

cd /tmp
wget -c https://downloads.vivaldi.com/stable/vivaldi-stable_6.6.3271.45-1_amd64.deb
sudo dpkg -i vivaldi-stable*.deb
cd $DOTFILES_DIR

curl -sS https://downloads.1password.com/linux/keys/1password.asc | sudo gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpg
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/amd64 stable main' | sudo tee /etc/apt/sources.list.d/1password.list
Expand All @@ -289,14 +297,8 @@ function base_sys(){
sudo chmod 755 /etc/1password/custom_allowed_browsers

# install signal desktop
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
sudo tee /etc/apt/sources.list.d/signal-xenial.list
apt_update
apt_install signal-desktop
snap_install signal-desktop

cd $DOTFILES_DIR
return 0
}

Expand Down Expand Up @@ -346,15 +348,19 @@ function latitude_7440(){

######################## remove things I never use #############################
function crapware(){
sudo apt-get remove -y \
thunderbird \
transmission-gtk \
echo "Removing crapware..."
pkgs="thunderbird transmission-gtk"
for pkg in $(echo $pkgs); do
echo "Removing $pkgsToRemove"
sudo apt-get --yes --purge remove $pkg || true
done

return 0
}

########################## update and upgrade ##################################
function update_sys(){
echo "Updating system..."
apt_update
sudo apt-get -y upgrade

Expand All @@ -363,6 +369,7 @@ function update_sys(){

############################## annoyances ######################################
function sudo_rules(){
echo "Setting sudo rules..."
sudo_rule /sbin/shutdown
sudo_rule /sbin/reboot

Expand Down
3 changes: 3 additions & 0 deletions my-home/dot-zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ eval "$(zoxide init --cmd cd zsh)"
setopt nonomatch

eval "$(starship init zsh)"

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

0 comments on commit 931aace

Please sign in to comment.