Merge pull request #34 from meienberger/fix/mkcert

Fix/mkcert
This commit is contained in:
Nicolas Meienberger 2022-05-16 19:40:59 +02:00 committed by GitHub
commit dc2b4f1a3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 3 additions and 1716 deletions

View file

@ -1,13 +1,7 @@
packages:
- jq
- mkcert
- ufw
- iptables
- coreutils
- git
- docker
- avahi-daemon
### ZSH Settings
zsh_theme: "powerlevel10k/powerlevel10k"
ohmyzsh_git_url: https://github.com/robbyrussell/oh-my-zsh
- openssh-server

View file

@ -4,8 +4,6 @@
tasks:
- import_tasks: ./tasks/common/essential.yml
# - import_tasks: ./tasks/common/zsh.yml
- import_tasks: ./tasks/common/docker.yml
# - import_tasks: ./tasks/network/avahi.yml
# - name: Reboot machine
# reboot:

View file

@ -19,13 +19,6 @@
name: "{{ username }}"
group: root
# - name: Disable SSH password auth
# lineinfile:
# dest: /etc/ssh/sshd_config
# regexp: "^#PasswordAuthentication yes"
# line: "PasswordAuthentication no"
# register: sshd_config
- name: "Enable passwordless sudo for {{ username }}"
lineinfile:
dest: /etc/sudoers
@ -42,7 +35,6 @@
community.general.ufw:
rule: allow
port: 22
from: 192.168.2.0/24
proto: tcp
- name: Allow port 80 in UFW

View file

@ -1,77 +0,0 @@
# Base config
- name: Install zsh package
package:
name:
- zsh
- git
state: latest
- name: Check if .zshrc exists
stat:
path: "/home/{{ username }}/.zshrc"
register: stat_rc_result
- name: Check if .oh-my-zsh exists
stat:
path: "/home/{{ username }}/.oh-my-zsh"
register: stat_ohmyzsh_result
# Oh-my-zsh installation
- name: Get oh-my-zsh install script
get_url:
url: https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh
dest: /tmp/install.sh
mode: "0555"
when: not stat_ohmyzsh_result.stat.exists
- name: Run installation script
become_user: "{{ username }}"
shell:
cmd: yes | /tmp/install.sh
creates: /home/{{ username }}/.oh-my-zsh"
when: not stat_ohmyzsh_result.stat.exists
- name: Creating new /home/{{ username }}/.zshrc
copy:
src: /home/{{ username }}/.oh-my-zsh/templates/zshrc.zsh-template
dest: /home/{{ username }}/.zshrc
remote_src: yes
when: not stat_rc_result.stat.exists
# Powerlevel10k configuration
- name: Clone powerlevel10k theme
git:
repo: https://github.com/romkatv/powerlevel10k.git
dest: "/home/{{ username }}/.oh-my-zsh/custom/themes/powerlevel10k"
- name: Enable powerlevel10k
lineinfile:
dest: /home/{{ username }}/.zshrc
regexp: "^ZSH_THEME="
line: "ZSH_THEME={{ zsh_theme }}"
- name: Check if .p10k.zsh exists
stat:
path: "/home/{{ username }}/.p10k.zsh"
register: stat_p10k_result
- name: Copy template to .p10k.zsh
copy:
src: "{{ playbook_dir }}/templates/zsh/p10k-template.zsh"
dest: /home/{{ username }}/.p10k.zsh
when: not stat_p10k_result.stat.exists
- name: Store .zshrc in variable
shell: "cat /home/{{ username }}/.zshrc"
register: zshrc_result
- name: Add line to .zshrc
shell: 'echo "[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" >> /home/{{ username }}/.zshrc'
when: zshrc_result.stdout.find('source ~/.p10k.zsh') == -1
# Final teardown
- name: Change default shell to zsh
become: yes
user:
name: "{{ username }}"
shell: /bin/zsh

File diff suppressed because it is too large Load diff

View file

@ -8,14 +8,5 @@
"author": "",
"source": "",
"image": "https://avatars.githubusercontent.com/u/25025331?s=200&v=4",
"form_fields": {
"torrent-client": {
"type": "text",
"label": "Torrent Client",
"max": 50,
"min": 3,
"required": true,
"env_variable": "TORRENT_CLIENT"
}
}
"form_fields": {}
}

View file

@ -1,6 +1,6 @@
{
"name": "runtipi",
"version": "0.1.0",
"version": "0.1.1",
"description": "A homeserver for everyone",
"scripts": {
"prepare": "husky install"