feat: various update to install work pro laptop

This commit is contained in:
Matthieu Bessat 2024-07-03 18:03:08 +02:00
parent 4801f7bd38
commit a513f7abd8
10 changed files with 85 additions and 14 deletions

View file

@ -11,22 +11,29 @@
params:
ssh_uri: "mbess@srv06.mbess.net:/warmd/mbess"
mount_path: "{{ home }}/.mnt/srv06/warmd/mbess"
profile: perso
- from: "mount_sshfs"
name: "mount_sshfs_srv06_warmd_etb"
enabled: true
params:
ssh_uri: "mbess@srv06.mbess.net:/warmd/etoiledebethleem"
mount_path: "{{ home }}/.mnt/srv06/warmd/etb"
profile: perso
- name: "popequer_gitwatch@"
profile: all
- name: "hourly_remainder"
enabled: true
timer: true
profile: all
- name: "cliphist"
enabled: true
profile: all
- name: "gammastep"
enabled: true
profile: all
- name: "swaybg"
enabled: true
profile: all
config_files:
- dir: fish
name: config.fish
@ -36,6 +43,8 @@
name: alacritty.toml
- dir: wofi
name: style.css
- dir: kanshi
name: config
- dir: sway
name: config
- dir: helix
@ -57,7 +66,25 @@
- file:
path: /home/mbess/.workstation_setup_state
state: touch
- copy: content="2024-05-20T11:28:07.552Z c385e8f1-9f34-47d3-9155-0cc1f04c4550" dest=/home/mbess/.workstation_setup_state
- copy:
content: "{\"monakhos\": {\"date\": \"{{ ansible_date_time.iso8601 }}\", \"name\":\"{{ device_name }}\", \"profile\":\"{{ profile }}\"}\n"
dest: "{{ home }}/.workstation_setup_state"
- become: yes
become_user: "{{ user }}"
file:
path: "{{ home }}/.monakhos_mbess"
state: touch
- name: Change hostname
hostname:
name: "{{ device_name }}"
- name: Setup ssh dir
file:
path: "{{ home }}/.ssh"
state: directory
recurse: true
owner: "{{ user }}"
- name: Update pacman repo
become: true
@ -128,6 +155,7 @@
# DOTS
- name: Clone dots file
git:
key_file: "{{ home }}/.ssh/{{ device_name }}_perso_generic_ed25519"
repo: "git@forge.lefuturiste.fr:mbess/dots.git"
dest: "{{ home }}/.dots"
@ -152,6 +180,7 @@
src: "{{ home }}/.dots/config/{{ item.dir }}/{{ item.name }}"
dest: "{{ home }}/.config/{{ item.dir }}/{{ item.name }}"
state: link
force: true
loop: "{{ config_files }}"
- name: Set default shell
@ -215,7 +244,7 @@
- name: Setup user units
loop: "{{ systemd_services.user }}"
when: "item.from is not defined"
when: "item.from is not defined and (item.profile == 'all' or item.profile == profile)"
template:
src: "systemd/user/{{ item.name }}.service"
dest: "{{ home }}/.config/systemd/user/{{ item.name }}.service"
@ -263,6 +292,7 @@
path: "{{ home }}/.mnt/{{ item }}"
state: directory
recurse: true
when: "profile == 'perso'"
loop:
- srv06/warmd/mbess
- srv06/coldd/mbess
@ -292,6 +322,16 @@
path: "{{ home }}/.cache/secrets/"
state: directory
recurse: true
- name: Setup vaults dir gpg home
file:
path: "{{ home }}/.vaults/gpg-homes"
state: directory
recurse: true
- name: Setup vaults dir store unixpass
file:
path: "{{ home }}/.vaults/pass"
state: directory
recurse: true
- name: Setup main popequer notebook
include_role:
@ -314,6 +354,7 @@
ansible.builtin.git:
repo: "git@forge.lefuturiste.fr:mbess/books-sources.git"
dest: /home/mbess/workspace/books_sources
when: "profile == 'perso'"
- name: Clone snippets space
ansible.builtin.git:
repo: "git@forge.lefuturiste.fr:mbess/snippets.git"
@ -332,3 +373,7 @@
repo: "git@forge.lefuturiste.fr:mbess/monakhos.git"
dest: /home/mbess/workspace/monakhos
- name: Setup OpenFortiVPN
when: 'profile == "pro"'
include_role:
name: openfortivpn