mirror of
https://codeberg.org/ProgramSnail/config.git
synced 2025-12-06 07:28:44 +00:00
init, dotfiles and install basic roles
This commit is contained in:
commit
46bdf4dda0
21 changed files with 283 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
**.ssh
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "distrobox-ansible"]
|
||||||
|
path = distrobox-ansible
|
||||||
|
url = https://github.com/sandorex/distrobox-ansible.git
|
||||||
5
README.md
Normal file
5
README.md
Normal 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
14
ansible.cfg
Normal 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
1
distrobox-ansible
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit cd2db6e499e64f21a7d79d1506ec6ff999d91333
|
||||||
27
roles/dotfiles/tasks/bash.yml
Normal file
27
roles/dotfiles/tasks/bash.yml
Normal 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
|
||||||
34
roles/dotfiles/tasks/cli.yml
Normal file
34
roles/dotfiles/tasks/cli.yml
Normal 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
|
||||||
|
|
||||||
1
roles/dotfiles/tasks/de.yml
Normal file
1
roles/dotfiles/tasks/de.yml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
# TODO
|
||||||
6
roles/dotfiles/tasks/git.yml
Normal file
6
roles/dotfiles/tasks/git.yml
Normal 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
|
||||||
20
roles/dotfiles/tasks/gui.yml
Normal file
20
roles/dotfiles/tasks/gui.yml
Normal 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
|
||||||
21
roles/dotfiles/tasks/main.yml
Normal file
21
roles/dotfiles/tasks/main.yml
Normal 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"
|
||||||
|
|
||||||
6
roles/dotfiles/tasks/scripts.yml
Normal file
6
roles/dotfiles/tasks/scripts.yml
Normal 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
|
||||||
10
roles/dotfiles/tasks/ssh.yml
Normal file
10
roles/dotfiles/tasks/ssh.yml
Normal 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
|
||||||
9
roles/installs/tasks/build.yml
Normal file
9
roles/installs/tasks/build.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
- name: Install common packages
|
||||||
|
ansible.builtin.dnf5:
|
||||||
|
name:
|
||||||
|
- openssl
|
||||||
|
- perl
|
||||||
|
- ninja-build
|
||||||
|
- git
|
||||||
|
state: latest
|
||||||
|
|
||||||
23
roles/installs/tasks/cli.yml
Normal file
23
roles/installs/tasks/cli.yml
Normal 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
|
||||||
|
|
||||||
20
roles/installs/tasks/cpp.yml
Normal file
20
roles/installs/tasks/cpp.yml
Normal 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
|
||||||
18
roles/installs/tasks/gui.yml
Normal file
18
roles/installs/tasks/gui.yml
Normal 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
|
||||||
|
|
||||||
10
roles/installs/tasks/host.yml
Normal file
10
roles/installs/tasks/host.yml
Normal 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
|
||||||
|
|
||||||
25
roles/installs/tasks/javascript.yml
Normal file
25
roles/installs/tasks/javascript.yml
Normal 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"
|
||||||
9
roles/installs/tasks/lang.yml
Normal file
9
roles/installs/tasks/lang.yml
Normal 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
|
||||||
20
roles/installs/tasks/main.yml
Normal file
20
roles/installs/tasks/main.yml
Normal 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"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue