Move Zed config to Ansible template with 1Password secrets
This commit is contained in:
@@ -6,10 +6,6 @@
|
|||||||
- name: Define workstation symlinks
|
- name: Define workstation symlinks
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
workstation_symlinks:
|
workstation_symlinks:
|
||||||
- {
|
|
||||||
src: "$DOTFILES_PATH/config/zed.jsonc",
|
|
||||||
dest: "~/.config/zed/settings.json",
|
|
||||||
}
|
|
||||||
- { src: "$DOTFILES_PATH/config/autostart", dest: "~/.config/autostart" }
|
- { src: "$DOTFILES_PATH/config/autostart", dest: "~/.config/autostart" }
|
||||||
|
|
||||||
- name: Ensure parent directories for workstation symlinks exist
|
- name: Ensure parent directories for workstation symlinks exist
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
- name: Include workstation symlinks tasks
|
- name: Include workstation symlinks tasks
|
||||||
ansible.builtin.import_tasks: tasks/workstations/symlinks.yml
|
ansible.builtin.import_tasks: tasks/workstations/symlinks.yml
|
||||||
|
|
||||||
|
- name: Include Zed configuration tasks
|
||||||
|
ansible.builtin.import_tasks: tasks/workstations/zed.yml
|
||||||
|
|
||||||
- name: Include workstation cliphist tasks
|
- name: Include workstation cliphist tasks
|
||||||
ansible.builtin.import_tasks: tasks/workstations/cliphist.yml
|
ansible.builtin.import_tasks: tasks/workstations/cliphist.yml
|
||||||
when: "'microsoft-standard-WSL2' not in ansible_kernel"
|
when: "'microsoft-standard-WSL2' not in ansible_kernel"
|
||||||
|
|||||||
20
ansible/tasks/workstations/zed.yml
Normal file
20
ansible/tasks/workstations/zed.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
- name: Zed Configuration
|
||||||
|
block:
|
||||||
|
- name: Set user home directory
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
user_home: "{{ ansible_env.HOME if ansible_user_id == 'root' else lookup('env', 'HOME') }}"
|
||||||
|
|
||||||
|
- name: Ensure Zed config directory exists
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ user_home }}/.config/zed"
|
||||||
|
state: directory
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
|
- name: Template Zed settings with 1Password secrets
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: zed.jsonc.j2
|
||||||
|
dest: "{{ user_home }}/.config/zed/settings.json"
|
||||||
|
mode: "0644"
|
||||||
|
tags:
|
||||||
|
- zed
|
||||||
@@ -10,6 +10,24 @@
|
|||||||
// #############################################
|
// #############################################
|
||||||
// ## Theming ##
|
// ## Theming ##
|
||||||
// #############################################
|
// #############################################
|
||||||
|
"context_servers": {
|
||||||
|
"mcp-server-context7": {
|
||||||
|
"source": "extension",
|
||||||
|
"enabled": true,
|
||||||
|
"settings": {
|
||||||
|
"context7_api_key": "{{ lookup('community.general.onepassword', 'Zed Settings', vault='Dotfiles', field='mcp-server-context7') }}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"source": "custom",
|
||||||
|
"enabled": true,
|
||||||
|
"command": "npx",
|
||||||
|
"args": ["-y", "@modelcontextprotocol/server-memory"],
|
||||||
|
"env": {
|
||||||
|
"MEMORY_FILE_PATH": "${input:memory_file_path}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"edit_prediction_provider": "copilot"
|
"edit_prediction_provider": "copilot"
|
||||||
},
|
},
|
||||||
Reference in New Issue
Block a user