mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-13 16:12:40 +02:00
feat: dashy is too slow to start/reload, replace it with homepage-dashboard
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
# Homepage for my Homelab
|
||||||
|
|
||||||
|
> WIP, just a demo for now
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- About Me:
|
||||||
|
- Blog:
|
||||||
|
- abbr: Blog
|
||||||
|
href: https://thiscute.world/
|
||||||
|
- Github:
|
||||||
|
- abbr: GH
|
||||||
|
href: https://github.com/ryan4yin
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
kana-docker:
|
||||||
|
socket: /var/run/docker.sock
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# https://gethomepage.dev/latest/configs/kubernetes/
|
||||||
|
|
||||||
|
# uses the default kubeconfig to access the cluster
|
||||||
|
# read kubbecofig from $KUBECONFIG or $HOME/.kube/config
|
||||||
|
mode: default
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
- Proxmox VE 虚拟化集群:
|
||||||
|
- PVE-UM560:
|
||||||
|
icon: si-proxmox
|
||||||
|
href: https://192.168.5.173:8006/
|
||||||
|
description: 'CPU: R5-5625U / MEM: 32G / DISK: 512G+4T*2'
|
||||||
|
siteMonitor: https://192.168.5.173:8006/
|
||||||
|
|
||||||
|
- PVE-S500Plus:
|
||||||
|
icon: si-proxmox
|
||||||
|
href: https://192.168.5.174:8006/
|
||||||
|
description: 'CPU: R7-5825U / MEM: 64G / DISK: 1T'
|
||||||
|
siteMonitor: https://192.168.5.174:8006/
|
||||||
|
|
||||||
|
- PVE-GTR5:
|
||||||
|
icon: si-proxmox
|
||||||
|
href: https://192.168.5.172:8006/
|
||||||
|
description: 'CPU: R9-5900HX / MEM: 64G / DISK: 1T'
|
||||||
|
siteMonitor: https://192.168.5.172:8006/
|
||||||
|
|
||||||
|
- Homelab Monitoring:
|
||||||
|
- Grafana:
|
||||||
|
icon: si-grafana
|
||||||
|
href: http://grafana.writefor.fun
|
||||||
|
description: Data visualised on dashboards
|
||||||
|
siteMonitor: http://grafana.writefor.fun
|
||||||
|
- Prometheus Dashboard:
|
||||||
|
icon: si-prometheus
|
||||||
|
href: http://prometheus.writefor.fun
|
||||||
|
description: Monitoring - Prometheus
|
||||||
|
siteMonitor: http://prometheus.writefor.fun
|
||||||
|
- Uptime Kuma:
|
||||||
|
icon: si-uptimekuma
|
||||||
|
href: http://uptime-kuma.writefor.fun
|
||||||
|
description: Uptime Checking
|
||||||
|
siteMonitor: http://uptime-kuma.writefor.fun
|
||||||
|
|
||||||
|
- Homelab Applications:
|
||||||
|
- Home Assistant:
|
||||||
|
icon: home-assistant.png
|
||||||
|
href: "http://homeassistant.home/"
|
||||||
|
description: Home Automation
|
||||||
|
server: kana-docker
|
||||||
|
container: home-assistant
|
||||||
|
|
||||||
|
- SFTPGO:
|
||||||
|
icon: sftpgo.png
|
||||||
|
href: "http://sftpgo.writefor.fun/web/admin/folders"
|
||||||
|
description: WebDAV & SFTP server
|
||||||
|
server: kana-docker
|
||||||
|
container: sftpgo
|
||||||
|
|
||||||
|
- Kubernetes Monitoring:
|
||||||
|
# TODO: Update this
|
||||||
|
- Emby:
|
||||||
|
icon: emby.png
|
||||||
|
href: "http://emby.home/"
|
||||||
|
description: Media server
|
||||||
|
namespace: media # The kubernetes namespace the app resides in
|
||||||
|
app: emby # The name of the deployed app
|
||||||
|
|
||||||
|
- Element Chat:
|
||||||
|
icon: matrix-light.png
|
||||||
|
href: https://chat.example.com
|
||||||
|
description: Matrix Synapse Powered Chat
|
||||||
|
app: matrix-element
|
||||||
|
namespace: comms
|
||||||
|
pod-selector: >-
|
||||||
|
app.kubernetes.io/instance in (
|
||||||
|
matrix-element,
|
||||||
|
matrix-media-repo,
|
||||||
|
matrix-media-repo-postgresql,
|
||||||
|
matrix-synapse
|
||||||
|
)
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
title: Ryan Yin's Homelab
|
||||||
|
base: http://home.writefor.fun/
|
||||||
|
favicon: https://thiscute.world/favicon.ico
|
||||||
|
|
||||||
|
# https://developer.mozilla.org/en-US/docs/Web/Manifest/start_url
|
||||||
|
# Used by some browsers to determine the start page of the web application
|
||||||
|
startUrl: http://home.writefor.fun/
|
||||||
|
|
||||||
|
language: zh
|
||||||
|
|
||||||
|
background:
|
||||||
|
image: /images/rolling-girls.png
|
||||||
|
blur: sm # sm, "", md, xl... see https://tailwindcss.com/docs/backdrop-blur
|
||||||
|
saturate: 50 # 0, 50, 100... see https://tailwindcss.com/docs/backdrop-saturate
|
||||||
|
brightness: 50 # 0, 50, 75... see https://tailwindcss.com/docs/backdrop-brightness
|
||||||
|
opacity: 50 # 0-100
|
||||||
|
|
||||||
|
theme: dark # or light
|
||||||
|
|
||||||
|
# Supported colors are:
|
||||||
|
# slate, gray, zinc, neutral, stone, amber,
|
||||||
|
# yellow, lime, green, emerald, teal, cyan,
|
||||||
|
# sky, blue, indigo, violet, purple, fuchsia, pink, rose, red, white
|
||||||
|
color: indigo
|
||||||
|
|
||||||
|
# make all cards in a row the same height.
|
||||||
|
useEqualHeights: true
|
||||||
|
|
||||||
|
# Groups and its layout
|
||||||
|
# Groups Name should match the name defined in your services.yaml or widgets.yaml
|
||||||
|
layout:
|
||||||
|
Proxmox VE 虚拟化集群:
|
||||||
|
icon: si-proxmox
|
||||||
|
tab: First
|
||||||
|
|
||||||
|
Group A:
|
||||||
|
initiallyCollapsed: true # collasped by default
|
||||||
|
tab: First
|
||||||
|
style: row
|
||||||
|
columns: 4
|
||||||
|
|
||||||
|
Second Service Group:
|
||||||
|
useEqualHeights: true # overrides global setting
|
||||||
|
tab: Second
|
||||||
|
columns: 4
|
||||||
|
|
||||||
|
Third Service Group:
|
||||||
|
tab: Third
|
||||||
|
style: row
|
||||||
|
|
||||||
|
Bookmark Group on Fourth Tab:
|
||||||
|
tab: Fourth
|
||||||
|
|
||||||
|
Service Group on every Tab:
|
||||||
|
style: row
|
||||||
|
columns: 4
|
||||||
|
|
||||||
|
# https://gethomepage.dev/latest/configs/services/#icons
|
||||||
|
# iconStyle: theme # optional, defaults to gradient
|
||||||
|
|
||||||
|
# Typing in homepage to quick search
|
||||||
|
quicklaunch:
|
||||||
|
searchDescriptions: true
|
||||||
|
hideInternetSearch: true
|
||||||
|
showSearchSuggestions: true
|
||||||
|
hideVisitURL: true
|
||||||
|
|
||||||
|
# Show docker stats
|
||||||
|
showStats: true
|
||||||
|
|
||||||
|
hideErrors: false
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
- kubernetes:
|
||||||
|
cluster:
|
||||||
|
show: true
|
||||||
|
cpu: true
|
||||||
|
memory: true
|
||||||
|
showLabel: true
|
||||||
|
label: "cluster"
|
||||||
|
nodes:
|
||||||
|
show: true
|
||||||
|
cpu: true
|
||||||
|
memory: true
|
||||||
|
showLabel: true
|
||||||
|
- resources:
|
||||||
|
backend: resources
|
||||||
|
expanded: true
|
||||||
|
cpu: true
|
||||||
|
memory: true
|
||||||
|
- search:
|
||||||
|
provider: duckduckgo
|
||||||
|
target: _blank
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{pkgs, ...}: let
|
||||||
|
configDir = "/var/lib/homepage-dashboard";
|
||||||
|
in {
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/misc/homepage-dashboard.nix
|
||||||
|
services.homepage-dashboard = {
|
||||||
|
enable = true;
|
||||||
|
listenPort = 8082;
|
||||||
|
openFirewall = false;
|
||||||
|
};
|
||||||
|
systemd.services.homepage-dashboard.environment = {
|
||||||
|
HOMEPAGE_CONFIG_DIR = configDir;
|
||||||
|
|
||||||
|
# 1. The value of env var HOMEPAGE_VAR_XXX will replace {{HOMEPAGE_VAR_XXX}} in any config
|
||||||
|
# HOMEPAGE_VAR_XXX_APIKEY = "myapikey";
|
||||||
|
# 2. The value of env var HOMEPAGE_FILE_XXX must be a file path,
|
||||||
|
# the contents of which will be used to replace {{HOMEPAGE_FILE_XXX}} in any config
|
||||||
|
};
|
||||||
|
# Install the homepage-dashboard configuration files
|
||||||
|
system.activationScripts.installHomepageDashboardConfig = ''
|
||||||
|
mkdir -p ${configDir}/config ${configDir}/images
|
||||||
|
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F600 ${./config}/ ${configDir}/config/
|
||||||
|
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F600 ${./images}/ ${configDir}/images/
|
||||||
|
'';
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.5 MiB |
@@ -1,251 +0,0 @@
|
|||||||
appConfig:
|
|
||||||
theme: crayola
|
|
||||||
layout: auto
|
|
||||||
iconSize: large
|
|
||||||
language: cn
|
|
||||||
startingView: default
|
|
||||||
defaultOpeningMethod: newtab
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckInterval: 0
|
|
||||||
backgroundImg: https://thiscute.world/posts/revolution-and-innovation/rolling-girls.webp
|
|
||||||
faviconApi: allesedv
|
|
||||||
routingMode: history
|
|
||||||
enableMultiTasking: false
|
|
||||||
widgetsAlwaysUseProxy: false
|
|
||||||
webSearch:
|
|
||||||
disableWebSearch: false
|
|
||||||
searchEngine: duckduckgo
|
|
||||||
openingMethod: newtab
|
|
||||||
searchBangs: {}
|
|
||||||
enableFontAwesome: true
|
|
||||||
enableMaterialDesignIcons: false
|
|
||||||
hideComponents:
|
|
||||||
hideHeading: false
|
|
||||||
hideNav: false
|
|
||||||
hideSearch: false
|
|
||||||
hideSettings: false
|
|
||||||
hideFooter: false
|
|
||||||
auth:
|
|
||||||
enableGuestAccess: false
|
|
||||||
users: []
|
|
||||||
enableKeycloak: false
|
|
||||||
showSplashScreen: false
|
|
||||||
preventWriteToDisk: false
|
|
||||||
preventLocalSave: false
|
|
||||||
disableConfiguration: false
|
|
||||||
allowConfigEdit: true
|
|
||||||
enableServiceWorker: false
|
|
||||||
disableContextMenu: false
|
|
||||||
disableUpdateChecks: false
|
|
||||||
disableSmartSort: false
|
|
||||||
enableErrorReporting: false
|
|
||||||
pageInfo:
|
|
||||||
title: This Cute Micro Cluster
|
|
||||||
description: 欢迎进入 ryan4yin 的 Cute Micro Cluster 主页,在这里你能找到许多有趣的玩意儿哦
|
|
||||||
navLinks:
|
|
||||||
- title: GitHub
|
|
||||||
path: https://github.com/ryan4yin
|
|
||||||
target: newtab
|
|
||||||
- title: Blog
|
|
||||||
path: https://thiscute.world/
|
|
||||||
target: newtab
|
|
||||||
- title: Dashy Docs
|
|
||||||
path: https://dashy.to/docs
|
|
||||||
target: newtab
|
|
||||||
footerText: 做更多有价值的东西,赚更多的钱,也帮助更多的人。
|
|
||||||
sections:
|
|
||||||
- name: Proxmox VE 虚拟化集群
|
|
||||||
icon: si-proxmox
|
|
||||||
displayData:
|
|
||||||
sortBy: default
|
|
||||||
rows: 1
|
|
||||||
cols: 1
|
|
||||||
collapsed: false
|
|
||||||
hideForGuests: false
|
|
||||||
items:
|
|
||||||
- &ref_0
|
|
||||||
title: PVE-UM560
|
|
||||||
description: 'CPU: R5-5625U / MEM: 32G / DISK: 512G+4T*2'
|
|
||||||
icon: si-proxmox
|
|
||||||
url: https://192.168.5.173:8006
|
|
||||||
target: newtab
|
|
||||||
provider: Proxmox
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
id: 0_153265_pveum
|
|
||||||
- &ref_1
|
|
||||||
title: PVE-S500+
|
|
||||||
description: 'CPU: R7-5825U / MEM: 64G / DISK: 1T'
|
|
||||||
icon: si-proxmox
|
|
||||||
url: https://192.168.5.174:8006/
|
|
||||||
target: newtab
|
|
||||||
provider: Proxmox
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
id: 1_153265_pves
|
|
||||||
- &ref_2
|
|
||||||
title: PVE-GTR5
|
|
||||||
description: 'CPU: R9-5900HX / MEM: 64G / DISK: 1T'
|
|
||||||
icon: si-proxmox
|
|
||||||
url: https://192.168.5.172:8006
|
|
||||||
target: newtab
|
|
||||||
provider: Proxmox
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
id: 2_153265_pvegtr
|
|
||||||
- &ref_3
|
|
||||||
title: Orange Pi 5 8G
|
|
||||||
description: 'CPU: 8C / MEM: 8G / DISK: 128G'
|
|
||||||
icon: si-raspberrypi
|
|
||||||
url: ssh pi@192.168.5.191
|
|
||||||
target: clipboard
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckUrl: https://192.168.5.191:10250
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
statusCheckAcceptCodes: '404'
|
|
||||||
id: 3_153265_orangepig
|
|
||||||
filteredItems:
|
|
||||||
- *ref_0
|
|
||||||
- *ref_1
|
|
||||||
- *ref_2
|
|
||||||
- *ref_3
|
|
||||||
- name: K3s 容器化集群
|
|
||||||
displayData:
|
|
||||||
sortBy: default
|
|
||||||
rows: 1
|
|
||||||
cols: 1
|
|
||||||
collapsed: false
|
|
||||||
hideForGuests: false
|
|
||||||
items:
|
|
||||||
- &ref_4
|
|
||||||
title: k3s-main-master
|
|
||||||
description: control-plane + master
|
|
||||||
icon: si-k3s
|
|
||||||
url: ssh ryan@192.168.5.181
|
|
||||||
target: clipboard
|
|
||||||
provider: Rancher
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckUrl: ' https://192.168.5.181:6443'
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
statusCheckAcceptCodes: '401'
|
|
||||||
id: 0_138418_ksmainmaster
|
|
||||||
- &ref_5
|
|
||||||
title: k3s-data-1-master
|
|
||||||
description: worker node
|
|
||||||
icon: si-k3s
|
|
||||||
url: ssh ryan@192.168.5.182
|
|
||||||
target: clipboard
|
|
||||||
provider: Rancher
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckUrl: https://192.168.5.182:10250
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
statusCheckAcceptCodes: '404'
|
|
||||||
id: 1_138418_ksdatamaster
|
|
||||||
- &ref_6
|
|
||||||
title: k3s-data-1-worker-1
|
|
||||||
description: worker node
|
|
||||||
icon: si-k3s
|
|
||||||
url: ssh ryan@192.168.5.184
|
|
||||||
target: clipboard
|
|
||||||
provider: Rancher
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckUrl: https://192.168.5.184:10250
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
statusCheckAcceptCodes: '404'
|
|
||||||
id: 2_138418_ksdataworker
|
|
||||||
- &ref_7
|
|
||||||
title: k3s-data-1-worker-2
|
|
||||||
description: worker node
|
|
||||||
icon: si-k3s
|
|
||||||
url: ssh ryan@192.168.5.186
|
|
||||||
target: clipboard
|
|
||||||
provider: Rancher
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckUrl: https://192.168.5.186:10250
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
statusCheckAcceptCodes: '404'
|
|
||||||
id: 3_138418_ksdataworker
|
|
||||||
filteredItems:
|
|
||||||
- *ref_4
|
|
||||||
- *ref_5
|
|
||||||
- *ref_6
|
|
||||||
- *ref_7
|
|
||||||
- name: System Monitoring & Control
|
|
||||||
icon: fas fa-monitor-heart-rate
|
|
||||||
items:
|
|
||||||
- &ref_8
|
|
||||||
title: Grafana
|
|
||||||
description: Data visualised on dashboards
|
|
||||||
icon: hl-grafana
|
|
||||||
url: http://grafana.writefor.fun
|
|
||||||
target: newtab
|
|
||||||
statusCheck: true
|
|
||||||
statusCheckAllowInsecure: true
|
|
||||||
id: 0_2578_grafana
|
|
||||||
- &ref_9
|
|
||||||
title: Prometheus Dashboard
|
|
||||||
description: Monitoring - Prometheus
|
|
||||||
icon: si-prometheus
|
|
||||||
url: http://prometheus.writefor.fun
|
|
||||||
target: newtab
|
|
||||||
statusCheck: true
|
|
||||||
id: 1_2578_prometheusdashboard
|
|
||||||
- &ref_10
|
|
||||||
title: Uptime Kuma
|
|
||||||
description: Uptime Checking
|
|
||||||
icon: hl-uptime-kuma
|
|
||||||
url: http://uptime-kuma.writefor.fun
|
|
||||||
target: newtab
|
|
||||||
statusCheck: true
|
|
||||||
id: 2_2578_uptimekuma
|
|
||||||
displayData:
|
|
||||||
sortBy: default
|
|
||||||
rows: 1
|
|
||||||
cols: 1
|
|
||||||
collapsed: false
|
|
||||||
hideForGuests: false
|
|
||||||
filteredItems:
|
|
||||||
- *ref_8
|
|
||||||
- *ref_9
|
|
||||||
- *ref_10
|
|
||||||
- name: Productivity
|
|
||||||
icon: fas fa-bookmark
|
|
||||||
items:
|
|
||||||
- &ref_11
|
|
||||||
title: Cloud IDE
|
|
||||||
description: Eclipse Che - Cloud IDE
|
|
||||||
icon: hl-code
|
|
||||||
url: https://ide.writefor.fun/
|
|
||||||
target: newtab
|
|
||||||
statusCheck: true
|
|
||||||
id: 0_1302_cloudide
|
|
||||||
filteredItems:
|
|
||||||
- *ref_11
|
|
||||||
- name: Media & Entertainment
|
|
||||||
icon: fas fa-photo-video
|
|
||||||
items:
|
|
||||||
- &ref_12
|
|
||||||
title: Home Assistant
|
|
||||||
description: Smart home control
|
|
||||||
icon: hl-home-assistant
|
|
||||||
url: http://ha.writefor.fun:8123/
|
|
||||||
target: newtab
|
|
||||||
statusCheck: true
|
|
||||||
id: 0_1956_homeassistant
|
|
||||||
- &ref_13
|
|
||||||
title: SFTPGO Web Admin Console
|
|
||||||
description: WebDAV & SFTP server
|
|
||||||
icon: http://sftpgo.writefor.fun/static/img/logo.png
|
|
||||||
url: http://sftpgo.writefor.fun/web/admin/folders
|
|
||||||
target: newtab
|
|
||||||
statusCheck: true
|
|
||||||
id: 1_1956_sftpgowebadminconsole
|
|
||||||
displayData:
|
|
||||||
sortBy: default
|
|
||||||
rows: 1
|
|
||||||
cols: 1
|
|
||||||
collapsed: false
|
|
||||||
hideForGuests: false
|
|
||||||
filteredItems:
|
|
||||||
- *ref_12
|
|
||||||
- *ref_13
|
|
||||||
@@ -1,24 +1,26 @@
|
|||||||
{
|
{
|
||||||
# Install the dashy configuration file instaed of symlink it
|
# Replace dashy with gethomepage, because dashy is too slow to start/reload.
|
||||||
system.activationScripts.installDashyConfig = ''
|
|
||||||
install -Dm 600 ${./dashy_conf.yml} /etc/dashy/dashy_conf.yml
|
|
||||||
'';
|
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/virtualisation/oci-containers.nix
|
# # Install the dashy configuration file instaed of symlink it
|
||||||
virtualisation.oci-containers.containers = {
|
# system.activationScripts.installDashyConfig = ''
|
||||||
# check its logs via `journalctl -u podman-dashy`
|
# install -Dm 600 ${./dashy_conf.yml} /etc/dashy/dashy_conf.yml
|
||||||
dashy = {
|
# '';
|
||||||
hostname = "dashy";
|
#
|
||||||
image = "lissy93/dashy:latest";
|
# # https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/virtualisation/oci-containers.nix
|
||||||
ports = ["127.0.0.1:4000:80"];
|
# virtualisation.oci-containers.containers = {
|
||||||
environment = {
|
# # check its logs via `journalctl -u podman-dashy`
|
||||||
"NODE_ENV" = "production";
|
# dashy = {
|
||||||
};
|
# hostname = "dashy";
|
||||||
volumes = [
|
# image = "lissy93/dashy:latest";
|
||||||
"/etc/dashy/dashy_conf.yml:/app/public/conf.yml"
|
# ports = ["127.0.0.1:4000:80"];
|
||||||
];
|
# environment = {
|
||||||
autoStart = true;
|
# "NODE_ENV" = "production";
|
||||||
# cmd = [];
|
# };
|
||||||
};
|
# volumes = [
|
||||||
};
|
# "/etc/dashy/dashy_conf.yml:/app/public/conf.yml"
|
||||||
|
# ];
|
||||||
|
# autoStart = true;
|
||||||
|
# # cmd = [];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user