init, dotfiles and install basic roles

This commit is contained in:
ProgramSnail 2025-08-03 12:33:33 +03:00
commit 46bdf4dda0
21 changed files with 283 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
**.ssh

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "distrobox-ansible"]
path = distrobox-ansible
url = https://github.com/sandorex/distrobox-ansible.git

5
README.md Normal file
View file

@ -0,0 +1,5 @@
Trying to build auto system setup with ansible
---
This repo is based on https://github.com/sandorex/config

14
ansible.cfg Normal file
View file

@ -0,0 +1,14 @@
[defaults]
# use more readable condensed callback
stdout_callback = unixy
display_ok_hosts = false
display_skipped_hosts = false
# disable warnings
localhost_warning = False
# load everything from this repo
# roles, plugins, vars, etc
home = .
connection_plugins = ./plugins/connection/:./distrobox-ansible/plugins/connection/

1
distrobox-ansible Submodule

@ -0,0 +1 @@
Subproject commit cd2db6e499e64f21a7d79d1506ec6ff999d91333

View file

@ -0,0 +1,27 @@
- name: Link bashrc
ansible.builtin.file:
src: '{{ role_path }}/files/.bashrc'
dest: '{{ ansible_env.HOME }}/.bashrc'
state: link
force: true
- name: Link inputrc
ansible.builtin.file:
src: '{{ role_path }}/files/.inputrc'
dest: '{{ ansible_env.HOME }}/.inputrc'
state: link
force: true
- name: Link profile
ansible.builtin.file:
src: '{{ role_path }}/files/.profile'
dest: '{{ ansible_env.HOME }}/.profile'
state: link
force: true
- name: Link bash profile
ansible.builtin.file:
src: '{{ role_path }}/files/.bash_profile'
dest: '{{ ansible_env.HOME }}/.bash_profile'
state: link
force: true

View file

@ -0,0 +1,34 @@
# shell
- ansible.builtin.import_tasks: bash.yml
- name: Link fish configuration directory
ansible.builtin.file:
src: '{{ role_path }}/files/.config/fish'
dest: '{{ ansible_env.HOME }}/.config/fish'
state: link
force: true
# apps
- name: Link tmux configuration
ansible.builtin.file:
src: '{{ role_path }}/files/.tmux.conf'
dest: '{{ ansible_env.HOME }}/.tmux.conf'
state: link
force: true
# TODO: set server keys
- name: Link tmate configuration
ansible.builtin.file:
src: '{{ role_path }}/files/.tmate.conf'
dest: '{{ ansible_env.HOME }}/.tmate.conf'
state: link
force: true
- name: Link helix configuration
ansible.builtin.file:
src: '{{ role_path }}/files/.config/helix'
dest: '{{ ansible_env.HOME }}/.config/helix'
state: link
force: true

View file

@ -0,0 +1 @@
# TODO

View file

@ -0,0 +1,6 @@
- name: Link gitconfig
ansible.builtin.file:
src: '{{ role_path }}/files/.gitconfig'
dest: '{{ ansible_env.HOME }}/.gitconfig'
state: link
force: true

View file

@ -0,0 +1,20 @@
- name: Link kitty configuration directory
ansible.builtin.file:
src: '{{ role_path }}/files/.config/kitty'
dest: '{{ ansible_env.HOME }}/.config/kitty'
state: link
force: true
- name: Link alacritty configuration file
ansible.builtin.file:
src: '{{ role_path }}/files/.alacritty.toml'
dest: '{{ ansible_env.HOME }}/.alacritty.toml'
state: link
force: true
- name: Link alacritty configuration directory
ansible.builtin.file:
src: '{{ role_path }}/files/.config/alacritty'
dest: '{{ ansible_env.HOME }}/.config/alacritty'
state: link
force: true

View file

@ -0,0 +1,21 @@
- ansible.builtin.import_tasks: bash.yml
when: "'bash' in configure"
- ansible.builtin.import_tasks: cli.yml
when: "'cli' in configure"
- ansible.builtin.import_tasks: git.yml
when: "'git' in configure"
- ansible.builtin.import_tasks: ssh.yml
when: "'ssh' in configure"
- ansible.builtin.import_tasks: gui.yml
when: "'gui' in configure"
- ansible.builtin.import_tasks: scripts.yml
when: "'scripts' in configure"
- ansible.builtin.import_tasks: de.yml
when: "'de' in configure"

View file

@ -0,0 +1,6 @@
- name: Link scripts directory
ansible.builtin.file:
src: '{{ role_path }}/files/.bin'
dest: '{{ ansible_env.HOME }}/.bin'
state: link
force: true

View file

@ -0,0 +1,10 @@
# TODO: create keys ??
# TODO: copy directory ??
# create .ssh in files by hand, use everywere automatically
- name: Link gitconfig
ansible.builtin.file:
src: '{{ role_path }}/files/.ssh'
dest: '{{ ansible_env.HOME }}/.ssh'
state: link
force: true

View file

@ -0,0 +1,9 @@
- name: Install common packages
ansible.builtin.dnf5:
name:
- openssl
- perl
- ninja-build
- git
state: latest

View file

@ -0,0 +1,23 @@
- name: Install cli tools
ansible.builtin.dnf5:
name:
# shell utils
- just
- fish
- jsonnet
# edit utils
- helix
- micro
- tmux
- tmate
- ripgrep
# git
- git-delta
- git
- ansible
state: latest

View file

@ -0,0 +1,20 @@
- ansible.builtin.import_tasks: build.yml
- name: Install tools for cpp dev
ansible.builtin.dnf5:
name:
- make
- cmake
- xmake
- clang
- clang-tools
- clang-tools-extra
- clang-devel
- clang-tools-devel
- clang-tools-extra-devel
- clang-libs
- doxygen
state: latest

View file

@ -0,0 +1,18 @@
- name: Install gui tools
ansible.builtin.dnf5:
name:
- jetbrains-mono-fonts
- kitty
- kitty-fish-integration
- alacritty
- kate
- okular
- gwenview
- filelight
- qt5-qtvirtualkeyboard
- hunspell-ru
state: latest

View file

@ -0,0 +1,10 @@
- name: Install cli tools for bare metal host
ansible.builtin.dnf5:
name:
- distrobox
- syncthing
- lm_sensors
- powertop
- ansible
state: latest

View file

@ -0,0 +1,25 @@
- name: Install nodejs
ansible.builtin.dnf5:
name:
- nodejs
- curl
state: latest
- name: Curl is required for bun
ansible.builtin.dnf5:
name:
- curl
state: latest
- name: Install bun
ansible.builtin.shell:
cmd: npm install -g bun
- name: Get programs list to check fish presence
ansible.builtin.package_facts:
manager: auto
- name: Update fish path
ansible.builtin.shell:
cmd: echo 'fish_add_path {{ ansible_env.HOME }}/.bun/bin'
when: "'fish' in ansible_facts.packages"

View file

@ -0,0 +1,9 @@
- ansible.builtin.import_tasks: cpp.yml
- name: Install tools for lang dev
ansible.builtin.dnf5:
name:
- tree-sitter-cli
- libtree-sitter
- libtree-sitter-devel
state: latest

View file

@ -0,0 +1,20 @@
- ansible.builtin.import_tasks: build.yml
when: "'build' in apps"
- ansible.builtin.import_tasks: cli.yml
when: "'cli' in apps"
- ansible.builtin.import_tasks: cpp.yml
when: "'cpp' in apps"
- ansible.builtin.import_tasks: lang.yml
when: "'lang' in apps"
- ansible.builtin.import_tasks: javascript.yml
when: "'javascript' in apps"
- ansible.builtin.import_tasks: gui.yml
when: "'gui' in apps"
- ansible.builtin.import_tasks: host.yml
when: "'host' in apps"