├── local ├── files ├── .gitconfig ├── omarchy │ ├── monitors.conf │ ├── init.lua │ ├── lua │ │ └── config │ │ │ └── keymaps.lua │ └── input.conf ├── alacritty.yml ├── gitignore ├── pg_hba.conf ├── init.vim ├── vimrc ├── bashrc_omarchy └── bashrc ├── .gitignore ├── package_managers ├── snap.yml ├── appimages.yml └── app_image_launcher.yml ├── communication ├── slack.yml └── discord.yml ├── devices ├── keyboard.yml ├── bluetooth.yml └── monitor.yml ├── sec ├── ssh.yml ├── vpn.yml └── 1password_cli.sh ├── content ├── spotify.yml ├── audacity.yml └── obs.yml ├── devtools ├── heroku.yml ├── docker │ └── prepare_installation.sh ├── hoppscotch.yml ├── lefthook.yml ├── git.yml ├── alacritty.yml ├── docker.yml ├── vim.yml ├── neovim.yml └── kubernetes.yml ├── languages ├── ruby.yml ├── rust.yml └── nodejs.yml ├── browser └── google-chrome.yml ├── other ├── settings.yml └── playbook.yml ├── style └── fonts.yml ├── tasks └── alias.yml ├── main.sh ├── Readme.md └── Makefile /local: -------------------------------------------------------------------------------- 1 | localhost ansible_connection=local 2 | -------------------------------------------------------------------------------- /files/.gitconfig: -------------------------------------------------------------------------------- 1 | [core] 2 | editor = vim 3 | excludesfile = /home/pavel/.gitignore 4 | -------------------------------------------------------------------------------- /files/omarchy/monitors.conf: -------------------------------------------------------------------------------- 1 | env = GDK_SCALE,2 2 | monitor = eDP-1,1920x1080@60,0x0,1 3 | -------------------------------------------------------------------------------- /files/alacritty.yml: -------------------------------------------------------------------------------- 1 | shell: 2 | program: /bin/bash 3 | args: 4 | - --login 5 | font: 6 | normal: 7 | family: "Martian Mono" 8 | size: 12.0 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /roles 2 | download_installer_linux.sh 3 | Outline-Client.AppImage 4 | rvm_install.bash 5 | rust_install.sh 6 | devtools/HTTPie.AppImage 7 | *.deb 8 | -------------------------------------------------------------------------------- /package_managers/snap.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become_user: root 3 | tasks: 4 | - community.general.snap: 5 | name: glab 6 | channel: latest/edge 7 | -------------------------------------------------------------------------------- /communication/slack.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Install slack 5 | community.general.snap: 6 | name: 7 | - slack 8 | become: true 9 | -------------------------------------------------------------------------------- /communication/discord.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Install discord 5 | community.general.snap: 6 | name: 7 | - discord 8 | become: true 9 | -------------------------------------------------------------------------------- /devices/keyboard.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | - name: Configure keyboard layout and remap keys 4 | command: setxkbmap -layout us,ru -option ctrl:nocaps -option grp:lctrl_toggle 5 | -------------------------------------------------------------------------------- /files/gitignore: -------------------------------------------------------------------------------- 1 | #Vim files 2 | *.swp 3 | *.swn 4 | *.swo 5 | *.swm 6 | *.swn 7 | *.swl 8 | *.swk 9 | 10 | #Dolphin files 11 | *.directory 12 | 13 | *~ 14 | 15 | #Byebug 16 | .byebug_history 17 | -------------------------------------------------------------------------------- /sec/ssh.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | - name: Generate an OpenSSH keypair with the default values (4096 bits, rsa) 4 | community.crypto.openssh_keypair: 5 | path: /home/pavel/.ssh/id_rsa 6 | -------------------------------------------------------------------------------- /content/spotify.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | become_user: root 4 | tasks: 5 | - name: Install spotify 6 | community.general.snap: 7 | name: 8 | - spotify 9 | become: true 10 | -------------------------------------------------------------------------------- /content/audacity.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | become_user: root 4 | tasks: 5 | - name: Install audacity 6 | community.general.snap: 7 | name: 8 | - audacity 9 | become: true 10 | -------------------------------------------------------------------------------- /devtools/heroku.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become_user: root 3 | tasks: 4 | - name: Install heroku 5 | become: true 6 | community.general.snap: 7 | classic: true 8 | name: 9 | - heroku 10 | -------------------------------------------------------------------------------- /package_managers/appimages.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become_user: root 3 | tasks: 4 | - name: "FUSE2: Install" 5 | become: true 6 | package: 7 | name: 8 | - libfuse2 9 | when: ansible_pkg_mgr == 'apt' 10 | -------------------------------------------------------------------------------- /devices/bluetooth.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become_user: root 3 | tasks: 4 | - name: Install bluetooth packages 5 | become: true 6 | package: 7 | name: 8 | - blueman 9 | - bluez 10 | - bluez-obexd 11 | -------------------------------------------------------------------------------- /files/omarchy/init.lua: -------------------------------------------------------------------------------- 1 | -- bootstrap lazy.nvim, LazyVim and your plugins 2 | require("config.lazy") 3 | 4 | -- Disable line wrapping by default 5 | vim.opt.wrap = false 6 | 7 | -- Enable relative line numbers like the init.vim configuration 8 | vim.opt.relativenumber = true 9 | 10 | -------------------------------------------------------------------------------- /files/pg_hba.conf: -------------------------------------------------------------------------------- 1 | local all postgres trust 2 | local all all trust 3 | host all all 127.0.0.1/32 trust 4 | host all all ::1/128 trust 5 | -------------------------------------------------------------------------------- /languages/ruby.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | - name: "Ruby: RVM download" 4 | command: curl -sSL https://get.rvm.io -o ./rvm_install.bash 5 | 6 | - name: "Ruby: RVM installation" 7 | command: bash ./rvm_install.bash 8 | 9 | - name: Add gemrc file 10 | copy: 11 | content: | 12 | gem: --no-ri --no-rdoc 13 | dest: /home/$USER/.gemrc 14 | -------------------------------------------------------------------------------- /languages/rust.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | - name: "Rust: install clang" 4 | become: true 5 | package: 6 | name: 7 | - clang 8 | 9 | - name: "Rust: download rustup" 10 | command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o ./rust_install.sh 11 | 12 | - name: "Rust: install rustup" 13 | command: sh ./rust_install.sh -y 14 | -------------------------------------------------------------------------------- /devtools/docker/prepare_installation.sh: -------------------------------------------------------------------------------- 1 | sudo rm -f /etc/apt/keyrings/docker.gpg 2 | mkdir -m 0755 -p /etc/apt/keyrings 3 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 4 | echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 5 | apt-get update 6 | -------------------------------------------------------------------------------- /devtools/hoppscotch.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | - name: Download Hoppscotch 4 | become_user: true 5 | get_url: 6 | url: https://github.com/hoppscotch/releases/releases/latest/download/Hoppscotch_linux_x64.deb 7 | dest: ./Hoppscotch.AppImage 8 | 9 | - name: Depackage Hoppscotch 10 | command: dpkg -i Hoppscotch_linux_x64.deb 11 | become: true 12 | 13 | - name: Install Hoppscotch 14 | command: apt install -yf 15 | become: true 16 | -------------------------------------------------------------------------------- /sec/vpn.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | #- name: "Private Internet Access: Download" 4 | # get_url: 5 | # url: https://installers.privateinternetaccess.com/download/pia-linux-3.3.1-06924.run 6 | # dest: ./download_installer_linux.sh 7 | 8 | #- name: Change file mode 9 | # file: 10 | # path: ./download_installer_linux.sh 11 | # mode: "+x" 12 | 13 | #- name: "Private Internet Access: Install" 14 | #command: ./download_installer_linux.sh 15 | -------------------------------------------------------------------------------- /devtools/lefthook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | become_user: root 4 | tasks: 5 | - name: Install lefthook as a gem on Omarchy 6 | community.general.gem: 7 | name: lefthook 8 | state: present 9 | become: true 10 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 11 | 12 | - name: Install lefthook via snap 13 | community.general.snap: 14 | name: 15 | - lefthook 16 | become: true 17 | when: ansible_env.OS is not defined or ansible_env.OS != "omarchy" 18 | -------------------------------------------------------------------------------- /devices/monitor.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | - name: Ensure Hyprland config directory exists 4 | file: 5 | path: ~/.config/hypr 6 | state: directory 7 | 8 | - name: Copy monitor configuration 9 | copy: 10 | src: ../files/omarchy/monitors.conf 11 | dest: ~/.config/hypr/monitors.conf 12 | 13 | - name: Copy input configuration 14 | copy: 15 | src: ../files/omarchy/input.conf 16 | dest: ~/.config/hypr/input.conf 17 | 18 | - name: Configure monitor 19 | command: hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1 20 | -------------------------------------------------------------------------------- /package_managers/app_image_launcher.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become_user: root 3 | tasks: 4 | - package: 5 | name: 6 | - software-properties-common 7 | become: true 8 | when: ansible_pkg_mgr == 'apt' 9 | - command: add-apt-repository ppa:appimagelauncher-team/stable 10 | become: true 11 | when: ansible_pkg_mgr == 'apt' 12 | - command: apt-get update 13 | become: true 14 | when: ansible_pkg_mgr == 'apt' 15 | - package: 16 | name: 17 | - appimagelauncher 18 | become: true 19 | when: ansible_pkg_mgr == 'apt' 20 | -------------------------------------------------------------------------------- /devtools/git.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | vars: 3 | name: "Pavel Kalashnikov" 4 | email: "kalashnikovisme@gmail.com" 5 | tasks: 6 | - name: Install git 7 | package: 8 | name: 9 | - git 10 | - command: git config --global user.email "{{ email }}" 11 | - command: git config --global user.name "{{ name }}" 12 | - command: git config --global core.excludesfile ~/.gitignore 13 | - command: git config --global core.editor "vim" 14 | - command: git config --global init.defaultBranch "main" 15 | - copy: 16 | src: "../files/gitignore" 17 | dest: "~/.gitignore" 18 | -------------------------------------------------------------------------------- /devtools/alacritty.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Install Alacritty (Omarchy) 5 | become: true 6 | package: 7 | name: alacritty 8 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 9 | 10 | - name: Ensure Alacritty config directory exists 11 | file: 12 | path: ~/.config/alacritty 13 | state: directory 14 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 15 | 16 | - name: Configure Alacritty 17 | copy: 18 | src: ../files/alacritty.yml 19 | dest: ~/.config/alacritty/alacritty.yml 20 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 21 | -------------------------------------------------------------------------------- /files/omarchy/lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | -- Keymaps are automatically loaded on the VeryLazy event 2 | -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua 3 | -- Add any additional keymaps here 4 | 5 | -- Free up the "s" key for custom usage in normal and visual modes 6 | vim.keymap.del("n", "s") 7 | vim.keymap.del("x", "s") 8 | 9 | -- Omarchy-specific function key mappings for saving and quitting 10 | vim.keymap.set({ "n", "i" }, "", "w", { silent = true, desc = "Save file" }) 11 | vim.keymap.set({ "n", "i" }, "", "q", { silent = true, desc = "Quit" }) 12 | vim.keymap.set({ "n", "i" }, "", "wq", { silent = true, desc = "Save and quit" }) 13 | -------------------------------------------------------------------------------- /sec/1password_cli.sh: -------------------------------------------------------------------------------- 1 | sudo -s \ 2 | curl -sS https://downloads.1password.com/linux/keys/1password.asc | \ 3 | gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpg 4 | echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/$(dpkg --print-architecture) stable main" | 5 | tee /etc/apt/sources.list.d/1password.list 6 | mkdir -p /etc/debsig/policies/AC2D62742012EA22/ 7 | curl -sS https://downloads.1password.com/linux/debian/debsig/1password.pol | \ 8 | tee /etc/debsig/policies/AC2D62742012EA22/1password.pol 9 | mkdir -p /usr/share/debsig/keyrings/AC2D62742012EA22 10 | curl -sS https://downloads.1password.com/linux/keys/1password.asc | \ 11 | gpg --dearmor --output /usr/share/debsig/keyrings/AC2D62742012EA22/debsig.gpg 12 | apt update && apt install 1password-cli 13 | -------------------------------------------------------------------------------- /content/obs.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become_user: root 3 | tasks: 4 | - name: Install obs virtual camera (Debian) 5 | become: true 6 | package: 7 | name: 8 | - v4l2loopback-dkms 9 | when: ansible_pkg_mgr == 'apt' 10 | 11 | - name: Update repository for OBS (Debian) 12 | shell: sudo add-apt-repository ppa:obsproject/obs-studio 13 | when: ansible_pkg_mgr == 'apt' 14 | 15 | - name: Refresh packages (Debian) 16 | shell: sudo apt -y update 17 | when: ansible_pkg_mgr == 'apt' 18 | 19 | - name: Install obs (Debian) 20 | package: 21 | name: 22 | - obs-studio 23 | become: true 24 | when: ansible_pkg_mgr == 'apt' 25 | 26 | - name: Install obs (Omarchy) 27 | package: 28 | name: 29 | - obs-studio 30 | become: true 31 | when: ansible_pkg_mgr == 'pacman' 32 | -------------------------------------------------------------------------------- /files/omarchy/input.conf: -------------------------------------------------------------------------------- 1 | input { 2 | # Use multiple keyboard layouts and switch between them with Left Alt + Right Alt 3 | # kb_layout = us,dk,eu 4 | kb_layout = us,ru 5 | kb_options = ctrl:nocaps,grp:lctrl_toggle # ,grp:alts_toggle 6 | 7 | # Change speed of keyboard repeat 8 | repeat_rate = 40 9 | repeat_delay = 600 10 | 11 | # Start with numlock on by default 12 | numlock_by_default = true 13 | 14 | # Increase sensitity for mouse/trackpack (default: 0) 15 | # sensitivity = 0.35 16 | 17 | touchpad { 18 | # Use natural (inverse) scrolling 19 | # natural_scroll = true 20 | 21 | # Use two-finger clicks for right-click instead of lower-right corner 22 | # clickfinger_behavior = true 23 | 24 | # Control the speed of your scrolling 25 | scroll_factor = 0.4 26 | } 27 | } 28 | 29 | # Scroll faster in the terminal 30 | windowrule = scrolltouchpad 1.5, class:Alacritty 31 | -------------------------------------------------------------------------------- /languages/nodejs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Install nvm 5 | shell: curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 6 | 7 | - name: Add Yarn apt key 8 | become: yes 9 | shell: curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - 10 | when: ansible_pkg_mgr == 'apt' 11 | 12 | - name: Add Yarn repository 13 | become: yes 14 | shell: echo "deb https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list 15 | when: ansible_pkg_mgr == 'apt' 16 | 17 | - name: Install yarn (Debian) 18 | become: yes 19 | apt: 20 | name: yarn 21 | update_cache: yes 22 | when: ansible_pkg_mgr == 'apt' 23 | 24 | - name: Install yarn (Arch) 25 | become: yes 26 | pacman: 27 | name: yarn 28 | state: present 29 | when: ansible_pkg_mgr == 'pacman' 30 | 31 | -------------------------------------------------------------------------------- /browser/google-chrome.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | become: true 3 | tasks: 4 | - name: Download Google Chrome .deb 5 | get_url: 6 | url: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 7 | dest: ./google-chrome.deb 8 | when: ansible_pkg_mgr == 'apt' 9 | 10 | - name: Install Google Chrome (Debian/Ubuntu) 11 | apt: 12 | deb: ./google-chrome.deb 13 | when: ansible_pkg_mgr == 'apt' 14 | 15 | - name: Ensure Flathub remote is configured (Omarchy) 16 | community.general.flatpak_remote: 17 | name: flathub 18 | state: present 19 | flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo 20 | when: ansible_pkg_mgr == 'pacman' 21 | 22 | - name: Install Google Chrome via Flatpak (Omarchy) 23 | community.general.flatpak: 24 | name: com.google.Chrome 25 | state: present 26 | remote: flathub 27 | when: ansible_pkg_mgr == 'pacman' 28 | -------------------------------------------------------------------------------- /other/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Configure GNOME settings 5 | when: ansible_distribution == 'Ubuntu' 6 | block: 7 | - name: Set Terminal as favorite app 8 | command: gsettings set org.gnome.shell favorite-apps "['org.gnome.Terminal.desktop', 'piavpn.desktop', 'sidekick-browser.desktop', 'telegramdesktop.desktop', 'gnome-control-center.desktop']" 9 | 10 | - name: Set dark theme 11 | command: gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' 12 | 13 | - name: Set accent color as Purple 14 | command: gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-purple' 15 | 16 | - name: Set dock fixed false 17 | command: gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed false 18 | 19 | - name: Enable dock autohide 20 | command: gsettings set org.gnome.shell.extensions.dash-to-dock autohide true 21 | 22 | - name: Set dock to Bottom 23 | command: gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM 24 | -------------------------------------------------------------------------------- /style/fonts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | vars: 4 | martian_mono_version: "1.0.0" 5 | tasks: 6 | - name: Download MartianMono 7 | get_url: 8 | url: "https://github.com/evilmartians/mono/releases/download/v{{ martian_mono_version }}/martian-mono-{{ martian_mono_version }}-ttf.zip" 9 | dest: "./" 10 | 11 | - name: Unzip files 12 | command: "unzip -o martian-mono-{{ martian_mono_version }}-ttf.zip" 13 | 14 | - name: Install font 15 | copy: 16 | src: "MartianMono-sWdxLt.ttf" 17 | dest: "~/.local/share/fonts/" 18 | 19 | - name: Use font in the Terminal 20 | command: dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/font "'MartianMono sWd xLt 12'" 21 | when: ansible_distribution == 'Ubuntu' 22 | 23 | - name: Remove all temp files 24 | find: 25 | paths: "./" 26 | patterns: "MartianMono" 27 | use_regex: true 28 | register: martian_mono_files 29 | 30 | - file: 31 | state: absent 32 | path: "{{ item }}" 33 | loop: "{{ martian_mono_files.files|map(attribute='path')|list }}" 34 | 35 | - file: 36 | path: "{{ item }}" 37 | state: absent 38 | with_items: 39 | - "./martian-mono-{{ martian_mono_version }}-ttf.zip" 40 | - "Changelog.md" 41 | - "__MACOSX" 42 | - "README.txt" 43 | -------------------------------------------------------------------------------- /devtools/docker.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | vars: 3 | docker_compose_version: "2.19.1" 4 | become_user: root 5 | tasks: 6 | - name: "Docker: Install prerequisites (Ubuntu)" 7 | package: 8 | name: 9 | - ca-certificates 10 | - gnupg 11 | - curl 12 | become: true 13 | when: ansible_pkg_mgr == 'apt' and ansible_distribution == 'Ubuntu' 14 | - name: "Docker: prepare installation" 15 | command: sh ./docker/prepare_installation.sh 16 | become: true 17 | when: ansible_pkg_mgr == 'apt' and ansible_distribution == 'Ubuntu' 18 | - name: "Docker: install (Ubuntu)" 19 | package: 20 | name: 21 | - docker-ce 22 | - docker-ce-cli 23 | - containerd.io 24 | - docker-buildx-plugin 25 | - docker-compose-plugin 26 | become: true 27 | when: ansible_pkg_mgr == 'apt' and ansible_distribution == 'Ubuntu' 28 | - name: Post-install docker actions. Create docker group 29 | group: 30 | name: docker 31 | state: present 32 | when: ansible_distribution == 'Ubuntu' 33 | - name: "Install docker-compose version: {{ docker_compose_version }}" 34 | command: 'curl -L "https://github.com/docker/compose/releases/download/v{{ docker_compose_version }}/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose' 35 | become: true 36 | when: ansible_distribution == 'Ubuntu' 37 | - name: Add execute permissions 38 | become: true 39 | file: 40 | path: /usr/local/bin/docker-compose 41 | mode: +x 42 | when: ansible_distribution == 'Ubuntu' 43 | -------------------------------------------------------------------------------- /tasks/alias.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - lineinfile: dest=~/.bashrc state=present line={{ item }} 5 | with_items: 6 | - alias gc='git commit' 7 | - alias gp='git push' 8 | - alias gpt='git push --tags' 9 | - alias gs='git status' 10 | - alias gd='git diff' 11 | - alias gap='git add -p' 12 | - alias ga='git add .' 13 | - alias gco='git checkout' 14 | - alias gf='git fetch origin && git checkout' 15 | - alias gcF='git commit --amend' 16 | - alias gbc='git checkout -b' 17 | - alias gfs='git flow feature start' 18 | - alias gff='git flow feature finish' 19 | - alias ghs='git flow hotfix start' 20 | - alias ghf='git flow hotfix finish' 21 | - alias grs='git flow release start' 22 | - alias grf='git flow release finish' 23 | - alias gups='git push --set-upstream origin' 24 | - alias glt='git describe --abbrev=0 --tags' 25 | - alias gplr='git pull --rebase' 26 | - alias pga='for D in *; do [ -d "${D}" ] && cd "${D}" && (pg || true) && cd ..; done' 27 | - alias fuck='sudo !!' 28 | - alias opengem='_() { cd $(rvm gemdir)/gems/$(gem list | grep -o "$1 (\([0-9]\.*\)*" | sed "s/ (/-/"); }; _' 29 | - alias dm="gp && gco main && gp && gpt && gco develop" 30 | - alias gce='git commit --allow-empty -m "Empty commit"' 31 | - lineinfile: 32 | dest: ~/.bashrc 33 | state: present 34 | line: "alias vi='nvim'" 35 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 36 | - lineinfile: 37 | dest: ~/.bashrc 38 | state: present 39 | line: "alias vim='nvim'" 40 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 41 | -------------------------------------------------------------------------------- /main.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | OS="$1" 6 | 7 | if [ -z "$OS" ]; then 8 | if [ -f /etc/arch-release ]; then 9 | OS="omarchy" 10 | elif [ -f /etc/debian_version ]; then 11 | OS="ubuntu" 12 | fi 13 | fi 14 | 15 | # Normalize the OS argument to avoid common copy/paste issues 16 | OS=$(echo "$OS" | tr '[:upper:]' '[:lower:]' | tr -d '\r\n') 17 | 18 | # Collect sudo password for Ansible privilege escalation 19 | read -s -p "Enter sudo password: " ANSIBLE_BECOME_PASS 20 | echo 21 | echo "$ANSIBLE_BECOME_PASS" | sudo -S true 22 | export ANSIBLE_BECOME_PASS 23 | export ANSIBLE_BECOME_PASSWORD="$ANSIBLE_BECOME_PASS" 24 | 25 | case "$OS" in 26 | omarchy) 27 | echo 'Upgrade pacman' 28 | sudo pacman -Syu --noconfirm 29 | echo 'Install make' 30 | sudo pacman -S --noconfirm make 31 | echo 'Install ansible' 32 | make install_ansible_omarchy 33 | ;; 34 | *ubuntu*|*debian*) 35 | echo 'Upgrade apt' 36 | sudo apt-get -y upgrade 37 | echo 'apt-get update' 38 | sudo apt-get -y update 39 | echo 'Install make' 40 | sudo apt-get install -y make 41 | echo 'Install ansible' 42 | OS="ubuntu" 43 | make install_ansible_ubuntu 44 | ;; 45 | *) 46 | echo "Usage: $0 [omarchy|ubuntu]" 47 | exit 1 48 | ;; 49 | esac 50 | 51 | echo 'Set needed permissions for ansible' 52 | sudo chown -R $USER ~/.ansible/ 53 | echo 'Install environment' 54 | OS=$OS make install_environment && make update_neovim && make update_bash 55 | 56 | if [ "$OS" = "ubuntu" ]; then 57 | echo 'Add current user to docker group' 58 | sudo usermod -a -G docker $USER 59 | 60 | echo 'Change docker owner to current user' 61 | sudo chown $USER:$USER /var/run/docker.sock 62 | 63 | echo 'NOW, LOG OUT AND LOG BACK TO APPLY DOCKER CHANGES' 64 | fi 65 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # [@kalashnikovisme](github.com/kalashnikovisme) environment installation 2 | 3 | Just run 4 | 5 | ### Ubuntu 6 | 7 | ``` 8 | sudo apt-get install unzip && wget -O main.zip https://github.com/kalashnikovisme/dotfiles/archive/refs/heads/main.zip && unzip main.zip -d dotfiles && cd dotfiles/dotfiles-main && ./main.sh ubuntu && cd ~ && sudo rm -rf main.zip dotfiles 9 | ``` 10 | 11 | ### Omarchy 12 | 13 | ``` 14 | sudo pacman -Sy --noconfirm unzip wget && wget -O main.zip https://github.com/kalashnikovisme/dotfiles/archive/refs/heads/main.zip && unzip main.zip -d dotfiles && cd dotfiles/dotfiles-main && ./main.sh omarchy && cd ~ && sudo rm -rf main.zip dotfiles 15 | ``` 16 | 17 | ## What is it? 18 | 19 | It's script to setup my own configuration for Ubuntu or Omarchy 20 | 21 | It installs Ansible and use Ansible playbook to install other applications 22 | 23 | ## Files 24 | 25 | * [vimrc](https://github.com/kalashnikovisme/dotfiles/blob/master/files/vimrc) 26 | * [gitconfig](https://github.com/kalashnikovisme/dotfiles/blob/master/files/.gitconfig) 27 | * [bashrc](https://github.com/kalashnikovisme/dotfiles/blob/master/files/bashrc) 28 | * [bashrc_omarchy](https://github.com/kalashnikovisme/dotfiles/blob/master/files/bashrc_omarchy) 29 | * [gitignore](https://github.com/kalashnikovisme/dotfiles/blob/master/files/gitignore) 30 | 31 | ## Actions 32 | 33 | ### Applications 34 | 35 | *Items with asterix are also configurated as I like :)* 36 | 37 | 1. Ansible* 38 | 2. Make 39 | 3. PostgreSQL* 40 | 4. htop 41 | 5. git* 42 | 6. curl 43 | 7. SQLite 44 | 8. Bison 45 | 9. Aptitude 46 | 10. Vim* 47 | 11. Unetbootin 48 | 12. GParted 49 | 13. Arduino 50 | 14. ffmpeg 51 | 15. docker* 52 | 16. docker-compose* 53 | 17. rvm* 54 | 18. GIMP 55 | 19. Ubuntu Tweaks 56 | 20. Google Chrome (Ubuntu only) 57 | 21. Rocket.Chat Desktop 58 | 22. pyenv 59 | 23. cmake 60 | 24. Rust 61 | 25. Telegram 62 | 26. 1Password and 1Password CLI 63 | 64 | ### Configurations 65 | 66 | * bashrc / bashrc_omarchy 67 | * dpkg 68 | -------------------------------------------------------------------------------- /devtools/vim.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Copy .vimrc file 5 | copy: 6 | src: ../files/vimrc 7 | dest: ~/.vimrc 8 | - name: Install Vim and needed stuff 9 | become: true 10 | package: 11 | name: 12 | - vim 13 | - vim-nox 14 | - vim-gtk 15 | - vim-gtk3 16 | - vim-athena 17 | - git: 18 | repo: https://github.com/ingydotnet/yaml-vim.git 19 | dest: ~/vim_files 20 | - file: 21 | path: ~/.vim/syntax 22 | state: directory 23 | - copy: 24 | src: ~/vim_files/syntax/yaml.vim 25 | dest: ~/.vim/syntax/yaml.vim 26 | tags: vim 27 | - file: 28 | path: ~/.vim/scripts 29 | state: directory 30 | tags: vim 31 | - copy: 32 | src: ~/vim_files/{{ item }} 33 | dest: ~/.vim/scripts/{{ item }} 34 | tags: vim 35 | with_items: 36 | - yamlsort.vim 37 | - yamlsort.rb 38 | - file: 39 | path: ~/vim_files 40 | state: absent 41 | - file: 42 | path: ~/.vim/plugin/ 43 | state: directory 44 | force: yes 45 | - file: 46 | path: /home/$USER/.vim 47 | state: directory 48 | - copy: 49 | src: "../files/vimrc" 50 | dest: "~/.vimrc" 51 | - name: Install deoplete (Debian) 52 | package: 53 | name: 54 | - python3-pip 55 | when: ansible_pkg_mgr == 'apt' 56 | 57 | - name: Install deoplete (Omarchy) 58 | package: 59 | name: 60 | - python-pip 61 | when: ansible_pkg_mgr == 'pacman' 62 | - name: Install pynvim and msgpack (Debian) 63 | become: true 64 | package: 65 | name: 66 | - python3-pynvim 67 | - python3-msgpack 68 | when: ansible_pkg_mgr == 'apt' 69 | 70 | - name: Install pynvim and msgpack (Omarchy) 71 | become: true 72 | package: 73 | name: 74 | - python-pynvim 75 | - python-msgpack 76 | when: ansible_pkg_mgr == 'pacman' 77 | -------------------------------------------------------------------------------- /devtools/neovim.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Remove LazyVim directories on Omarchy 5 | file: 6 | path: "{{ item }}" 7 | state: absent 8 | loop: 9 | - ~/.config/nvim 10 | - ~/.local/share/nvim 11 | - ~/.local/state/nvim 12 | - ~/.cache/nvim 13 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 14 | 15 | - name: Install Neovim 16 | become: yes 17 | package: 18 | name: neovim 19 | state: present 20 | 21 | - name: Ensure pynvim Python module is installed on Omarchy 22 | pip: 23 | name: pynvim 24 | state: latest 25 | executable: pip3 26 | extra_args: --user 27 | when: ansible_env.OS is defined and ansible_env.OS == "omarchy" 28 | 29 | - name: Ensure ~/.config/nvim directory exists 30 | file: 31 | path: ~/.config/nvim/ 32 | state: directory 33 | mode: '0755' 34 | 35 | - name: Copy existing init.vim to ~/.config/nvim/init.vim 36 | copy: 37 | src: ../files/init.vim 38 | dest: ~/.config/nvim/init.vim 39 | remote_src: yes 40 | 41 | - name: Replace instances of ~/.vim with ~/.config/nvim in init.vim 42 | lineinfile: 43 | path: ~/.config/nvim/init.vim 44 | regexp: 'let data_dir = has(.nvim.) ? stdpath(.data.) . /site : ~/.vim' 45 | line: 'let data_dir = has("nvim") ? stdpath("data") . "/site" : "~/.config/nvim"' 46 | 47 | - name: Ensure vim-plug is installed for Neovim 48 | shell: | 49 | curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ 50 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 51 | args: 52 | creates: ~/.local/share/nvim/site/autoload/plug.vim 53 | 54 | - name: Check if Neovim is installed successfully 55 | command: nvim --version 56 | register: nvim_version 57 | 58 | - name: Debug output to ensure Neovim is working 59 | debug: 60 | var: nvim_version.stdout 61 | 62 | - name: Test Neovim configuration by opening Neovim 63 | shell: nvim +PlugInstall +qall 64 | -------------------------------------------------------------------------------- /other/playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - name: Install needed packages (Debian) 5 | package: 6 | name: 7 | - xclip 8 | - htop 9 | - graphviz 10 | - curl 11 | - build-essential 12 | - openssl 13 | - libreadline6-dev 14 | - zlib1g 15 | - zlib1g-dev 16 | - libssl-dev 17 | - libyaml-dev 18 | - libreadline-dev 19 | - libsqlite3-dev 20 | - libxslt1-dev 21 | - libgdbm-dev 22 | - libncurses5-dev 23 | - libncursesw5-dev 24 | - libbz2-dev 25 | - libsqlite3-dev 26 | - llvm 27 | - xz-utils 28 | - tk-dev 29 | - automake 30 | - libtool 31 | - bison 32 | - libffi-dev 33 | - liblzma-dev 34 | - libsqlite3-0 35 | - libmysqlclient-dev 36 | - aptitude 37 | - openvpn 38 | - vlc 39 | - postgresql 40 | - gparted 41 | - arduino 42 | - arduino-core 43 | - ffmpeg 44 | - net-tools 45 | - libpq-dev 46 | - ruby-dev 47 | - redis-server 48 | - cmake 49 | - ncdu 50 | - mumble 51 | - libpq-dev 52 | - libmagickwand-dev 53 | - gimp 54 | - gnome-tweaks 55 | become: yes 56 | when: ansible_pkg_mgr == 'apt' 57 | 58 | - name: Install needed packages (Omarchy) 59 | package: 60 | name: 61 | - xclip 62 | - htop 63 | - graphviz 64 | - curl 65 | - base-devel 66 | - openssl 67 | - readline 68 | - zlib 69 | - sqlite 70 | - llvm 71 | - xz 72 | - tk 73 | - automake 74 | - libtool 75 | - bison 76 | - libffi 77 | - openvpn 78 | - vlc 79 | - postgresql 80 | - gparted 81 | - arduino 82 | - ffmpeg 83 | - net-tools 84 | - libpqxx 85 | - ruby 86 | - redis 87 | - cmake 88 | - ncdu 89 | - mumble 90 | - imagemagick 91 | - gimp 92 | - gnome-tweaks 93 | - flatpak 94 | become: yes 95 | when: ansible_pkg_mgr == 'pacman' 96 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | install_environment: 2 | ansible-playbook browser/google-chrome.yml -i local -vv -e curdir=$(CURDIR); 3 | ansible-galaxy install -p $(CURDIR)/roles azavea.postgresql --ignore-errors 4 | ansible-galaxy install -p $(CURDIR)/roles geerlingguy.nodejs --ignore-errors 5 | ansible-playbook devtools/git.yml -i local -vv 6 | ansible-playbook other/playbook.yml -i local -vv -e curdir=$(CURDIR) 7 | if [ "$(OS)" = "ubuntu" ]; then \ 8 | ansible-playbook package_managers/snap.yml -i local -vvv -e curdir=$(CURDIR); \ 9 | fi 10 | if [ "$(OS)" = "ubuntu" ]; then \ 11 | ansible-playbook devtools/docker.yml -i local -vv -e curdir=$(CURDIR); \ 12 | fi 13 | ansible-playbook languages/nodejs.yml -i local -vv -e curdir=$(CURDIR) 14 | if [ "$(OS)" = "ubuntu" ]; then \ 15 | ansible-playbook content/audacity.yml -i local -vv -e curdir=$(CURDIR); \ 16 | fi 17 | ansible-playbook content/obs.yml -i local -vv -e curdir=$(CURDIR) 18 | if [ "$(OS)" = "ubuntu" ]; then \ 19 | ansible-playbook communication/slack.yml -i local -vv -e curdir=$(CURDIR); \ 20 | ansible-playbook communication/discord.yml -i local -vv -e curdir=$(CURDIR); \ 21 | ansible-playbook content/spotify.yml -i local -vv -e curdir=$(CURDIR); \ 22 | fi 23 | ansible-playbook style/fonts.yml -i local -vv -e curdir=$(CURDIR) 24 | ansible-playbook devtools/alacritty.yml -i local -vv 25 | ansible-playbook package_managers/appimages.yml -i local -vv 26 | ansible-playbook languages/ruby.yml -i local -vv 27 | ansible-playbook languages/rust.yml -i local -vv 28 | if [ "$(OS)" = "ubuntu" ]; then \ 29 | ansible-playbook devtools/heroku.yml -i local -vv; \ 30 | fi 31 | ansible-playbook package_managers/app_image_launcher.yml -i local -vv 32 | ansible-playbook other/settings.yml -i local -vv 33 | mkdir -p ~/projects/ 34 | ansible-playbook sec/vpn.yml -i local -vv 35 | ansible-playbook devtools/lefthook.yml -i local -vv 36 | if [ "$(OS)" = "omarchy" ]; then \ 37 | ansible-playbook devices/monitor.yml -i local -vv; \ 38 | ansible-playbook devices/keyboard.yml -i local -vv; \ 39 | fi 40 | install_ansible_ubuntu: 41 | sudo apt install -y software-properties-common 42 | sudo apt install -y ansible 43 | ansible-galaxy collection install community.general 44 | install_ansible_omarchy: 45 | sudo pacman -Syu --noconfirm ansible 46 | ansible-galaxy collection install community.general 47 | update_neovim: 48 | if [ "$(OS)" = "ubuntu" ]; then \ 49 | ansible-playbook devtools/neovim.yml -i local -vv; \ 50 | fi 51 | update_bash: 52 | if [ "$(OS)" = "omarchy" ]; then \ 53 | cp -f files/bashrc_omarchy ~/.bashrc; \ 54 | else \ 55 | cp -f files/bashrc ~/.bashrc; \ 56 | fi 57 | ansible-playbook tasks/alias.yml -i local -vv 58 | aquarium: 59 | ansible-playbook devices/bluetooth.yml -i local -vv 60 | -------------------------------------------------------------------------------- /devtools/kubernetes.yml: -------------------------------------------------------------------------------- 1 | - hosts: all 2 | tasks: 3 | - name: Prepare to install kubectl 4 | command: apt install -y apt-transport-https ca-certificates 5 | - name: Download the Google Cloud public signing key 6 | shell: curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg 7 | - name: Add the Kubernetes apt repository 8 | shell: echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list 9 | - name: apt-get -y update 10 | shell: apt-get -y update 11 | - name: Install kubectl 12 | command: apt install -y kubectl 13 | - name: Install k9s 14 | shell: snap install k9s 15 | - name: Install helm 16 | shell: snap install helm --classic 17 | # NOTE: All lines between 24 and EOF are from https://github.com/LukinEgor/dotfiles/blob/master/packages/tasks/main.yml#L212 18 | - name: Install sops 19 | vars: 20 | sops_version: 3.6.1 21 | shell: | 22 | wget https://github.com/mozilla/sops/releases/download/v{{ sops_version }}/sops-v{{ sops_version }}.linux 23 | sudo chmod +x sops-v{{ sops_version }}.linux 24 | sudo mv sops-v{{ sops_version }}.linux /usr/local/bin/sops 25 | - name: Check kubecfg 26 | command: which kubecfg 27 | register: kubecfg 28 | failed_when: kubecfg.rc != 1 and kubecfg.rc != 0 29 | 30 | 31 | - name: Install kubecfg 32 | vars: 33 | kubecfg_version: 0.16.0 34 | when: kubecfg.stdout == "" 35 | shell: | 36 | wget https://github.com/bitnami/kubecfg/releases/download/v{{ kubecfg_version }}/kubecfg-linux-amd64 37 | sudo chmod +x kubecfg-linux-amd64 38 | sudo mv kubecfg-linux-amd64 /usr/local/bin/kubecfg 39 | - name: Check helmfile 40 | command: which helmfile 41 | register: helmfile 42 | failed_when: helmfile.rc != 1 and helmfile.rc != 0 43 | 44 | 45 | - name: Install helmfile 46 | vars: 47 | helmfile_version: 0.130.0 48 | when: helmfile.stdout == "" 49 | shell: | 50 | wget https://github.com/roboll/helmfile/releases/download/v{{ helmfile_version }}/helmfile_linux_amd64 51 | sudo chmod +x helmfile_linux_amd64 52 | sudo mv helmfile_linux_amd64 /usr/local/bin/helmfile 53 | - name: Check helm_diff 54 | command: helm plugin list | grep diff 55 | register: helm_diff 56 | failed_when: helm_diff.rc != 1 and helm_diff.rc != 0 57 | 58 | - name: Install helm_diff 59 | when: helm_diff.stdout == "" 60 | shell: | 61 | helm plugin install https://github.com/databus23/helm-diff 62 | 63 | - name: Install doctl 64 | community.general.snap: 65 | name: 66 | - doctl 67 | 68 | - name: Configure doctl 69 | command: snap connect doctl:kube-config 70 | 71 | - name: Fix doctl 72 | file: 73 | path: "~/.kube" 74 | state: directory 75 | -------------------------------------------------------------------------------- /files/init.vim: -------------------------------------------------------------------------------- 1 | set nu 2 | set expandtab 3 | set relativenumber 4 | set sw=2 5 | set sts=2 6 | let g:fuzzy_ignore = "gems/*" 7 | set nocompatible 8 | filetype off 9 | let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' 10 | if empty(glob(data_dir . '/autoload/plug.vim')) 11 | silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 12 | autocmd VimEnter * PlugInstall --sync | source $MYVIMRC 13 | endif 14 | call plug#begin() 15 | Plug 'scrooloose/nerdtree' 16 | Plug 'kchmck/vim-coffee-script' 17 | Plug 'scrooloose/syntastic' 18 | Plug 'Shougo/deoplete.nvim' 19 | Plug 'roxma/nvim-yarp' 20 | Plug 'roxma/vim-hug-neovim-rpc' 21 | Plug 'tpope/vim-rails' 22 | Plug 'slim-template/vim-slim' 23 | Plug 'isRuslan/vim-es6' 24 | Plug 'tpope/vim-fugitive' 25 | Plug 'tpope/vim-surround' 26 | Plug 'elixir-lang/vim-elixir' 27 | Plug 'leafgarland/typescript-vim' 28 | Plug 'mxw/vim-jsx' 29 | Plug 'wakatime/vim-wakatime' 30 | Plug 'sebdah/vim-delve' 31 | Plug 'posva/vim-vue' 32 | Plug 'maxmellon/vim-jsx-pretty' 33 | Plug 'tpope/vim-commentary' 34 | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 35 | Plug 'junegunn/fzf.vim' 36 | Plug 'vim-ruby/vim-ruby' 37 | Plug 'tpope/vim-haml' 38 | Plug 'styled-components/vim-styled-components' 39 | Plug 'vim-airline/vim-airline' 40 | Plug 'vim-airline/vim-airline-themes' 41 | Plug 'kristijanhusak/vim-carbon-now-sh' 42 | Plug 'junegunn/goyo.vim' 43 | Plug 'hashivim/vim-terraform' 44 | call plug#end() 45 | syntax enable 46 | filetype plugin indent on 47 | imap :w 48 | map :w 49 | imap :q! 50 | map :q! 51 | imap :wq 52 | map :wq 53 | imap :noh 54 | map :noh 55 | imap :%d_ 56 | map :%d_ 57 | imap :FZF 58 | map :FZF 59 | imap :new:FZF 60 | map :new:FZF 61 | nmap :CarbonNowSh:CarbonNowSh 62 | vmap :CarbonNowSh:CarbonNowSh 63 | map :NERDTreeToggle 64 | nmap :wincmd k 65 | nmap :wincmd j 66 | nmap :wincmd h 67 | nmap :wincmd l 68 | let g:neocomplete#enable_at_startup = 2 69 | au BufRead,BufNewFile *.thor set syntax=ruby 70 | au BufRead,BufNewFile *.simplecov set syntax=ruby 71 | au BufRead,BufNewFile *.gemfile set syntax=ruby 72 | au BufRead,BufNewFile *.axlsx set syntax=ruby 73 | au BufRead,BufNewFile *.es6 set filetype=javascript 74 | au BufRead,BufNewFile *.vue set filetype=javascript 75 | au BufRead,BufNewFile *.vue set syntax=javascript 76 | au BufRead,BufNewFile *.babelrc set syntax=javascript 77 | au BufRead,BufNewFile *.go set tabstop=2 78 | au BufRead,BufNewFile Makefile set tabstop=2 79 | au BufRead,BufNewFile Dockerfile* set syntax=dockerfile 80 | au BufRead,BufNewFile .eslintrc set syntax=json 81 | au BufRead,BufNewFile *.tsx set syntax=typescript 82 | au BufRead,BufNewFile *.erdconfig set syntax=yaml 83 | au BufRead,BufNewFile *.hbs set syntax=html 84 | au BufNewFile,BufRead * if &syntax == '' | set syntax=sh | endif 85 | au BufNewFile,BufRead template/*.rb set filetype=eruby 86 | au BufRead,BufNewFile *.rb.tt set syntax=eruby 87 | au BufRead,BufNewFile *.tf set filetype=terraform 88 | au BufRead,BufNewFile *.tfvars set filetype=terraform 89 | autocmd FileType vue noremap :%!vue-formatter 90 | set hlsearch 91 | if has("autocmd") 92 | autocmd FileType ruby set complete+=k/home/pavel/.vim/complete/custom.vim 93 | endif " has("autocmd") 94 | let g:deoplete#enable_at_startup = 1 95 | autocmd FileType go set noexpandtab 96 | set clipboard=unnamedplus 97 | let g:codegpt_openai_api_key = $OPENAI_API_KEY 98 | -------------------------------------------------------------------------------- /files/vimrc: -------------------------------------------------------------------------------- 1 | set nu 2 | set expandtab 3 | set relativenumber 4 | set sw=2 5 | set sts=2 6 | let g:fuzzy_ignore = "gems/*" 7 | set nocompatible 8 | filetype off 9 | let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' 10 | if empty(glob(data_dir . '/autoload/plug.vim')) 11 | silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 12 | autocmd VimEnter * PlugInstall --sync | source $MYVIMRC 13 | endif 14 | call plug#begin() 15 | Plug 'scrooloose/nerdtree' 16 | Plug 'kchmck/vim-coffee-script' 17 | Plug 'scrooloose/syntastic' 18 | Plug 'Shougo/deoplete.nvim' 19 | Plug 'roxma/nvim-yarp' 20 | Plug 'roxma/vim-hug-neovim-rpc' 21 | Plug 'tpope/vim-rails' 22 | Plug 'slim-template/vim-slim' 23 | Plug 'isRuslan/vim-es6' 24 | Plug 'tpope/vim-fugitive' 25 | Plug 'tpope/vim-surround' 26 | Plug 'elixir-lang/vim-elixir' 27 | Plug 'leafgarland/typescript-vim' 28 | Plug 'mxw/vim-jsx' 29 | Plug 'wakatime/vim-wakatime' 30 | Plug 'sebdah/vim-delve' 31 | Plug 'posva/vim-vue' 32 | Plug 'maxmellon/vim-jsx-pretty' 33 | Plug 'tpope/vim-commentary' 34 | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 35 | Plug 'junegunn/fzf.vim' 36 | Plug 'vim-ruby/vim-ruby' 37 | Plug 'tpope/vim-haml' 38 | Plug 'styled-components/vim-styled-components' 39 | Plug 'vim-airline/vim-airline' 40 | Plug 'vim-airline/vim-airline-themes' 41 | Plug 'kristijanhusak/vim-carbon-now-sh' 42 | Plug 'junegunn/goyo.vim' 43 | Plug 'github/copilot.vim' 44 | " Plug 'dpayne/codeGPT.nvim' 45 | Plug 'chrisbra/csv.vim' 46 | call plug#end() 47 | 48 | syntax enable 49 | filetype plugin indent on 50 | 51 | " Key mappings 52 | imap :w 53 | map :w 54 | imap :q! 55 | map :q! 56 | imap :wq 57 | map :wq 58 | imap :noh 59 | map :noh 60 | imap :%d_ 61 | map :%d_ 62 | imap :FZF 63 | map :FZF 64 | imap :new:FZF 65 | map :new:FZF 66 | nmap :CarbonNowSh:CarbonNowSh 67 | vmap :CarbonNowSh:CarbonNowSh 68 | map :NERDTreeToggle 69 | nmap :wincmd k 70 | nmap :wincmd j 71 | nmap :wincmd h 72 | nmap :wincmd l 73 | 74 | " Settings and autocommands 75 | let g:neocomplete#enable_at_startup = 2 76 | au BufRead,BufNewFile *.thor set syntax=ruby 77 | au BufRead,BufNewFile *.simplecov set syntax=ruby 78 | au BufRead,BufNewFile *.gemfile set syntax=ruby 79 | au BufRead,BufNewFile *.axlsx set syntax=ruby 80 | au BufRead,BufNewFile *.es6 set filetype=javascript 81 | au BufRead,BufNewFile *.vue set filetype=javascript 82 | au BufRead,BufNewFile *.vue set syntax=javascript 83 | au BufRead,BufNewFile *.babelrc set syntax=javascript 84 | au BufRead,BufNewFile *.go set tabstop=2 85 | au BufRead,BufNewFile Makefile set tabstop=2 86 | au BufRead,BufNewFile Dockerfile* set syntax=dockerfile 87 | au BufRead,BufNewFile .eslintrc set syntax=json 88 | au BufRead,BufNewFile *.tsx set syntax=typescript 89 | au BufRead,BufNewFile *.erdconfig set syntax=yaml 90 | au BufRead,BufNewFile *.hbs set syntax=html 91 | au BufNewFile,BufRead * if &syntax == '' | set syntax=sh | endif 92 | au BufNewFile,BufRead template/*.rb set filetype=eruby 93 | au BufRead,BufNewFile *.rb.tt set syntax=eruby 94 | au BufRead,BufNewFile *.tf set filetype=terraform 95 | au BufRead,BufNewFile *.tfvars set filetype=terraform 96 | autocmd FileType vue noremap :%!vue-formatter 97 | set hlsearch 98 | if has("autocmd") 99 | autocmd FileType ruby set complete+=k/home/pavel/.vim/complete/custom.vim 100 | endif " has("autocmd") 101 | let g:deoplete#enable_at_startup = 1 102 | autocmd FileType go set noexpandtab 103 | set clipboard=unnamedplus 104 | let g:codegpt_openai_api_key = $OPENAI_API_KEY 105 | -------------------------------------------------------------------------------- /files/bashrc_omarchy: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | [ -z "$PS1" ] && return 7 | 8 | # don't put duplicate lines in the history. See bash(1) for more options 9 | # ... or force ignoredups and ignorespace 10 | HISTCONTROL=ignoredups:ignorespace 11 | 12 | # append to the history file, don't overwrite it 13 | shopt -s histappend 14 | 15 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 16 | HISTSIZE=1000 17 | HISTFILESIZE=2000 18 | 19 | # check the window size after each command and, if necessary, 20 | # update the values of LINES and COLUMNS. 21 | shopt -s checkwinsize 22 | 23 | # make less more friendly for non-text input files, see lesspipe(1) 24 | [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 25 | 26 | # set variable identifying the chroot you work in (used in the prompt below) 27 | if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then 28 | debian_chroot=$(cat /etc/debian_chroot) 29 | fi 30 | 31 | # set a fancy prompt (non-color, unless we know we "want" color) 32 | case "$TERM" in 33 | xterm-color) color_prompt=yes;; 34 | esac 35 | 36 | # uncomment for a colored prompt, if the terminal has the capability; turned 37 | # off by default to not distract the user: the focus in a terminal window 38 | # should be on the output of commands, not on the prompt 39 | force_color_prompt=yes 40 | 41 | if [ -n "$force_color_prompt" ]; then 42 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 43 | # We have color support; assume it's compliant with Ecma-48 44 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 45 | # a case would tend to support setf rather than setaf.) 46 | color_prompt=yes 47 | else 48 | color_prompt= 49 | fi 50 | fi 51 | 52 | if [ "$color_prompt" = yes ]; then 53 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 54 | else 55 | PS1='${debian_chroot:+($debian_chroot)}\u:\w\$ ' 56 | fi 57 | unset color_prompt force_color_prompt 58 | 59 | # If this is an xterm set the title to user@host:dir 60 | case "$TERM" in 61 | xterm*|rxvt*) 62 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}: \w\a\]$PS1" 63 | ;; 64 | *) 65 | ;; 66 | esac 67 | 68 | # enable color support of ls and also add handy aliases 69 | if [ -x /usr/bin/dircolors ]; then 70 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 71 | alias ls='ls --color=auto' 72 | #alias dir='dir --color=auto' 73 | #alias vdir='vdir --color=auto' 74 | 75 | alias grep='grep --color=auto' 76 | alias fgrep='fgrep --color=auto' 77 | alias egrep='egrep --color=auto' 78 | fi 79 | 80 | # some more ls aliases 81 | alias ll='ls -alF' 82 | alias la='ls -A' 83 | alias l='ls -CF' 84 | 85 | # Add an "alert" alias for long running commands. Use like so: 86 | # sleep 10; alert 87 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 88 | 89 | # Alias definitions. 90 | # You may want to put all your additions into a separate file like 91 | # ~/.bash_aliases, instead of adding them here directly. 92 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 93 | 94 | if [ -f ~/.bash_aliases ]; then 95 | . ~/.bash_aliases 96 | fi 97 | 98 | # enable programmable completion features (you don't need to enable 99 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 100 | # sources /etc/bash.bashrc). 101 | if [ -f /etc/bash_completion ] && ! shopt -oq posix; then 102 | . /etc/bash_completion 103 | fi 104 | 105 | PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting 106 | PATH=$PATH:$HOME/go/bin # Add Go to PATH 107 | PATH=$PATH:$HOME/.pyenv/shims 108 | source ~/.rvm/scripts/rvm 109 | export PS1="\[\033[36m\]\w \[\033[34m\][\D{%H:%M}]: \[\033[37m\]" 110 | 111 | if [ -f /etc/bash_completion ]; then 112 | . /etc/bash_completion 113 | fi 114 | export GOPATH=$HOME/go 115 | export GOBIN=$GOPATH/bin 116 | PROMPT_COMMAND='echo -ne "\033]0;$(dirs)\007"' 117 | replace() { 118 | find . -type f -exec sed -i "s/$1/$2/g" {} + 119 | } 120 | 121 | clip() { 122 | file=$1 123 | start_line=$2 124 | end_line=$3 125 | 126 | if [ -z "$start_line" ] || [ -z "$end_line" ]; then 127 | echo "Error: Please provide the start and end line numbers." 128 | echo "Usage: $0 " 129 | exit 1 130 | fi 131 | 132 | tmp_file=$(mktemp) 133 | 134 | sed -n "${start_line},${end_line}p" "$file" > "$tmp_file" 135 | 136 | cat "$tmp_file" | xclip -selection clipboard 137 | 138 | rm "$tmp_file" 139 | } 140 | 141 | # pyenv 142 | export PYENV_ROOT="$HOME/.pyenv" 143 | export PATH="$PYENV_ROOT/bin:$PATH" 144 | if command -v pyenv 1>/dev/null 2>&1; then 145 | eval "$(pyenv init -)" 146 | fi 147 | export DOCKER_BUILDKIT=1 # or configure in daemon.json 148 | export COMPOSE_DOCKER_CLI_BUILD=1 149 | -------------------------------------------------------------------------------- /files/bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | [ -z "$PS1" ] && return 7 | 8 | # don't put duplicate lines in the history. See bash(1) for more options 9 | # ... or force ignoredups and ignorespace 10 | HISTCONTROL=ignoredups:ignorespace 11 | 12 | # append to the history file, don't overwrite it 13 | shopt -s histappend 14 | 15 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 16 | HISTSIZE=1000 17 | HISTFILESIZE=2000 18 | 19 | # check the window size after each command and, if necessary, 20 | # update the values of LINES and COLUMNS. 21 | shopt -s checkwinsize 22 | 23 | # make less more friendly for non-text input files, see lesspipe(1) 24 | [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 25 | 26 | # set variable identifying the chroot you work in (used in the prompt below) 27 | if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then 28 | debian_chroot=$(cat /etc/debian_chroot) 29 | fi 30 | 31 | # set a fancy prompt (non-color, unless we know we "want" color) 32 | case "$TERM" in 33 | xterm-color) color_prompt=yes;; 34 | esac 35 | 36 | # uncomment for a colored prompt, if the terminal has the capability; turned 37 | # off by default to not distract the user: the focus in a terminal window 38 | # should be on the output of commands, not on the prompt 39 | force_color_prompt=yes 40 | 41 | if [ -n "$force_color_prompt" ]; then 42 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 43 | # We have color support; assume it's compliant with Ecma-48 44 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 45 | # a case would tend to support setf rather than setaf.) 46 | color_prompt=yes 47 | else 48 | color_prompt= 49 | fi 50 | fi 51 | 52 | if [ "$color_prompt" = yes ]; then 53 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 54 | else 55 | PS1='${debian_chroot:+($debian_chroot)}\u:\w\$ ' 56 | fi 57 | unset color_prompt force_color_prompt 58 | 59 | # If this is an xterm set the title to user@host:dir 60 | case "$TERM" in 61 | xterm*|rxvt*) 62 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}: \w\a\]$PS1" 63 | ;; 64 | *) 65 | ;; 66 | esac 67 | 68 | # enable color support of ls and also add handy aliases 69 | if [ -x /usr/bin/dircolors ]; then 70 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 71 | alias ls='ls --color=auto' 72 | #alias dir='dir --color=auto' 73 | #alias vdir='vdir --color=auto' 74 | 75 | alias grep='grep --color=auto' 76 | alias fgrep='fgrep --color=auto' 77 | alias egrep='egrep --color=auto' 78 | fi 79 | 80 | # some more ls aliases 81 | alias ll='ls -alF' 82 | alias la='ls -A' 83 | alias l='ls -CF' 84 | 85 | # Add an "alert" alias for long running commands. Use like so: 86 | # sleep 10; alert 87 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 88 | 89 | # Alias definitions. 90 | # You may want to put all your additions into a separate file like 91 | # ~/.bash_aliases, instead of adding them here directly. 92 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 93 | 94 | if [ -f ~/.bash_aliases ]; then 95 | . ~/.bash_aliases 96 | fi 97 | 98 | # enable programmable completion features (you don't need to enable 99 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 100 | # sources /etc/bash.bashrc). 101 | if [ -f /etc/bash_completion ] && ! shopt -oq posix; then 102 | . /etc/bash_completion 103 | fi 104 | 105 | PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting 106 | PATH=$PATH:$HOME/go/bin # Add Go to PATH 107 | PATH=$PATH:$HOME/.pyenv/shims 108 | source ~/.rvm/scripts/rvm 109 | # Try to enable __git_ps1 if available 110 | if ! type __git_ps1 >/dev/null 2>&1; then 111 | if [ -f "$(git --exec-path 2>/dev/null)/git-sh-prompt" ]; then 112 | . "$(git --exec-path)/git-sh-prompt" 113 | elif [ -f /usr/lib/git-core/git-sh-prompt ]; then 114 | . /usr/lib/git-core/git-sh-prompt 115 | fi 116 | fi 117 | 118 | if type __git_ps1 >/dev/null 2>&1; then 119 | export PS1='\[\033[36m\]\w$(__git_ps1 "\[\033[32m\](%s)") \[\033[34m\][\D{%H:%M}]: \[\033[37m\]' 120 | else 121 | export PS1='\[\033[36m\]\w \[\033[34m\][\D{%H:%M}]: \[\033[37m\]' 122 | fi 123 | 124 | if [ -f /etc/bash_completion ]; then 125 | . /etc/bash_completion 126 | fi 127 | export GOPATH=$HOME/go 128 | export GOBIN=$GOPATH/bin 129 | PROMPT_COMMAND='echo -ne "\033]0;$(dirs)\007"' 130 | replace() { 131 | find . -type f -exec sed -i "s/$1/$2/g" {} + 132 | } 133 | 134 | clip() { 135 | file=$1 136 | start_line=$2 137 | end_line=$3 138 | 139 | if [ -z "$start_line" ] || [ -z "$end_line" ]; then 140 | echo "Error: Please provide the start and end line numbers." 141 | echo "Usage: $0 " 142 | exit 1 143 | fi 144 | 145 | tmp_file=$(mktemp) 146 | 147 | sed -n "${start_line},${end_line}p" "$file" > "$tmp_file" 148 | 149 | cat "$tmp_file" | xclip -selection clipboard 150 | 151 | rm "$tmp_file" 152 | } 153 | 154 | # pyenv 155 | export PYENV_ROOT="$HOME/.pyenv" 156 | export PATH="$PYENV_ROOT/bin:$PATH" 157 | if command -v pyenv 1>/dev/null 2>&1; then 158 | eval "$(pyenv init -)" 159 | fi 160 | export DOCKER_BUILDKIT=1 # or configure in daemon.json 161 | export COMPOSE_DOCKER_CLI_BUILD=1 162 | --------------------------------------------------------------------------------