-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup_homepage.yml
247 lines (238 loc) · 8.16 KB
/
setup_homepage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
---
- name: Set up Homepage
hosts: nuc
become: yes
vars_files:
- homepage-assets/secret.yml
tasks:
- name: Create bind mounts
file:
path: "{{ item }}"
state: directory
loop:
- /home/rex/homepage
- /home/rex/homepage/config
- /home/rex/homepage/images
- /home/rex/homepage/icons
become: no
- name: Deploy Homepage container
docker_container:
name: homepage
image: ghcr.io/gethomepage/homepage:latest
volumes:
- "/home/rex/homepage/config:/app/config"
- "/home/rex/homepage/images:/app/public/images"
- "/home/rex/homepage/icons:/app/public/icons"
- "/var/run/docker.sock:/var/run/docker.sock"
- "/home/rex/8tb:/8tb:ro"
- "/mnt/nas:/nas:ro"
ports:
- "7071:3000"
restart_policy: unless-stopped
- name: Copy background
copy:
src: homepage-assets/background.jpg
dest: /home/rex/homepage/images/background.jpg
- name: Copy background
copy:
src: "homepage-assets/{{ item }}"
dest: "/home/rex/homepage/icons/{{ item }}"
loop:
- hpoi.png
- iis.png
- serializd.png
- backloggd.png
- serializd.png
- storygraph.png
- baha.png
- name: Configure settings.yaml
blockinfile:
dest: /home/rex/homepage/config/settings.yaml
marker: "# {mark} ANSIBLE MANAGED BLOCK - settings.yaml"
block: |
title: Rex's Homepage
theme: dark # <----- add this line
color: neutral # <----- add this line
background:
image: /images/background.jpg
blur: sm # sm, "", md, xl... see https://tailwindcss.com/docs/backdrop-blur
saturate: 75 # 0, 50, 100... see https://tailwindcss.com/docs/backdrop-saturate
brightness: 75 # 0, 50, 75... see https://tailwindcss.com/docs/backdrop-brightness
opacity: 75 # 0-100
layout:
Work:
Social:
Entertainment:
Tracking:
Home:
style: row
columns: 3
nuc status:
style: row
columns: 6
- name: Configure bookmarks.yaml
copy:
content: |
- Work:
- ChatGPT:
- icon: chatgpt.svg
href: https://chatgpt.com/
- Github:
- icon: si-github-#FFFFFF
href: https://github.com/
- Gmail (chihchengyuan):
- icon: gmail.svg
href: https://mail.google.com/mail/u/0/#inbox
- Gmail (r1218r1218):
- icon: gmail.svg
href: https://mail.google.com/mail/u/1/#inbox
- IIS Webmail:
- icon: /icons/iis.png
href: https://webmail.iis.sinica.edu.tw/
- Social:
- Reddit:
- icon: reddit.svg
href: https://reddit.com/
- Facebook:
- icon: facebook.svg
href: https://www.facebook.com/
- Messenger:
- icon: facebook-messenger.svg
href: https://www.messenger.com/
- Discord:
- icon: discord.svg
href: https://discord.com/channels/539866293579415553/619217716678754304
- Instagram:
- icon: instagram.svg
href: https://www.instagram.com/
- LinkedIn:
- icon: linkedin.svg
href: https://www.linkedin.com/
- Entertainment:
- Medium:
- icon: si-medium-#FFFFFF
href: https://medium.com/
- YouTube:
- icon: youtube.svg
href: https://youtube.com/
- Netflix:
- icon: netflix.svg
href: https://www.netflix.com/browse
- Bilibili:
- icon: si-bilibili-#00A1D6
href: https://www.bilibili.com/
- 動畫瘋:
- icon: /icons/baha.png
href: https://ani.gamer.com.tw/
- Tracking:
- HPOi:
- icon: /icons/hpoi.png
href: https://www.hpoi.net/user/444366
- backloggd:
- icon: /icons/backloggd.png
href: https://www.backloggd.com/u/RexYuan
- AniList:
- icon: si-anilist-#02A9FF
href: https://anilist.co/user/RexYuan
- Letterboxd:
- icon: si-letterboxd-#FFFFFF
href: https://letterboxd.com/rexyuan/
- Serializd:
- icon: /icons/serializd.png
href: https://www.serializd.com/user/RexYuan
- StoryGraph:
- icon: /icons/storygraph.png
href: https://app.thestorygraph.com/profile/rexyuan
dest: /home/rex/homepage/config/bookmarks.yaml
- name: Configure services.yaml
copy:
content: |
- Home:
- Website:
icon: mdi-home-account-#FFFFFF
href: https://rexyuan.com/
ping: rexyuan.com
- Router:
icon: si-republicofgamers-#FF0029
href: http://router.lan/
- Flashstor:
icon: asustor.svg
href: http://adm.lan/
- Library:
- Calibre-Web:
icon: calibre-web.svg
href: http://calibre.lan/
widget:
type: calibreweb
url: http://calibre.lan
username: "{{CALIBRE_WEB_U}}"
password: "{{CALIBRE_WEB_P}}"
- Immich:
icon: immich.svg
href: http://immich.lan/
widget:
type: immich
url: http://immich.lan
key: "{{IMMICH_API_KEY}}"
- Jellyfin:
icon: jellyfin.svg
href: http://jellyfin.lan/
widget:
type: jellyfin
url: http://jellyfin.lan
key: "{{JELLYFIN_API_KEY}}"
enableBlocks: true # optional, defaults to false
enableNowPlaying: true # optional, defaults to true
enableUser: true # optional, defaults to false
showEpisodeNumber: true # optional, defaults to false
expandOneStreamToTwoRows: true # optional, defaults to true
- LANraragi:
icon: lanraragi.png
href: http://lrr.lan/
- Utility:
- Home Assistant:
icon: home-assistant.svg
href: http://ha.lan/
- Nginx Proxy Manager:
icon: nginx-proxy-manager.svg
href: http://nuc.lan:81/
widget:
type: npm
url: http://nuc.lan:81
username: "{{NPM_U}}"
password: "{{NPM_P}}"
- PiHole:
icon: pi-hole.svg
href: http://pihole.lan/admin/
widget:
type: pihole
url: http://pihole.lan
key: "{{PIHOLE_API_KEY}}"
- Uptime Kuma:
icon: uptime-kuma.svg
href: http://kuma.lan
widget:
type: uptimekuma
url: http://kuma.lan
slug: homepage
dest: /home/rex/homepage/config/services.yaml
- name: Configure widgets.yaml
copy:
content: |
- glances:
url: http://nuc.lan:61208
version: 4
cpu: true
mem: false
cputemp: true
uptime: false
label: nuc
- glances:
url: http://flashstor.lan:61208
version: 4
cpu: true
mem: false
cputemp: true
uptime: false
label: flashstor
dest: /home/rex/homepage/config/widgets.yaml